Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minmea: add new recipe #24546

Merged
merged 13 commits into from
Sep 12, 2024
Merged

Conversation

toge
Copy link
Contributor

@toge toge commented Jul 7, 2024

Summary

Changes to recipe: minmea/*

Motivation

The minmea is a library for parsing GPS NMEA data.

Details

minmea has a stable release, but it is too old (2014).
MINMEA is in continuous development until 2023.


@AbrilRBS AbrilRBS self-assigned this Jul 8, 2024
@toge toge changed the title minmea: add recipe minmea: add new recipe Jul 8, 2024
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@AbrilRBS
Copy link
Member

AbrilRBS commented Jul 9, 2024

Feel free to ping me once you resolve the compilation issues @toge! :)

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

Copy link
Member

@AbrilRBS AbrilRBS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This nowadays has less sense than before with the addition of the [platform_tool_requires] in Conan 2, but Conan 1 still needs a way to specify that they already have pkgconf :)

recipes/minmea/all/conanfile.py Outdated Show resolved Hide resolved
#include "minmea.h"

char* nmea_data[] = {
"$GPGGA,155246.585,5231.171,N,01321.830,E,1,12,1.0,0.0,M,0.0,M,,*6F",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there has been a shift towards simpler test_package executables lately, this one could probably be reduced to parsing just a single NMEA string as a test as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I am going to make test_package.c simpler.


def validate(self):
if is_msvc(self):
raise ConanInvalidConfiguration(f"{self.ref} can not be built on Visual Studio and msvc.(yet)")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is breaking the build on MSVC?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Co-authored-by: Abril Rincón Blanco <git@rinconblanco.es>
@toge toge marked this pull request as draft July 16, 2024 15:29
@conan-center-bot

This comment has been minimized.

@toge toge marked this pull request as ready for review July 16, 2024 15:49
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@toge
Copy link
Contributor Author

toge commented Jul 16, 2024

@AbrilRBS
Now this recipe supports MSVC.
Thanks!

Copy link
Contributor

@valgur valgur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version name needs adjusting, otherwise LGTM.

toge and others added 2 commits August 11, 2024 17:13
Co-authored-by: Martin Valgur <martin.valgur@gmail.com>
@conan-center-bot

This comment has been minimized.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
@uilianries
Copy link
Member

Hello @toge, I applied few changed to this PR:

  • Simplified the original patch, by building the minmea cmake target directly, so we just need skip the libcheck search using pkg-config
  • Added support for build on Windows, using GCC only (log below). Using MSVC it fails and is not covered in the documentation, neither in their CI.
  • I still need to review with Conan the version format, this new format is not supported by Conan 1.x and are we accepting only for exceptional cases (e.g. eigen). As this recipe is a new one, it may be fine.

Build log:

Details
λ gconan create all --version=0.3.0.cci.20230620 -pr gcc -o "*/*:shared=True"

======== Exporting recipe to the cache ========
minmea/0.3.0.cci.20230620: Exporting package recipe: C:\Users\uilia\Development\conan\conan-center-index\recipes\minmea\all\conanfile.py
minmea/0.3.0.cci.20230620: exports: File 'conandata.yml' found. Exporting it...
minmea/0.3.0.cci.20230620: Calling export_sources()
minmea/0.3.0.cci.20230620: Copied 1 '.yml' file: conandata.yml
minmea/0.3.0.cci.20230620: Copied 1 '.py' file: conanfile.py
minmea/0.3.0.cci.20230620: Copied 2 '.patch' files: 001-disable-pkgconfig-libcheck.patch, 002-windows-support.patch
minmea/0.3.0.cci.20230620: Exported to cache folder: C:\Users\uilia\.conan2\p\minme74586f8dbaa72\e
minmea/0.3.0.cci.20230620: Exported: minmea/0.3.0.cci.20230620#11ba390b9420f1c7a8df7f5501ce1917 (2024-09-11 07:35:09 UTC)

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu14
compiler.exception=seh
compiler.libcxx=libstdc++11
compiler.threads=posix
compiler.version=13
os=Windows
[options]
*/*:shared=True
[tool_requires]
*: cmake/3.30.1, ninja/1.12.1, msys2/cci.latest
[conf]
tools.cmake.cmaketoolchain:generator=Ninja

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=17
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=193
os=Windows
[tool_requires]
*: cmake/3.30.1
[conf]
tools.build:verbosity=verbose
tools.cmake.cmaketoolchain:generator=Ninja
tools.compilation:verbosity=verbose


======== Computing dependency graph ========
Graph root
    cli
Requirements
    minmea/0.3.0.cci.20230620#11ba390b9420f1c7a8df7f5501ce1917 - Cache
Build requirements
    cmake/3.30.1#6d832cf2d46f6ec969ca5ed5b41f91eb - Cache
    msys2/cci.latest#5a31efa2bde593541fd5ac3bcc50c01c - Cache
    ninja/1.12.1#fd583651bf0c6a901943495d49878803 - Cache

======== Computing necessary packages ========
minmea/0.3.0.cci.20230620: Forced build from source
Requirements
    minmea/0.3.0.cci.20230620#11ba390b9420f1c7a8df7f5501ce1917:994fc12a1e652020c32aedad1315f6a788b435e6 - Build
Build requirements
    cmake/3.30.1#6d832cf2d46f6ec969ca5ed5b41f91eb:522dcea5982a3f8a5b624c16477e47195da2f84f#e4039405f7640830990126c02c0c9959 - Cache
    msys2/cci.latest#5a31efa2bde593541fd5ac3bcc50c01c:956a88975bda9dfcc485e2861d71e74bd7e2b9a5#c99a611f14016fba4a51b85204f62fa3 - Cache
    ninja/1.12.1#fd583651bf0c6a901943495d49878803:723257509aee8a72faf021920c2874abc738e029#360592e21b5a6812030b65cbdd1c4a8d - Cache

======== Installing packages ========
cmake/3.30.1: Already installed! (1 of 4)
cmake/3.30.1: Appending PATH environment variable: C:\Users\uilia\.conan2\p\cmake3081ce9d742b2\p\bin
cmake/3.30.1: Appending PATH environment variable: C:\Users\uilia\.conan2\p\cmake3081ce9d742b2\p\bin
msys2/cci.latest: Already installed! (2 of 4)
ninja/1.12.1: Already installed! (3 of 4)
minmea/0.3.0.cci.20230620: Calling source() in C:\Users\uilia\.conan2\p\minme74586f8dbaa72\s\src
minmea/0.3.0.cci.20230620: Source https://github.com/kosma/minmea/archive/e368d847d75abd891c651f7d30ce5efb6681adb7.tar.gz retrieved from local download cache
minmea/0.3.0.cci.20230620: Unzipping e368d847d75abd891c651f7d30ce5efb6681adb7.tar.gz to .

-------- Installing package minmea/0.3.0.cci.20230620 (4 of 4) --------
minmea/0.3.0.cci.20230620: Building from source
minmea/0.3.0.cci.20230620: Package minmea/0.3.0.cci.20230620:994fc12a1e652020c32aedad1315f6a788b435e6
minmea/0.3.0.cci.20230620: Copying sources to build folder
minmea/0.3.0.cci.20230620: Building your package in C:\Users\uilia\.conan2\p\b\minme89c43ae7feb0b\b
minmea/0.3.0.cci.20230620: Calling generate()
minmea/0.3.0.cci.20230620: Generators folder: C:\Users\uilia\.conan2\p\b\minme89c43ae7feb0b\b\build\Release\generators
minmea/0.3.0.cci.20230620: CMakeToolchain generated: conan_toolchain.cmake
minmea/0.3.0.cci.20230620: CMakeToolchain generated: C:\Users\uilia\.conan2\p\b\minme89c43ae7feb0b\b\build\Release\generators\CMakePresets.json
minmea/0.3.0.cci.20230620: CMakeToolchain generated: C:\Users\uilia\.conan2\p\b\minme89c43ae7feb0b\b\src\CMakeUserPresets.json
minmea/0.3.0.cci.20230620: Generating aggregated env files
minmea/0.3.0.cci.20230620: Generated aggregated env files: ['conanbuild.bat', 'conanrun.bat']
minmea/0.3.0.cci.20230620: Calling build()
minmea/0.3.0.cci.20230620: Apply patch (conan): Do not search for libcheck - Exclusive for testing
minmea/0.3.0.cci.20230620: Apply patch (portability): Manage compat header file for Windows
minmea/0.3.0.cci.20230620: Running CMake.configure()
minmea/0.3.0.cci.20230620: RUN: cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/uilia/.conan2/p/b/minme89c43ae7feb0b/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "C:/Users/uilia/.conan2/p/b/minme89c43ae7feb0b/b/src"
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Using Conan toolchain: C:/Users/uilia/.conan2/p/b/minme89c43ae7feb0b/b/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: Defining architecture flag: -m64
-- Conan toolchain: Setting BUILD_SHARED_LIBS = ON
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Users/uilia/.conan2/p/msys27f2f094a41efb/p/bin/msys64/usr/bin/cc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Users/uilia/.conan2/p/msys27f2f094a41efb/p/bin/msys64/usr/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Configuring done (3.2s)
-- Generating done (0.0s)
-- Build files have been written to: C:/Users/uilia/.conan2/p/b/minme89c43ae7feb0b/b/build/Release

minmea/0.3.0.cci.20230620: Running CMake.build()
minmea/0.3.0.cci.20230620: RUN: cmake --build "C:\Users\uilia\.conan2\p\b\minme89c43ae7feb0b\b\build\Release" --target minmea -- -j12
[2/2] Linking C shared library libminmea.dll

minmea/0.3.0.cci.20230620: Package '994fc12a1e652020c32aedad1315f6a788b435e6' built
minmea/0.3.0.cci.20230620: Build folder C:\Users\uilia\.conan2\p\b\minme89c43ae7feb0b\b\build\Release
minmea/0.3.0.cci.20230620: Generating the package
minmea/0.3.0.cci.20230620: Packaging in folder C:\Users\uilia\.conan2\p\b\minme89c43ae7feb0b\p
minmea/0.3.0.cci.20230620: Calling package()
minmea/0.3.0.cci.20230620: package(): Packaged 1 '.dll' file: libminmea.dll
minmea/0.3.0.cci.20230620: package(): Packaged 2 '.h' files: minmea.h, minmea_compat.h
minmea/0.3.0.cci.20230620: package(): Packaged 1 '.a' file: libminmea.dll.a
minmea/0.3.0.cci.20230620: package(): Packaged 1 file: COPYING
minmea/0.3.0.cci.20230620: package(): Packaged 1 '.grants' file: LICENSE.grants
minmea/0.3.0.cci.20230620: package(): Packaged 1 '.0' file: LICENSE.LGPL-3.0
minmea/0.3.0.cci.20230620: package(): Packaged 1 '.MIT' file: LICENSE.MIT
minmea/0.3.0.cci.20230620: Created package revision c517147cae345c18318c69987d784424
minmea/0.3.0.cci.20230620: Package '994fc12a1e652020c32aedad1315f6a788b435e6' created
minmea/0.3.0.cci.20230620: Full package reference: minmea/0.3.0.cci.20230620#11ba390b9420f1c7a8df7f5501ce1917:994fc12a1e652020c32aedad1315f6a788b435e6#c517147cae345c18318c69987d784424
minmea/0.3.0.cci.20230620: Package folder C:\Users\uilia\.conan2\p\b\minme89c43ae7feb0b\p
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated:     'env_info' used in: cmake/3.30.1, msys2/cci.latest

======== Launching test_package ========

======== Computing dependency graph ========
Graph root
    minmea/0.3.0.cci.20230620 (test package): C:\Users\uilia\Development\conan\conan-center-index\recipes\minmea\all\test_package\conanfile.py
Requirements
    minmea/0.3.0.cci.20230620#11ba390b9420f1c7a8df7f5501ce1917 - Cache
Build requirements
    cmake/3.30.1#6d832cf2d46f6ec969ca5ed5b41f91eb - Cache
    msys2/cci.latest#5a31efa2bde593541fd5ac3bcc50c01c - Cache
    ninja/1.12.1#fd583651bf0c6a901943495d49878803 - Cache

======== Computing necessary packages ========
Requirements
    minmea/0.3.0.cci.20230620#11ba390b9420f1c7a8df7f5501ce1917:994fc12a1e652020c32aedad1315f6a788b435e6#c517147cae345c18318c69987d784424 - Cache
Build requirements
    cmake/3.30.1#6d832cf2d46f6ec969ca5ed5b41f91eb:522dcea5982a3f8a5b624c16477e47195da2f84f#e4039405f7640830990126c02c0c9959 - Cache
    msys2/cci.latest#5a31efa2bde593541fd5ac3bcc50c01c:956a88975bda9dfcc485e2861d71e74bd7e2b9a5#c99a611f14016fba4a51b85204f62fa3 - Cache
    ninja/1.12.1#fd583651bf0c6a901943495d49878803:723257509aee8a72faf021920c2874abc738e029#360592e21b5a6812030b65cbdd1c4a8d - Cache

======== Installing packages ========
cmake/3.30.1: Already installed! (1 of 4)
cmake/3.30.1: Appending PATH environment variable: C:\Users\uilia\.conan2\p\cmake3081ce9d742b2\p\bin
msys2/cci.latest: Already installed! (2 of 4)
ninja/1.12.1: Already installed! (3 of 4)
minmea/0.3.0.cci.20230620: Already installed! (4 of 4)
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated:     'env_info' used in: cmake/3.30.1, msys2/cci.latest

======== Testing the package ========
Removing previously existing 'test_package' build folder: C:\Users\uilia\Development\conan\conan-center-index\recipes\minmea\all\test_package\build\gcc-13-x86_64-gnu14-release
minmea/0.3.0.cci.20230620 (test package): Test package build: build\gcc-13-x86_64-gnu14-release
minmea/0.3.0.cci.20230620 (test package): Test package build folder: C:\Users\uilia\Development\conan\conan-center-index\recipes\minmea\all\test_package\build\gcc-13-x86_64-gnu14-release
minmea/0.3.0.cci.20230620 (test package): Writing generators to C:\Users\uilia\Development\conan\conan-center-index\recipes\minmea\all\test_package\build\gcc-13-x86_64-gnu14-release\generators
minmea/0.3.0.cci.20230620 (test package): Generator 'CMakeDeps' calling 'generate()'
minmea/0.3.0.cci.20230620 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt
    find_package(minmea)
    target_link_libraries(... minmea::minmea)
minmea/0.3.0.cci.20230620 (test package): Generator 'CMakeToolchain' calling 'generate()'
minmea/0.3.0.cci.20230620 (test package): CMakeToolchain generated: conan_toolchain.cmake
minmea/0.3.0.cci.20230620 (test package): CMakeToolchain generated: C:\Users\uilia\Development\conan\conan-center-index\recipes\minmea\all\test_package\build\gcc-13-x86_64-gnu14-release\generators\CMakePresets.json
minmea/0.3.0.cci.20230620 (test package): CMakeToolchain generated: C:\Users\uilia\Development\conan\conan-center-index\recipes\minmea\all\test_package\CMakeUserPresets.json
minmea/0.3.0.cci.20230620 (test package): Generator 'VirtualRunEnv' calling 'generate()'
minmea/0.3.0.cci.20230620 (test package): Generating aggregated env files
minmea/0.3.0.cci.20230620 (test package): Generated aggregated env files: ['conanrun.bat', 'conanbuild.bat']

======== Testing the package: Building ========
minmea/0.3.0.cci.20230620 (test package): Calling build()
minmea/0.3.0.cci.20230620 (test package): Running CMake.configure()
minmea/0.3.0.cci.20230620 (test package): RUN: cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/uilia/Development/conan/conan-center-index/recipes/minmea/all/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "C:/Users/uilia/Development/conan/conan-center-index/recipes/minmea/all/test_package"
-- Using Conan toolchain: C:/Users/uilia/Development/conan/conan-center-index/recipes/minmea/all/test_package/build/gcc-13-x86_64-gnu14-release/generators/conan_toolchain.cmake
-- Conan toolchain: Defining architecture flag: -m64
-- Conan toolchain: C++ Standard 14 with extensions ON
-- The C compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Users/uilia/.conan2/p/msys27f2f094a41efb/p/bin/msys64/usr/bin/cc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Conan: Target declared 'minmea::minmea'
-- Configuring done (1.3s)
-- Generating done (0.0s)
-- Build files have been written to: C:/Users/uilia/Development/conan/conan-center-index/recipes/minmea/all/test_package/build/gcc-13-x86_64-gnu14-release

minmea/0.3.0.cci.20230620 (test package): Running CMake.build()
minmea/0.3.0.cci.20230620 (test package): RUN: cmake --build "C:\Users\uilia\Development\conan\conan-center-index\recipes\minmea\all\test_package\build\gcc-13-x86_64-gnu14-release" -- -j12
[2/2] Linking C executable test_package.exe


======== Testing the package: Executing test ========
minmea/0.3.0.cci.20230620 (test package): Running test()
minmea/0.3.0.cci.20230620 (test package): RUN: .\test_package
$GGA: fix quality: 1

@conan-center-bot

This comment has been minimized.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 14 (e2cd436ff8a1d1d817766b6dd8d442076c73d0d2):

  • minmea/0.3.0.cci.20230620:
    All packages built successfully! (All logs)

Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 14 (e2cd436ff8a1d1d817766b6dd8d442076c73d0d2):

  • minmea/0.3.0.cci.20230620:
    All packages built successfully! (All logs)

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

The new version format is good for this PR:

  • It's a new fresh recipe in CCI
  • We don't expect a new release for minmea soon
  • Using Conan version range for this recipe in CCI is most unlikely

@conan-center-bot conan-center-bot merged commit 168c942 into conan-io:master Sep 12, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants