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

Wizard recipe: msquic-v1.4.0 #3364

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions M/msquic/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder, Pkg

name = "msquic"
version = v"1.4.0"

# Collection of sources required to complete build
sources = [
GitSource("https://github.com/microsoft/msquic.git", "7e8f28fec1a0d9b93f274026a277a6d9b0cf7c7d"),
ArchiveSource("http://lttng.org/files/lttng-ust/lttng-ust-2.12.2.tar.bz2", "bcd0f064b6ca88c72d84e760eac3472ae5c828411c634435922bee9fce359fc7"),
ArchiveSource("http://lttng.org/files/lttng-tools/lttng-tools-2.12.4.tar.bz2", "d729f8c2373a41194f171aeb0da0a9bb35ac181f31afa7e260786d19a500dea1"),
ArchiveSource("http://ftp.rpm.org/popt/releases/popt-1.x/popt-1.18.tar.gz", "5159bc03a20b28ce363aa96765f37df99ea4d8850b1ece17d1e6ad5c24fdc5d1"),
ArchiveSource("http://xmlsoft.org/sources/libxml2-sources-2.9.10.tar.gz", "9c332062611b88e773d81c070364525c3f0cefa0ecaac902dcedb72e6e44c978"),
ArchiveSource("https://lttng.org/files/urcu/userspace-rcu-latest-0.13.tar.bz2", "cbb20dbe1a892c2a4d8898bac4316176e585392693d498766ccbbc68cf20ba20"),
ArchiveSource("https://github.com/numactl/numactl/releases/download/v2.0.14/numactl-2.0.14.tar.gz", "826bd148c1b6231e1284e42a4db510207747484b112aee25ed6b1078756bcff6"),
ArchiveSource("https://www.openssl.org/source/openssl-1.1.1k.tar.gz", "892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5"),
ArchiveSource("https://github.com/Kitware/CMake/releases/download/v3.21.0/cmake-3.21.0.tar.gz", "4a42d56449a51f4d3809ab4d3b61fd4a96a469e56266e896ce1009b5768bd2ab"),
DirectorySource("./bundled")
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir
for f in ${WORKSPACE}/srcdir/patches/*.patch; do
atomic_patch -p1 ${f}
done
cd popt-1.18/
./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target}
make
make install
cd ../libxml2-2.9.10/
./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target} --without-python
make
make install
cd ../userspace-rcu-0.13.0/
./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target}
make
make install
cd ../numactl-2.0.14/
./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target}
sed -e s/-ffast-math//g -i Makefile
make
make install
cd ../lttng-ust-2.12.2/
./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target} --disable-man-pages --disable-examples
make
make install
cd ../lttng-tools-2.12.4/
./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target} --disable-man-pages
make
make install
cd ../openssl-1.1.1k/
./config --prefix=${prefix}
make
make install
cd ../cmake-3.21.0/
./configure --prefix=${prefix}
make
make install
cd ../msquic/
git submodule update --init --recursive
mkdir build && cd build
giordano marked this conversation as resolved.
Show resolved Hide resolved
/workspace/destdir/bin/cmake -G 'Unix Makefiles' ..
/workspace/destdir/bin/cmake --build .
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
Platform("x86_64", "linux"; libc = "glibc")
]


# The products that we will ensure are always built
products = [
LibraryProduct("liburcu-mb", :userspace_mb),
LibraryProduct("liblttng-ust-fork", :lttng_ust_fork),
LibraryProduct("liblttng-ust", :lttng_ust),
LibraryProduct("libpopt", :popt),
LibraryProduct("liburcu-qsbr", :userspace_qsbr),
LibraryProduct("liblttng-ust-fd", :lttng_ust_fd),
LibraryProduct("liblttng-ust-ctl", :lttng_ust_ctl),
LibraryProduct("liblttng-ust-dl", :lttng_ust_dl),
LibraryProduct("liburcu-bp", :userspace_bp),
LibraryProduct("liburcu-memb", :userspace_memb),
LibraryProduct("liburcu", :userspace),
LibraryProduct("libnuma", :numactl),
LibraryProduct("liburcu-cds", :userspace_cds),
LibraryProduct("liblttng-ust-libc-wrapper", :lttng_ust_libc),
LibraryProduct("libxml2", :xml2),
LibraryProduct("liburcu-common", :userspace_common),
LibraryProduct("liblttng-ust-tracepoint", :lttng_usr_tracepoint),
LibraryProduct("liblttng-ctl", :lttng_ctl),
LibraryProduct("liblttng-ust-pthread-wrapper", :lttng_ust_pthread),
LibraryProduct("liburcu-signal", :userspace_signal)
]

# Dependencies that must be installed before this package can be built
dependencies = Dependency[
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6", preferred_gcc_version = v"10.2.0")
giordano marked this conversation as resolved.
Show resolved Hide resolved
70 changes: 70 additions & 0 deletions M/msquic/bundled/patches/msquic.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
diff --git before/libxml2-2.9.10/include/libxml/xmlversion.h after/libxml2-2.9.10/include/libxml/xmlversion.h
giordano marked this conversation as resolved.
Show resolved Hide resolved
index 6614df6..02c7d48 100644
--- before/libxml2-2.9.10/include/libxml/xmlversion.h
+++ after/libxml2-2.9.10/include/libxml/xmlversion.h
@@ -50,7 +50,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* extra version information, used to show a CVS compilation
*/
-#define LIBXML_VERSION_EXTRA "-GITv2.9.10-rc1-2-ga5bb6aaa2"
+#define LIBXML_VERSION_EXTRA ""

/**
* LIBXML_TEST_VERSION:
@@ -395,7 +395,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the Zlib support is compiled in
*/
-#if 1
+#if 0
#define LIBXML_ZLIB_ENABLED
#endif

@@ -404,7 +404,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the Lzma support is compiled in
*/
-#if 1
+#if 0
#define LIBXML_LZMA_ENABLED
#endif

diff --git before/libxml2-2.9.10/libxml2.spec after/libxml2-2.9.10/libxml2.spec
index dbb0278..b42590d 100644
--- before/libxml2-2.9.10/libxml2.spec
+++ after/libxml2-2.9.10/libxml2.spec
@@ -204,6 +204,6 @@ rm -fr %{buildroot}
%endif # with_python3

%changelog
-* Wed Oct 30 2019 Daniel Veillard <[email protected]>
+* Tue Jul 20 2021 Daniel Veillard <[email protected]>
- upstream release 2.9.10 see http://xmlsoft.org/news.html

diff --git before/libxml2-2.9.10/python/setup.py after/libxml2-2.9.10/python/setup.py
index 651391f..9c6f423 100755
--- before/libxml2-2.9.10/python/setup.py
+++ after/libxml2-2.9.10/python/setup.py
@@ -8,7 +8,7 @@ from distutils.core import setup, Extension
# Below ROOT, we expect to find include, include/libxml2, lib and bin.
# On *nix, it is not needed (but should not harm),
# on Windows, it is set by configure.js.
-ROOT = r'/usr'
+ROOT = r'/workspace/destdir'

# Thread-enabled libxml2
with_threads = 1
diff --git before/msquic/.git/config after/msquic/.git/config
index d660366..ab0da14 100644
--- before/msquic/.git/config
+++ after/msquic/.git/config
@@ -9,3 +9,9 @@
[branch "main"]
remote = origin
merge = refs/heads/main
+[submodule "submodules/googletest"]
+ active = true
+ url = https://github.com/google/googletest
+[submodule "submodules/openssl"]
+ active = true
+ url = https://github.com/quictls/openssl.git