diff options
author | bilabila | 2020-01-17 15:21:44 +0800 |
---|---|---|
committer | bilabila | 2020-01-17 15:21:44 +0800 |
commit | 9f5605bf8a6d76f485fa761a61055d07f752d207 (patch) | |
tree | d51fe30d12f756085f4a73149733a60af0212576 | |
parent | 109987b883b3712f025451b00273909d0dc99d63 (diff) | |
download | aur-9f5605bf8a6d76f485fa761a61055d07f752d207.tar.gz |
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | PKGBUILD | 8 | ||||
-rw-r--r-- | lib.patch | 45 |
3 files changed, 17 insertions, 45 deletions
@@ -1,11 +1,12 @@ pkgbase = lua-format-ext pkgdesc = LuaFormatter with extended identifiers - pkgver = 1.3.0 + pkgver = 1.3.3 pkgrel = 1 url = https://github.com/Koihik/LuaFormatter arch = x86_64 license = Apache2 makedepends = antlr4 + makedepends = cmake depends = antlr4-runtime depends = yaml-cpp provides = lua-format-ext @@ -14,13 +15,13 @@ pkgbase = lua-format-ext conflicts = lua-format-ext conflicts = lua-format conflicts = LuaFormatter - source = lua-format-1.3.0::https://github.com/Koihik/LuaFormatter/archive/1.3.0.tar.gz + source = lua-format-1.3.3::https://github.com/Koihik/LuaFormatter/archive/1.3.3.tar.gz source = args-6.2.2::https://github.com/Taywee/args/archive/6.2.2.tar.gz source = lib.patch source = ext.patch - sha512sums = 1ea6183759c71147128caf36c22bcc5108cf0a4604d5c1ff426b91e6debceeb86f5ead87fef4e4de5e6339f2e35a8d2f7d48bd6722ccfd4e356151749b10fa2c + sha512sums = e9dc1ae7f05aac99af66dd61f71c00f2511db96cc65219a9ac9f777196cd688b093f867a0565627cf47f3c0416b1475cd4ecdd2ffcc88048842a5f93bbe5bbdb sha512sums = 29b0f53316fe35f65ab92c807180c1e6cc6084dfed9f635aa2e3e848137ee8e5d24ec6831cf19189c6432335f73d1466564e0bc9bc259c98f3f0de264637f971 - sha512sums = 6c12fd6eae7ea8243216378a392e4bc1a3c2d7a6d16cf89c864c8f6656550e73754542e3068000abfd8ae6cd64af21fe4c2aa353e811fd5d2f94343452c6321b + sha512sums = ccc16949cceb6bb6a0961694921105e80fba3b478cc34d522d57277d5bbedfafeeb2d9638225fcbe9ae8d87cf01696eb22872e88cce078bdcc600bbef3c5efbd sha512sums = 8747d10775b34b8e413263439b1284bd524ef0ef867e3646774cb5ed4dddf008f852b7a2b6f8a6a1492739a7f931d57e6346cb8b65e00542b7aa8d0b868a4ebc pkgname = lua-format-ext @@ -1,7 +1,7 @@ # Maintainer: bilabila <bilabila@qq.com> _src=LuaFormatter _pkg=lua-format -_pkgver=1.3.0 +_pkgver=1.3.3 _lib=args _libver=6.2.2 _patch=lib.patch @@ -15,15 +15,15 @@ provides=($_pkg-ext $_pkg $_src) conflicts=($_pkg-ext $_pkg $_src) license=(Apache2) depends=(antlr4-runtime yaml-cpp) -makedepends=(antlr4) +makedepends=(antlr4 cmake) source=($_pkg-$pkgver::https://github.com/Koihik/$_src/archive/$_pkgver.tar.gz $_lib-$_libver::https://github.com/Taywee/$_lib/archive/$_libver.tar.gz $_patch ext.patch ) -sha512sums=(1ea6183759c71147128caf36c22bcc5108cf0a4604d5c1ff426b91e6debceeb86f5ead87fef4e4de5e6339f2e35a8d2f7d48bd6722ccfd4e356151749b10fa2c +sha512sums=(e9dc1ae7f05aac99af66dd61f71c00f2511db96cc65219a9ac9f777196cd688b093f867a0565627cf47f3c0416b1475cd4ecdd2ffcc88048842a5f93bbe5bbdb 29b0f53316fe35f65ab92c807180c1e6cc6084dfed9f635aa2e3e848137ee8e5d24ec6831cf19189c6432335f73d1466564e0bc9bc259c98f3f0de264637f971 - 6c12fd6eae7ea8243216378a392e4bc1a3c2d7a6d16cf89c864c8f6656550e73754542e3068000abfd8ae6cd64af21fe4c2aa353e811fd5d2f94343452c6321b + ccc16949cceb6bb6a0961694921105e80fba3b478cc34d522d57277d5bbedfafeeb2d9638225fcbe9ae8d87cf01696eb22872e88cce078bdcc600bbef3c5efbd 8747d10775b34b8e413263439b1284bd524ef0ef867e3646774cb5ed4dddf008f852b7a2b6f8a6a1492739a7f931d57e6346cb8b65e00542b7aa8d0b868a4ebc ) _src=$_src-$pkgver diff --git a/lib.patch b/lib.patch index 638bc3d5d147..b73a33d87199 100644 --- a/lib.patch +++ b/lib.patch @@ -1,36 +1,36 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 25c7bc7..b4dac53 100644 +index 71ac4a5..d4a3727 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -44,8 +44,7 @@ endif() +@@ -44,9 +44,7 @@ endif() include_directories( ${PROJECT_SOURCE_DIR}/generated/ ${PROJECT_SOURCE_DIR}/third_party/ +- ${PROJECT_SOURCE_DIR}/third_party/Catch2/single_include - ${PROJECT_SOURCE_DIR}/third_party/yaml-cpp/include - ${PROJECT_SOURCE_DIR}/third_party/antlr4/runtime/Cpp/runtime/src + /usr/include/antlr4-runtime ${PROJECT_SOURCE_DIR}/src/ ) -@@ -59,17 +58,6 @@ set(src_dir +@@ -60,16 +58,6 @@ set(src_dir ${PROJECT_SOURCE_DIR}/generated/LuaBaseVisitor.cpp ) --file(GLOB_RECURSE antlr4-cpp-src +-file(GLOB_RECURSE antlr4-cpp-src - ${PROJECT_SOURCE_DIR}/third_party/antlr4/runtime/Cpp/runtime/src/*.cpp -) - --file(GLOB_RECURSE yaml-cpp-src +-file(GLOB_RECURSE yaml-cpp-src - ${PROJECT_SOURCE_DIR}/third_party/yaml-cpp/src/*.cpp -) - -add_library (antlr4-cpp-runtime ${antlr4-cpp-src}) -add_library (yaml-cpp ${yaml-cpp-src}) -- + add_executable(lua-format ${src_dir} src/main.cpp) - if(WIN32) -@@ -79,7 +67,7 @@ endif() +@@ -80,7 +68,7 @@ endif() set_target_properties(lua-format PROPERTIES LINKER_LANGUAGE CXX) @@ -39,32 +39,3 @@ index 25c7bc7..b4dac53 100644 install(TARGETS lua-format RUNTIME DESTINATION bin -diff --git a/src/main.cpp b/src/main.cpp -index e7b9f36..f0a7f45 100644 ---- a/src/main.cpp -+++ b/src/main.cpp -@@ -49,6 +49,24 @@ int main(int argc, const char* argv[]) { - if (candidate.filename() == ".lua-format") configFileName = candidate.string(); - } - } -+ // try xdg config -+ if (configFileName.empty()) { -+ char* substitute = getenv("XDG_CONFIG_HOME"); -+ if (substitute == NULL) { -+ substitute = getenv("HOME"); -+ if (substitute != NULL) { -+ configFileName = string(substitute) + "/.config"; -+ } -+ } else { -+ configFileName = string(substitute); -+ } -+ if (!configFileName.empty()) { -+ configFileName = configFileName + "/lua-format/config"; -+ if (!fs::exists(configFileName)) { -+ configFileName = ""; -+ } -+ } -+ } - - if (configFileName.empty()) { - if (verbose) cerr << "using default configuration" << endl; |