From 9249740b7e59c27ebb204317e2ffb32d48d2b81e Mon Sep 17 00:00:00 2001 From: "Wu, Zhenyu" Date: Wed, 3 Apr 2024 15:18:29 +0800 Subject: [PATCH 1/2] mesonlsp: init at 4.1.8 Fix #19630 --- packages/mesonlsp/0001-no-clock_cast.patch | 11 ++++++ .../mesonlsp/0002-libcxathrow-libcxx.patch | 11 ++++++ .../0003-do-not-use-keyword-new.patch | 38 +++++++++++++++++++ packages/mesonlsp/build.sh | 17 +++++++++ 4 files changed, 77 insertions(+) create mode 100644 packages/mesonlsp/0001-no-clock_cast.patch create mode 100644 packages/mesonlsp/0002-libcxathrow-libcxx.patch create mode 100644 packages/mesonlsp/0003-do-not-use-keyword-new.patch create mode 100644 packages/mesonlsp/build.sh diff --git a/packages/mesonlsp/0001-no-clock_cast.patch b/packages/mesonlsp/0001-no-clock_cast.patch new file mode 100644 index 00000000000000..2ad6f25f36f959 --- /dev/null +++ b/packages/mesonlsp/0001-no-clock_cast.patch @@ -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(ftime); diff --git a/packages/mesonlsp/0002-libcxathrow-libcxx.patch b/packages/mesonlsp/0002-libcxathrow-libcxx.patch new file mode 100644 index 00000000000000..f9b46e49695156 --- /dev/null +++ b/packages/mesonlsp/0002-libcxathrow-libcxx.patch @@ -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(&typeid(std::exception)); + const auto *cti = dynamic_cast(typeinfo); diff --git a/packages/mesonlsp/0003-do-not-use-keyword-new.patch b/packages/mesonlsp/0003-do-not-use-keyword-new.patch new file mode 100644 index 00000000000000..1b88fb0274c26f --- /dev/null +++ b/packages/mesonlsp/0003-do-not-use-keyword-new.patch @@ -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: diff --git a/packages/mesonlsp/build.sh b/packages/mesonlsp/build.sh new file mode 100644 index 00000000000000..6f81188277d3a0 --- /dev/null +++ b/packages/mesonlsp/build.sh @@ -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" +} From 69b0ecad7797cbba1b41a962a0b27de85907492c Mon Sep 17 00:00:00 2001 From: Chongyun Lee <45286352+licy183@users.noreply.github.com> Date: Tue, 22 Oct 2024 21:12:54 +0800 Subject: [PATCH 2/2] new package: libpkgconf --- packages/libpkgconf/build.sh | 7 +++++++ packages/libpkgconf/pkgconf.subpackage.sh | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 packages/libpkgconf/build.sh create mode 100644 packages/libpkgconf/pkgconf.subpackage.sh diff --git a/packages/libpkgconf/build.sh b/packages/libpkgconf/build.sh new file mode 100644 index 00000000000000..7b5409a577f66c --- /dev/null +++ b/packages/libpkgconf/build.sh @@ -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 diff --git a/packages/libpkgconf/pkgconf.subpackage.sh b/packages/libpkgconf/pkgconf.subpackage.sh new file mode 100644 index 00000000000000..7f4d95d95bceb9 --- /dev/null +++ b/packages/libpkgconf/pkgconf.subpackage.sh @@ -0,0 +1,7 @@ +TERMUX_SUBPKG_DESCRIPTION="Package compiler and linker metadata toolkit" +TERMUX_SUBPKG_INCLUDE=" +bin/ +share/aclocal +share/man +share/doc/pkgconf +" \ No newline at end of file