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

mesonlsp: init at 4.1.8 #19733

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 7 additions & 0 deletions packages/libpkgconf/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://github.com/pkgconf/pkgconf
TERMUX_PKG_DESCRIPTION="Package compiler and linker metadata toolkit"
TERMUX_PKG_LICENSE="ISC"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.3.0
TERMUX_PKG_SRCURL=https://distfiles.ariadne.space/pkgconf/pkgconf-$TERMUX_PKG_VERSION.tar.xz
TERMUX_PKG_SHA256=3a9080ac51d03615e7c1910a0a2a8df08424892b5f13b0628a204d3fcce0ea8b
7 changes: 7 additions & 0 deletions packages/libpkgconf/pkgconf.subpackage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
TERMUX_SUBPKG_DESCRIPTION="Package compiler and linker metadata toolkit"
TERMUX_SUBPKG_INCLUDE="
bin/
share/aclocal
share/man
share/doc/pkgconf
"
11 changes: 11 additions & 0 deletions packages/mesonlsp/0001-no-clock_cast.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/src/libanalyze/subprojects/subprojectstate.cpp
+++ b/src/libanalyze/subprojects/subprojectstate.cpp
@@ -190,7 +190,7 @@
return hash(url + "//" + revision);
}
makeDefault:
-#ifdef __linux__
+#if defined(__linux__) && !defined(__ANDROID__)
auto ftime = std::filesystem::last_write_time(path);
const auto systemTime =
std::chrono::clock_cast<std::chrono::system_clock>(ftime);
11 changes: 11 additions & 0 deletions packages/mesonlsp/0002-libcxathrow-libcxx.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/src/libcxathrow/shared.cpp
+++ b/src/libcxathrow/shared.cpp
@@ -18,7 +18,7 @@
if (demangled) {
free(demangled);
}
-#ifndef __APPLE__
+#ifndef _LIBCPP_VERSION
const auto *exc =
dynamic_cast<const abi::__class_type_info *>(&typeid(std::exception));
const auto *cti = dynamic_cast<const abi::__class_type_info *>(typeinfo);
38 changes: 38 additions & 0 deletions packages/mesonlsp/0003-do-not-use-keyword-new.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
--- a/subprojects/muon.wrap
+++ b/subprojects/muon.wrap
@@ -1,3 +1,5 @@
[wrap-git]
url = https://github.com/JCWasmx86/muon
-revision = HEAD
\ No newline at end of file
+revision = HEAD
+
+diff_files = patches/muon-keyword-new.patch
--- /dev/null
+++ b/subprojects/packagefiles/patches/muon-keyword-new.patch
@@ -0,0 +1,25 @@
+--- a/include/compilers.h
++++ b/include/compilers.h
+@@ -176,7 +176,7 @@
+ bool s_to_compiler_language(const char *s, enum compiler_language *l);
+ bool filename_to_compiler_language(const char *str, enum compiler_language *l);
+ const char *compiler_language_extension(enum compiler_language l);
+-enum compiler_language coalesce_link_languages(enum compiler_language cur, enum compiler_language new);
++enum compiler_language coalesce_link_languages(enum compiler_language cur, enum compiler_language new_);
+
+ bool toolchain_detect(struct workspace *wk, obj *comp, enum compiler_language lang);
+ void compilers_init(void);
+--- a/src/compilers.c
++++ b/src/compilers.c
+@@ -148,9 +148,9 @@
+ }
+
+ enum compiler_language
+-coalesce_link_languages(enum compiler_language cur, enum compiler_language new)
++coalesce_link_languages(enum compiler_language cur, enum compiler_language new_)
+ {
+- switch (new) {
++ switch (new_) {
+ case compiler_language_null:
+ case compiler_language_c_hdr:
+ case compiler_language_cpp_hdr:
17 changes: 17 additions & 0 deletions packages/mesonlsp/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
TERMUX_PKG_HOMEPAGE=https://github.com/JCWasmx86/mesonlsp
TERMUX_PKG_DESCRIPTION="an unofficial, unendorsed language server for meson written in C++"
TERMUX_PKG_LICENSE="GPL-3.0-or-later"
TERMUX_PKG_LICENSE_FILE="COPYING"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=4.1.8
TERMUX_PKG_SRCURL="https://github.com/JCWasmx86/mesonlsp/archive/v$TERMUX_PKG_VERSION.tar.gz"
TERMUX_PKG_DEPENDS="libandroid-execinfo, libarchive, libc++, libcurl, libpkgconf, libuuid"
TERMUX_PKG_SHA256=e1fa0aab7367df83ab09778cb7ee53d45e8e08121a0ea1798f66bd69b76a8334
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-Dbenchmarks=false
"

termux_step_pre_configure() {
LDFLAGS+=" -landroid-execinfo"
}