diff options
author | Florian Maunier | 2021-10-14 10:09:36 +0200 |
---|---|---|
committer | Florian Maunier | 2021-10-14 10:09:36 +0200 |
commit | b1a59c7b0a504d66bbd786e553e3cb4ac238b15b (patch) | |
tree | 8106da93b9a852786c8d1812176a1c4275483d81 | |
download | aur-b1a59c7b0a504d66bbd786e553e3cb4ac238b15b.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | PKGBUILD | 45 | ||||
-rw-r--r-- | cmake_args.patch | 114 |
4 files changed, 187 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1b11db4e3a58 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = msquic-release-git + pkgdesc = MsQuic is a Microsoft implementation of the IETF QUIC protocol. + pkgver = 1.1.8.r0.g794436f54 + pkgrel = 1 + url = https://github.com/microsoft/msquic + arch = any + license = MIT + makedepends = cmake + makedepends = dotnet-sdk + makedepends = git + depends = lttng-ust + provides = msquic + provides = libmsquic.so + conflicts = msquic + conflicts = libmsquic.so + source = msquic-release-git::git+https://github.com/microsoft/msquic.git#branch=release/1.1 + source = cmake_args.patch + sha512sums = SKIP + sha512sums = f0eb23f885b9577f93101f9e68c6863dc896086068d3ed29e7b6924a1286ab8aa478feec42cf0fa3cfee2e5e2fb42e5be3f15451ff0954c4db2059de6ebe7c27 + +pkgname = msquic-release-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..e52cd478fbf3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +*.tar.gz +*.tar.bz2 +*.tar.xz +*.tar.zst +pkg/ +src/ +.AURINFO diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..390cd4b86c41 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Florian Maunier <fmauneko@dissidence.ovh> +pkgname=msquic-release-git +pkgver=1.1.8.r0.g794436f54 +pkgrel=1 +pkgdesc="MsQuic is a Microsoft implementation of the IETF QUIC protocol." +arch=('any') +url="https://github.com/microsoft/msquic" +license=('MIT') +depends=('lttng-ust') +makedepends=('cmake' 'dotnet-sdk' 'git') +provides=('msquic' 'libmsquic.so') +conflicts=('msquic' 'libmsquic.so') +source=("$pkgname::git+https://github.com/microsoft/msquic.git#branch=release/1.1" + 'cmake_args.patch') +sha512sums=('SKIP' + 'f0eb23f885b9577f93101f9e68c6863dc896086068d3ed29e7b6924a1286ab8aa478feec42cf0fa3cfee2e5e2fb42e5be3f15451ff0954c4db2059de6ebe7c27') + +pkgver() { + cd "$pkgname" + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "$pkgname" + git submodule update --init --recursive --depth=1 + patch -p1 -i "$srcdir/cmake_args.patch" +} + +build() { + cmake \ + -B "$pkgname/build" \ + -S "$pkgname" \ + -DCMAKE_BUILD_TYPE:STRING='Release' \ + -DCMAKE_INSTALL_PREFIX:PATH='/usr' \ + -DCMAKE_SKIP_INSTALL_RPATH:BOOL='YES' \ + -DQUIC_BUILD_TOOLS:BOOL='NO' \ + -DQUIC_BUILD_TEST:BOOL='NO' \ + -Wno-dev + make -C "$pkgname/build" all +} + +package() { + make -C "$pkgname/build" DESTDIR="$pkgdir/" install + install -D -m644 "$pkgname/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname" +} diff --git a/cmake_args.patch b/cmake_args.patch new file mode 100644 index 000000000000..d69d5ed4ae79 --- /dev/null +++ b/cmake_args.patch @@ -0,0 +1,114 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 374b67a..e2b7795 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -97,9 +97,9 @@ else() + #set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/msquic/lib") + endif("${isSystemDir}" STREQUAL "-1") + +- set(msquic_dest msquic) +- set(main_lib_dest msquic/lib) +- set(include_dest msquic/include) ++ set(msquic_dest ${CMAKE_INSTALL_PREFIX}) ++ set(main_lib_dest lib) ++ set(include_dest include) + endif() + + set(FILENAME_DEP_REPLACE "get_filename_component(SELF_DIR \"$\{CMAKE_CURRENT_LIST_FILE\}\" PATH)") +@@ -336,11 +336,11 @@ else() + set(CMAKE_C_FLAGS_DEBUG "-Og -ggdb3") + set(CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "-Ofast ${MARCH} -ggdb3 -DNDEBUG") +- set(CMAKE_C_FLAGS_RELEASE "-Ofast ${MARCH} -DNDEBUG") ++ #set(CMAKE_C_FLAGS_RELEASE "-Ofast ${MARCH} -DNDEBUG") + set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) + set(CMAKE_CXX_FLAGS_MINSIZEREL ${CMAKE_C_FLAGS_MINSIZEREL}) + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO}) +- set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}) ++ #set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}) + + list(APPEND QUIC_COMMON_FLAGS -fms-extensions -fPIC) + if (CX_PLATFORM STREQUAL "darwin") +@@ -501,7 +501,7 @@ if(QUIC_TLS STREQUAL "openssl") + list(APPEND OPENSSL_CONFIG_FLAGS -latomic) + else() + set(OPENSSL_CONFIG_CMD ${CMAKE_CURRENT_SOURCE_DIR}/submodules/openssl/config +- CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER}) ++ CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=${CMAKE_C_FLAGS} CXXFLAGS=${CMAKE_CXX_FLAGS} LDFLAGS=${CMAKE_SHARED_LINKER_FLAGS}) + endif() + add_custom_target(mkdir_openssl_build + COMMAND mkdir -p ${QUIC_BUILD_DIR}/submodules/openssl) +diff --git a/src/bin/CMakeLists.txt b/src/bin/CMakeLists.txt +index a59bb9e..bae4408 100644 +--- a/src/bin/CMakeLists.txt ++++ b/src/bin/CMakeLists.txt +@@ -2,9 +2,9 @@ + # Licensed under the MIT License. + + if(WIN32) +- set(SOURCES winuser/dllmain.c winuser/msquic.rc $<TARGET_OBJECTS:MsQuicEtw_Resource>) ++ set(SOURCES winuser/dllmain.c winuser/msquic.rc $<TARGET_OBJECTS:MsQuicEtw_Resource>) + else() +- set(SOURCES linux/init.c) ++ set(SOURCES linux/init.c) + endif() + + add_library(msquic SHARED ${SOURCES}) +@@ -14,31 +14,39 @@ set_property(TARGET msquic PROPERTY FOLDER "libraries") + target_link_libraries(msquic PRIVATE core platform inc warnings logging) + + if(WIN32) +- if(QUIC_UWP_BUILD) +- target_link_libraries(msquic PUBLIC OneCoreUAP) +- endif() +- SET_TARGET_PROPERTIES(msquic +- PROPERTIES LINK_FLAGS "/DEF:\"${CMAKE_CURRENT_SOURCE_DIR}/winuser/msquic.def\"") ++ if(QUIC_UWP_BUILD) ++ target_link_libraries(msquic PUBLIC OneCoreUAP) ++ endif() ++ set_target_properties( ++ msquic ++ PROPERTIES LINK_FLAGS "/DEF:\"${CMAKE_CURRENT_SOURCE_DIR}/winuser/msquic.def\"" ++ ) + else() +- SET_TARGET_PROPERTIES(msquic +- PROPERTIES LINK_FLAGS "-Wl,--version-script=\"${CMAKE_CURRENT_SOURCE_DIR}/linux/exports.txt\"") ++ set_target_properties( ++ msquic ++ PROPERTIES LINK_FLAGS "-Wl,--version-script=\"${CMAKE_CURRENT_SOURCE_DIR}/linux/exports.txt\"" ++ ) + endif() + +-target_include_directories(msquic PUBLIC +- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../inc> +- $<INSTALL_INTERFACE:${include_dest}>) ++target_include_directories( ++ msquic PUBLIC ++ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../inc> ++ $<INSTALL_INTERFACE:${include_dest}> ++) + +-set(PUBLIC_HEADERS +- ../inc/msquic.h +- ../inc/msquic_winuser.h +- ../inc/msquic_linux.h +- ../inc/quic_sal_stub.h) ++set( ++ PUBLIC_HEADERS ++ ../inc/msquic.h ++ ../inc/msquic_winuser.h ++ ../inc/msquic_linux.h ++ ../inc/quic_sal_stub.h ++) + + install(TARGETS msquic EXPORT msquic DESTINATION "${main_lib_dest}") + install(FILES ${PUBLIC_HEADERS} DESTINATION "${include_dest}") + +-configure_file(msquic-config.cmake.in ${CMAKE_BINARY_DIR}/msquic-config.cmake) ++#configure_file(msquic-config.cmake.in ${CMAKE_BINARY_DIR}/msquic-config.cmake) + +-install(FILES ${CMAKE_BINARY_DIR}/msquic-config.cmake DESTINATION ${msquic_dest}) ++#install(FILES ${CMAKE_BINARY_DIR}/msquic-config.cmake DESTINATION ${msquic_dest}) + +-install(EXPORT msquic DESTINATION ${msquic_dest}) ++#install(EXPORT msquic DESTINATION ${msquic_dest}) |