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

Vendorize libiconv on macOS #11

Closed

Commits on Jul 2, 2024

  1. Add a vendored version of libiconv for macOS…

    …to match the version that `superstring` expects.
    
    This is copied directly from what Homebrew installs into `$(brew --prefix)/opt/libiconv`, except that the install name has been changed on `libiconv.2.dylib` to `libiconv.2.dylib`. (When it's installed from Homebrew, its macOS library “install name” matches its original path, so that's where macOS looks for it.
    
    As part of the build, we rename the library with `install_name_tool` so that it can be resolved relative to the location of `superstring.node`.
    
    This can probably be simplified, but first let's see if it'll work.
    savetheclocktower committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    8873e70 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    16013d7 View commit details
    Browse the repository at this point in the history
  3. Tweak binding.gyp

    savetheclocktower committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    3ecf7a3 View commit details
    Browse the repository at this point in the history
  4. Sanity check

    savetheclocktower committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    1011395 View commit details
    Browse the repository at this point in the history
  5. (never mind)

    savetheclocktower committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    a3e9358 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2a43de6 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0422671 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    2378f1e View commit details
    Browse the repository at this point in the history
  9. Un-vendorize libiconv

    …because we need a version built for the current machine's architecture.
    
    (If our current approach doesn't work, we could vendorize two different copies — one for each architecture.)
    savetheclocktower committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    50aff7b View commit details
    Browse the repository at this point in the history
  10. Add script that dynamically vendorizes libiconv

    …by grabbing it from Homebrew or from a path specified by the user in an environment variable.
    savetheclocktower committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    9466a42 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6f2232c View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2024

  1. Future-proof the build process…

    …by adding an alternate strategy that we can adopt if we ever need to.
    
    Also copy over `libiconv`’s README and license file.
    savetheclocktower committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    a4c374b View commit details
    Browse the repository at this point in the history