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

[libilbc] New port #15331

Merged
merged 5 commits into from Dec 31, 2020
Merged

[libilbc] New port #15331

merged 5 commits into from Dec 31, 2020

Conversation

geraldcombs
Copy link
Contributor

Describe the pull request

This adds a port for libilbc, an implementation of the Internet Low Bit Rate Codec (iLBC).

Tested with x64-osx, but should work with *-windows and *-linux.

  • Have you updated the CI baseline?

Yes.

Yes.

@geraldcombs geraldcombs force-pushed the add-libilbc branch 2 times, most recently from dc7e1df to 3d61635 Compare December 27, 2020 22:11
@geraldcombs geraldcombs marked this pull request as ready for review December 27, 2020 22:16
@JackBoosY JackBoosY self-assigned this Dec 28, 2020
@JackBoosY JackBoosY added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Dec 28, 2020
@geraldcombs geraldcombs force-pushed the add-libilbc branch 2 times, most recently from d3c3283 to af0d106 Compare December 28, 2020 18:05
libilbc is an Internet Low Bit Rate Codec (iLBC) / RFC 3951 codec.
Closes microsoft#14836.
ports/libilbc/portfile.cmake Outdated Show resolved Hide resolved
ports/libilbc/portfile.cmake Outdated Show resolved Hide resolved
ports/libilbc/portfile.cmake Outdated Show resolved Hide resolved
ports/libilbc/portfile.cmake Outdated Show resolved Hide resolved
ports/libilbc/portfile.cmake Outdated Show resolved Hide resolved
scripts/ci.baseline.txt Outdated Show resolved Hide resolved
geraldcombs and others added 2 commits December 28, 2020 19:00
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
@geraldcombs geraldcombs force-pushed the add-libilbc branch 2 times, most recently from 4eacf3e to 1120f17 Compare December 29, 2020 18:05
Copy link
Contributor

@JackBoosY JackBoosY left a comment

Choose a reason for hiding this comment

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

There are some questions:

  1. libilbc installed libilbc.pc in PACKAGES/lib/pkgconfig, so we should add vcpkg_fixup_pkgconfig after vcpkg_install_cmake.
  2. libilbc's docs is installed in PACKAGES/share/doc, the correct path should be PACKAGES/share/libilbc/doc.
  3. I found the tool is test program, so we shouldn't install it, please add patch or option to disable it.
  4. In PACKAGES/include/ibc_export.h line 5:
#ifdef ILBC_STATIC_DEFINE
#  define ILBC_EXPORT
#  define ILBC_NO_EXPORT
#else
#  ifndef ILBC_EXPORT
#    ifdef ilbc_EXPORTS
        /* We are building this library */
#      define ILBC_EXPORT __declspec(dllexport)
#    else
        /* We are using this library */
#      define ILBC_EXPORT __declspec(dllimport)
#    endif
#  endif

#  ifndef ILBC_NO_EXPORT
#    define ILBC_NO_EXPORT 
#  endif
#endif

The judgment #ifdef ILBC_STATIC_DEFINE shoud be #if 1 when building static, so please modify this line after build (use vcpkg_replace_string).

Add vcpkg_fixup_pkgconfig after vcpkg_install_cmake.

Install docs into $PREFIX/share/libilbc.

Remove ilbc_test after a dynamic build and the bin and debug/bin dirs
after a static build.

Fixup include/ilbc_export.h for static builds.
@geraldcombs
Copy link
Contributor Author

1. libilbc installed `libilbc.pc` in _PACKAGES/lib/pkgconfig_, so we should add `vcpkg_fixup_pkgconfig` after `vcpkg_install_cmake`.

Done.

2. libilbc's docs is installed in _PACKAGES/share/doc_, the correct path should be _PACKAGES/share/libilbc/doc_.

libilbc's CMakeLists.txt calls GNUInstallDirs so this was done via -DCMAKE_INSTALL_DOCDIR=share/${PORT}.

3. I found the tool is test program, so we shouldn't install it, please add patch or option to disable it.

Done via a patch.

4. In _PACKAGES/include/ibc_export.h_ line 5:

[ ... ]
The judgment #ifdef ILBC_STATIC_DEFINE shoud be #if 1 when building static, so please modify this line after build (use vcpkg_replace_string).

Done.

@JackBoosY JackBoosY added info:reviewed Pull Request changes follow basic guidelines and removed requires:author-response labels Dec 31, 2020
@vicroms vicroms merged commit 73cfc65 into microsoft:master Dec 31, 2020
@vicroms
Copy link
Member

vicroms commented Dec 31, 2020

Thanks for the PR!

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! info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[New Port Request] libilbc
3 participants