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

[libsolv] Add new port #31275

Closed
wants to merge 21 commits into from
Closed

[libsolv] Add new port #31275

wants to merge 21 commits into from

Conversation

pavelzw
Copy link

@pavelzw pavelzw commented May 5, 2023

  • Changes comply with the maintainer guide
  • The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines.
  • Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all find_package calls are REQUIRED, are satisfied by vcpkg.json's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx
  • The versioning scheme in vcpkg.json matches what upstream says.
  • The license declaration in vcpkg.json matches what upstream says.
  • The installed as the "copyright" file matches what upstream says.
  • The source code of the component installed comes from an authoritative source.
  • The generated "usage text" is accurate. See adding-usage for context.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is in the new port's versions file.
  • Only one version is added to each modified port's versions file.
@pavelzw pavelzw marked this pull request as ready for review May 5, 2023 15:57
@jimwang118 jimwang118 added the category:new-port The issue is requesting a new library to be added; consider making a PR! label May 6, 2023
@jimwang118
Copy link
Contributor

Note: I will be converting your PR to draft status. The above suggested changes are only recommendations. If you are willing to adopt them, please click "ready for review" after making the modifications. If you do not wish to make any changes, please click "ready for review" directly. That way, I can be aware that you've responded since you can't modify the tags.

@jimwang118 jimwang118 marked this pull request as draft May 6, 2023 05:56
ports/libsolv/portfile.cmake Outdated Show resolved Hide resolved
ports/libsolv/portfile.cmake Outdated Show resolved Hide resolved
@jimwang118
Copy link
Contributor

The following error occurs when compiling locally:
config-x64-windows-out.log

pavelzw and others added 2 commits May 6, 2023 10:19
Co-authored-by: jim wang <122244446+jimwang118@users.noreply.github.com>
@pavelzw
Copy link
Author

pavelzw commented May 6, 2023

The bindings are not working for windows due to only-posix-headers so I deactivated them.

@pavelzw pavelzw marked this pull request as ready for review May 6, 2023 15:28
@pavelzw pavelzw requested a review from jimwang118 May 6, 2023 19:30
ports/libsolv/portfile.cmake Outdated Show resolved Hide resolved
ports/libsolv/portfile.cmake Outdated Show resolved Hide resolved
@jimwang118
Copy link
Contributor

Use the compilation command: .\vcpkg.exe install libsolv[*]:x64-windows --allow-unsupported, the following error occurs:

C:\PROGRA~1\MICROS~4\2022\ENTERP~1\VC\Tools\MSVC\1434~1.319\bin\Hostx64\x64\cl.exe -DENABLE_BZIP2_COMPRESSION=1 -DENABLE_COMPS=1 -DENABLE_CONDA=1 -DENABLE_DEBIAN =1 -DENABLE_HELIXREPO=1 -DENABLE_LZMA_COMPRESSION=1 -DENABLE_ZLIB_COMPRESSION=1 -DENABLE_ZSTD_COMPRESSION=1 -DMULTI_SEMANTICS=1 -DWITHOUT_COOKIEOPEN=1 -D_CRT_SECURE_NO_WARNINGS -D_FILE_OFFSET_BITS=64 -Dbindings_python_EXPORTS -IF:\libsolv\installed\x64-windows\include -IF: \libsolv\buildtrees\libsolv\src\0.7.24-f99b2a1376.clean -IF:\libsolv\buildtrees\libsolv\src\0.7.24-f99b2a1376.clean\src -IF:\libsolv\buildtrees\libsolv\src\0.7 .24-f99b2a1376.clean\ext -IF:\libsolv\buildtrees\libsolv\x64-windows-dbg -IF:\libsolv\buildtrees\libsolv\x64-windows-dbg\src -IF:\libsolv\installed\x64- windows\include\python3.10 /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /MP /wd4244 /wd4267 -fPIC /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 -Wno-unused /showIncludes /Fobindings\python\ CMakeFiles\bindings_python.dir\solv_python.c.obj /Fdbindings\python\CMakeFiles\bindings_python.dir\ /FS -c F:\libsolv\buildtrees\libsolv\x64-windows-dbg\bindings\python\solv_python.c
cl : Command line error D8021 : invalid numeric argument '/Wno-unused'
@jimwang118 jimwang118 marked this pull request as draft May 8, 2023 02:28
@dg0yt
Copy link
Contributor

dg0yt commented May 8, 2023

--allow-unsupported means unsupported. Why should this block a PR?

Co-authored-by: jim wang <122244446+jimwang118@users.noreply.github.com>
@pavelzw
Copy link
Author

pavelzw commented May 8, 2023

/Wno-unused is a GCC compiler flag that ist added in the bindings CMakeLists. Since the bindings are meant to only be compiled on GCC and Linux (also mentioned here), I suggest we leave it unsupported. This would be part of a slightly bigger upstream change…

@pavelzw pavelzw marked this pull request as ready for review May 8, 2023 06:38
ports/libsolv/portfile.cmake Outdated Show resolved Hide resolved
ports/libsolv/portfile.cmake Outdated Show resolved Hide resolved
ports/libsolv/portfile.cmake Outdated Show resolved Hide resolved
ports/libsolv/portfile.cmake Outdated Show resolved Hide resolved
@pavelzw pavelzw requested a review from dg0yt May 8, 2023 07:53
dg0yt
dg0yt previously approved these changes May 8, 2023
ports/libsolv/portfile.cmake Outdated Show resolved Hide resolved
jimwang118
jimwang118 previously approved these changes May 10, 2023
@jimwang118
Copy link
Contributor

After compiling, how can I call this library? It is recommended to provide a usage instruction, so that users will be more convenient to use.

@dg0yt
Copy link
Contributor

dg0yt commented May 10, 2023

After compiling, how can I call this library? It is recommended to provide a usage instruction, so that users will be more convenient to use.

This could be documented for pkgconfig, exampe: port mujs.

@pavelzw
Copy link
Author

pavelzw commented May 10, 2023

How about this usage file?

The package libsolv provides CMake targets:

    find_package(libsolv REQUIRED)
    include_directories(${LibSolv_INCLUDE_DIRS})
    target_link_libraries(main PRIVATE ${LibSolv_LIBRARIES})
@dg0yt
Copy link
Contributor

dg0yt commented May 11, 2023

How about this usage file?

The package libsolv provides CMake targets:

    find_package(libsolv REQUIRED)
    include_directories(${LibSolv_INCLUDE_DIRS})
    target_link_libraries(main PRIVATE ${LibSolv_LIBRARIES})

AFAICS there is no implementation for find_package(libsolv REQUIRED), so it doesn't work.
That's why I deliberately pointed at another solution.

@pavelzw
Copy link
Author

pavelzw commented May 12, 2023

image

When I installed it locally, I found the FindLibSolv.cmake, find_package(LibSolv REQUIRED) should work, right?

@dg0yt
Copy link
Contributor

dg0yt commented May 12, 2023

So a find module exists, and the spelling matches now. But AFAICT, this find module isn't in the search path, so it isn't found. You need to add a wrapper or config file which delegates to the find module in order to make it work.

@jimwang118
Copy link
Contributor

Note: I will be converting your PR to draft status. The above suggested changes are only recommendations. If you are willing to adopt them, please click "ready for review" after making the modifications. If you do not wish to make any changes, please click "ready for review" directly. That way, I can be aware that you've responded since you can't modify the tags.

@jimwang118 jimwang118 marked this pull request as draft May 17, 2023 06:09
@jimwang118
Copy link
Contributor

@pavelzw Thanks for your PR, Is work still being done for this PR?

@jimwang118
Copy link
Contributor

Closing this PR since it seems that no progress is being made. Please ping us to reopen if work is still being done.

@jimwang118 jimwang118 closed this Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR!
3 participants