-
Notifications
You must be signed in to change notification settings - Fork 649
add libimagequant #10853
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
Merged
Merged
add libimagequant #10853
Changes from 3 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
8038c00
add libimagequant
ericphanson 77dde2f
use vendored openssl for cargo-c (build time dep)
ericphanson 2a40636
use openssl jll
ericphanson c96c8bc
Update L/libimagequant/build_tarballs.jl
ericphanson eb13cdf
Update L/libimagequant/build_tarballs.jl
ericphanson 3ac0b3b
fix?
ericphanson eeb13a4
try setting CARGO_HOME
ericphanson 653781a
compile cargo-c for host
ericphanson a9f1673
rust_host?
ericphanson 8172686
update path
ericphanson 7fad338
missing `=`
ericphanson b08d655
fix cargo-c version so installable on rust 1.83
ericphanson 4a7a9a3
unset envs
ericphanson 18d1b69
try to avoid the wrapper
ericphanson 8dd5fbd
rm /opt from path for cargo-c install
ericphanson 9fb3d85
set `CARGO_BUILD_TARGET` instead of modifying PATH
ericphanson a2c6b78
try to set `RUSTC`
ericphanson da58b41
try using BBB PR
ericphanson ec077a6
Merge remote-tracking branch 'origin/master' into eph/libimagequant
ericphanson 249b9fe
bump PR commit
ericphanson d9f06e6
use `--locked` to avoid too-new cargo-c deps
ericphanson 8088047
Merge branch 'master' into eph/libimagequant
ericphanson 70e64be
Update L/libimagequant/build_tarballs.jl
ericphanson 6553ad5
switch back to branch
ericphanson 5828214
bump commit
ericphanson 515a266
up
ericphanson 7adc969
try to skip wrappers
ericphanson 7d6e8c6
fix?
ericphanson f68320e
try different approach
ericphanson 68411df
apply patch in right spot (?)
ericphanson 570c777
fix patch
ericphanson 1de1218
fix
ericphanson 0f16686
fixes
ericphanson 49cc2dc
fix path
ericphanson b38643e
build for all platforms
ericphanson 43c3662
switch to release
ericphanson 0a50bcf
try disabling rayon
ericphanson 37065d2
try
ericphanson 9c6a3ac
fix patch
ericphanson 8d3340f
fix?
ericphanson c12fc18
try macos
ericphanson 677ad1e
try...
ericphanson 5c29c00
patch out `links` too
ericphanson 5f9192c
go back and try a different thing
ericphanson 33618c0
ok run on all platforms!
ericphanson 5662bbc
try to support musl
ericphanson bb02265
try to fix windows
ericphanson 5615e56
rm openssl
ericphanson a5353ae
Update L/libimagequant/build_tarballs.jl
ericphanson c376773
Update L/libimagequant/build_tarballs.jl
ericphanson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Note that this script can accept some limited command-line arguments, run | ||
| # `julia build_tarballs.jl --help` to see a usage message. | ||
| using BinaryBuilder, BinaryBuilderBase | ||
|
|
||
| name = "libimagequant" | ||
| version = v"4.3.4" | ||
|
|
||
| # Collection of sources required to complete build | ||
| # | ||
| sources = [ | ||
| GitSource( | ||
| "https://github.com/ImageOptim/libimagequant.git", | ||
| "b7340db2ac06bcdb36eec11f6251eee2c6d480b1"), | ||
| ] | ||
|
|
||
| # following https://github.com/ImageOptim/libimagequant/tree/main/imagequant-sys#building-for-c | ||
| # we use cargo-c to install the library | ||
| script = raw""" | ||
| cd $WORKSPACE/srcdir/libimagequant/imagequant-sys | ||
| cargo install cargo-c | ||
| cargo cinstall --destdir=${sysroot} --prefix${prefix} --libdir=${libdir} | ||
| install_license ./COPYRIGHT | ||
| """ | ||
|
|
||
| # These are the platforms we will build for by default, unless further | ||
| # platforms are passed in on the command line | ||
| platforms = supported_platforms() | ||
| # Rust toolchain for i686 Windows is unusable | ||
| filter!(p -> !Sys.iswindows(p) || arch(p) != "i686", platforms) | ||
| # Rust toolchain seems to not be available for RISC-V or FreeBSD/aarch64 | ||
| filter!(p -> arch(p) != "riscv64", platforms) | ||
| filter!(p -> os(p) != "freebsd" || arch(p) != "aarch64", platforms) | ||
|
|
||
| # The products that we will ensure are always built | ||
| products = [ | ||
| LibraryProduct("libimagequant", :libimagequant), | ||
| ] | ||
|
|
||
| # Dependencies that must be installed before this package can be built | ||
| dependencies = Dependency[ | ||
| HostBuildDependency("OpenSSL_jll"; compat="3.0.15"), | ||
ericphanson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ] | ||
|
|
||
| # Build the tarballs, and possibly a `build.jl` as well. | ||
| build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; | ||
| julia_compat="1.6", compilers=[:c, :rust], lock_microarchitecture=false) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.