-
Notifications
You must be signed in to change notification settings - Fork 561
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
Add builder for libX11 #42
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 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,95 @@ | ||
# Note that this script can accept some limited command-line arguments, run | ||
# `julia build_tarballs.jl --help` to see a usage message. | ||
using BinaryBuilder | ||
|
||
name = "X11" | ||
version = v"1.6.8" | ||
|
||
# Collection of sources required to build Pango | ||
sources = [ | ||
"https://www.x.org/archive//individual/lib/libX11-$(version).tar.bz2" => | ||
"b289a845c189e251e0e884cc0f9269bbe97c238df3741e854ec4c17c21e473d5", | ||
|
||
# Protos | ||
"https://www.x.org/releases/individual/proto/xproto-7.0.31.tar.bz2" => | ||
"c6f9747da0bd3a95f86b17fb8dd5e717c8f3ab7f0ece3ba1b247899ec1ef7747", | ||
|
||
"https://www.x.org/archive/individual/proto/xextproto-7.3.0.tar.bz2" => | ||
"f3f4b23ac8db9c3a9e0d8edb591713f3d70ef9c3b175970dd8823dfc92aa5bb0", | ||
|
||
"https://www.x.org/archive/individual/proto/kbproto-1.0.7.tar.bz2" => | ||
"f882210b76376e3fa006b11dbd890e56ec0942bc56e65d1249ff4af86f90b857", | ||
|
||
"https://www.x.org/archive/individual/proto/inputproto-2.3.2.tar.bz2" => | ||
"893a6af55733262058a27b38eeb1edc733669f01d404e8581b167f03c03ef31d", | ||
|
||
"https://www.x.org/archive/individual/xcb/xcb-proto-1.13.tar.bz2" => | ||
"7b98721e669be80284e9bbfeab02d2d0d54cd11172b72271e47a2fe875e2bde1", | ||
|
||
"https://www.x.org/archive/individual/lib/xtrans-1.4.0.tar.bz2" => | ||
"377c4491593c417946efcd2c7600d1e62639f7a8bbca391887e2c4679807d773", | ||
|
||
# Libs | ||
"https://www.x.org/archive/individual/lib/libXau-1.0.9.tar.bz2" => | ||
"ccf8cbf0dbf676faa2ea0a6d64bcc3b6746064722b606c8c52917ed00dcb73ec", | ||
|
||
"https://www.x.org/archive/individual/lib/libpthread-stubs-0.1.tar.bz2" => | ||
"004dae11e11598584939d66d26a5ab9b48d08a00ca2d00ae8d38ee3ac7a15d65", | ||
|
||
"https://www.x.org/archive/individual/lib/libXext-1.3.4.tar.bz2" => | ||
"59ad6fcce98deaecc14d39a672cf218ca37aba617c9a0f691cac3bcd28edf82b", | ||
|
||
"https://www.x.org/archive/individual/xcb/libxcb-1.13.tar.bz2" => | ||
"188c8752193c50ff2dbe89db4554c63df2e26a2e47b0fa415a70918b5b851daa", | ||
] | ||
|
||
# Bash recipe for building across all platforms | ||
script = raw""" | ||
cd $WORKSPACE/srcdir/ | ||
CPPFLAGS="-I${prefix}/include" | ||
if [[ "${target}" == *-apple-* ]]; then | ||
# Work around for | ||
# size too large (archive member extends past the end of the file) | ||
# error. | ||
RANLIB="/opt/${target}/bin/llvm-ranlib" | ||
fi | ||
for dir in *proto-* xtrans-* libXau-* libpthread-stubs-* libxcb-* libX11-* libXext-*; do | ||
cd "$dir" | ||
if [[ "${dir}" == xextproto-* ]] || [[ "${dir}" == xproto-* ]] || [[ "${dir}" == libpthread-stubs-* ]] || [[ "${dir}" == libX11-* ]]; then | ||
update_configure_scripts | ||
fi | ||
if [[ "${dir}" == libX11-* ]] || [[ "${dir}" == libXext-* ]]; then | ||
# Elliot checked this on all platforms, so we can skip the test. | ||
EXTRA_OPTS="--enable-malloc0returnsnull=no" | ||
fi | ||
./configure --prefix=${prefix} --host=${target} ${EXTRA_OPTS} | ||
if [[ "${dir}" == libX11-* ]]; then | ||
# For some obscure reason, this Makefile may not get the value of CPPFLAGS | ||
sed -i "s?CPPFLAGS = ?CPPFLAGS = ${CPPFLAGS}?" src/util/Makefile | ||
fi | ||
make -j${nproc} | ||
make install | ||
EXTRA_OPTS="" | ||
cd .. | ||
done | ||
""" | ||
|
||
# These are the platforms we will build for by default, unless further | ||
# platforms are passed in on the command line | ||
platforms = supported_platforms() | ||
|
||
# The products that we will ensure are always built | ||
products(prefix) = [ | ||
LibraryProduct(prefix, "libX11", :libX11), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These actually all these libraries:
I listed only the two related with x11 |
||
LibraryProduct(prefix, "libX11-xcb", :libX11_xcb) | ||
] | ||
|
||
# Dependencies that must be installed before this package can be built | ||
dependencies = [ | ||
|
||
] | ||
|
||
# Build the tarballs, and possibly a `build.jl` as well. | ||
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies) |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't want to look into why the Makefile wasn't getting the right value, it's strange because it worked for some builds, it started failing with
Linux(:aarch64, libc=:glibc)