[PATCH 0/6] Update rtags and add rtags related emacs packages.

  • Open
  • quality assurance status badge
Details
2 participants
  • Nicolas Goaziou
  • Malte Frank Gerdes
Owner
unassigned
Submitted by
Malte Frank Gerdes
Severity
normal
M
M
Malte Frank Gerdes wrote on 31 Oct 2020 15:07
(address . guix-patches@gnu.org)
86sg9uzdy9.fsf@gmail.com
This adds company-rtags, flycheck-rtags, helm-rtags, rtags emacs packages
and updates rtags and rct packages.

The rct commit is the one of the git submodule when checking out the v2.38
tag.


Malte


Malte Frank Gerdes (6):
gnu: code: Update RTags to 2.38.
gnu: cpp: Update rct to e706998697b8d48fa9e5b9ab33aeded705129a66.
gnu: Add emacs-rtags.
gnu: Add emacs-flycheck-rtags.
gnu: Add emacs-helm-rtags.
gnu: Add emacs-company-rtags.

gnu/packages/code.scm | 5 +-
gnu/packages/cpp.scm | 9 +-
gnu/packages/emacs-xyz.scm | 88 +++++++++++++++++++
.../patches/rct-add-missing-headers.patch | 53 ++++++-----
gnu/packages/patches/rtags-separate-rct.patch | 52 +++++------
5 files changed, 146 insertions(+), 61 deletions(-)

--
2.29.1
M
M
Malte Frank Gerdes wrote on 31 Oct 2020 15:11
[PATCH 1/6] gnu: code: Update RTags to 2.38.
(address . 44342@debbugs.gnu.org)(name . Malte Frank Gerdes)(address . malte.f.gerdes@gmail.com)
20201031141118.21536-1-malte.f.gerdes@gmail.com
* gnu/packages/code.scm (rtags): Update to 2.38
* gnu/packages/patches/rtags-separate-rct.patch: Adjust patch accordingly.
---
gnu/packages/code.scm | 5 +-
gnu/packages/patches/rtags-separate-rct.patch | 52 +++++++------------
2 files changed, 23 insertions(+), 34 deletions(-)

Toggle diff (114 lines)
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index 4e30dacdf4..15307a1e8b 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -597,7 +598,7 @@ possible to collect coverage information without special compiler switches.")
(define-public rtags
(package
(name "rtags")
- (version "2.18")
+ (version "2.38")
(source
(origin
(method git-fetch)
@@ -619,7 +620,7 @@ possible to collect coverage information without special compiler switches.")
#t)))
(sha256
(base32
- "0raqjbkl1ykga4ahgl9xw49cgh3cyqcf42z36z7d6fz1fw192kg0"))))
+ "1r6l7dgr2ch586zrdi5l8fhdj4qdva8ldz7cjvi2byc2pd2xs8rx"))))
(build-system cmake-build-system)
(arguments
'(#:build-type "RelWithDebInfo"
diff --git a/gnu/packages/patches/rtags-separate-rct.patch b/gnu/packages/patches/rtags-separate-rct.patch
index 533e28b02e..490173eb9b 100644
--- a/gnu/packages/patches/rtags-separate-rct.patch
+++ b/gnu/packages/patches/rtags-separate-rct.patch
@@ -1,21 +1,23 @@
-Unbundle RCT and use our own copy.
-
---- rtags-2.16/src/CMakeLists.txt 2018-01-23 10:36:17.645855140 +0100
-+++ rtags-2.16/src/CMakeLists.txt 2018-01-23 10:38:14.605234740 +0100
-@@ -105,12 +105,6 @@ if (LUA_ENABLED)
- CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 -DCMAKE_GENERATOR=${CMAKE_GENERATOR})
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 50883a7a..741ff275 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -135,14 +135,6 @@ if (EXISTS ${CLANG_COMPILATION_INCLUDE})
+ add_definitions(-DHAVE_CXCOMPILATIONDATABASE)
endif ()
-set(RCT_RTTI_ENABLED 1)
-set(RCT_NO_INSTALL 1)
--set(RCT_NO_LIBRARY 1)
+-set(RCT_STATIC 1)
+-set(RCT_NO_LIBRARY 0)
-# Everyting which as been set either in rct/rct.cmake or rct/compiler.cmake
-# doesn't need to be set in this file again.
-include(rct/rct.cmake)
-
+-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wstrict-aliasing=2 -Wcast-qual -fPIC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wstrict-aliasing=2 -Wcast-qual -fPIC")
-@@ -128,8 +122,7 @@ add_definitions(
+ if (NOT CYGWIN)
+@@ -159,8 +151,7 @@ add_definitions(
"-DRTAGS_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}"
"-DCLANG_LIBDIR=${LIBCLANG_LIBDIR}"
"-DCLANG_VERSION=${LIBCLANG_VERSION_STRING}"
@@ -25,35 +27,21 @@ Unbundle RCT and use our own copy.
if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
add_definitions(-D__LONG_LONG_SUPPORTED)
-@@ -172,8 +165,7 @@ set(RTAGS_SOURCES
- Symbol.cpp
- SymbolInfoJob.cpp
- Token.cpp
-- TokensJob.cpp
-- ${RCT_SOURCES})
-+ TokensJob.cpp)
-
- if (LUA_ENABLED)
- list(APPEND RTAGS_SOURCES AST.cpp)
-@@ -195,10 +187,10 @@ endif ()
+@@ -214,7 +205,7 @@ if (RTAGS_COTIRE)
+ cotire(rtags)
+ endif ()
- include_directories(
- ${CMAKE_CURRENT_LIST_DIR}
-- ${RCT_INCLUDE_DIRS}
- ${CMAKE_CURRENT_LIST_DIR}/selene/include
- ${CMAKE_CURRENT_BINARY_DIR}/lua-prefix/src/lua-build
-- ${CMAKE_CURRENT_LIST_DIR}/lua/src)
-+ ${CMAKE_CURRENT_LIST_DIR}/lua/src
-+ ${CMAKE_CURRENT_BINARY_DIR}/include)
+-include_directories(${CMAKE_CURRENT_LIST_DIR} ${RCT_INCLUDE_DIRS})
++include_directories(${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_BINARY_DIR}/include)
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
set(START_GROUP "")
-@@ -223,17 +215,17 @@ else ()
- endif()
+@@ -237,17 +228,17 @@ endif()
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${RTAGS_BINARY_ROOT_DIR}/bin)
# RCT_LIBRARIES and stdc++ library must be at the end
--set(RTAGS_LIBRARIES ${RTAGS_LIBRARIES} -lstdc++ ${RCT_LIBRARIES})
-+set(RTAGS_LIBRARIES ${RTAGS_LIBRARIES} -lstdc++)
+-set(RTAGS_LIBRARIES ${RTAGS_LIBRARIES} -lstdc++ ${RCT_LIBRARIES} rct)
++set(RTAGS_LIBRARIES ${RTAGS_LIBRARIES} -lstdc++ rct)
add_executable(rc rc.cpp)
-target_link_libraries(rc ${RTAGS_LIBRARIES})
+target_link_libraries(rc ${RTAGS_LIBRARIES} rct)
--
2.29.1
M
M
Malte Frank Gerdes wrote on 31 Oct 2020 15:11
[PATCH 2/6] gnu: cpp: Update rct to e706998697b8d48fa9e5b9ab33aeded705129a66.
(address . 44342@debbugs.gnu.org)(name . Malte Frank Gerdes)(address . malte.f.gerdes@gmail.com)
20201031141118.21536-2-malte.f.gerdes@gmail.com
* gnu/packages/cpp.scm (rct): Update variable.
* gnu/packages/patches/rct-add-missing-headers.patch: Adjust accordingly.
---
gnu/packages/cpp.scm | 9 ++--
.../patches/rct-add-missing-headers.patch | 53 +++++++++++--------
2 files changed, 35 insertions(+), 27 deletions(-)

Toggle diff (119 lines)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 0e563d9c12..a7f4ae0189 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
;;; Copyright © 2020 Greg Hogan <code@greghogan.com>
+;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -132,8 +133,8 @@ the name of the library itself, which is written in C++.")
(license license:expat)))
(define-public rct
- (let* ((commit "b3e6f41d9844ef64420e628e0c65ed98278a843a")
- (revision "2"))
+ (let* ((commit "e706998697b8d48fa9e5b9ab33aeded705129a66")
+ (revision "0"))
(package
(name "rct")
(version (git-version "0.0.0" revision commit))
@@ -144,13 +145,13 @@ the name of the library itself, which is written in C++.")
(commit commit)))
(sha256
(base32
- "1m2931jacka27ghnpgf1z1plkkr64z0pga4r4zdrfpp2d7xnrdvb"))
+ "029m8kpvlmklg2yk7hrfxvvpxxvvncqyxml534mqhdn9yl40gm0k"))
(patches (search-patches "rct-add-missing-headers.patch"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
'(#:configure-flags
- '("-DWITH_TESTS=ON" ; To run the test suite
+ '("-DRCT_WITH_TESTS=ON" ; To run the test suite
"-DRCT_RTTI_ENABLED=ON")))
(native-inputs
`(("cppunit" ,cppunit)
diff --git a/gnu/packages/patches/rct-add-missing-headers.patch b/gnu/packages/patches/rct-add-missing-headers.patch
index 4d133aa249..099ef8af53 100644
--- a/gnu/packages/patches/rct-add-missing-headers.patch
+++ b/gnu/packages/patches/rct-add-missing-headers.patch
@@ -1,43 +1,50 @@
-From: fis <ybbs.daans@hotmail.com>
-Date: Sat, 20 Jan 2018 07:42:38 +0800
-Subject: [PATCH] rct.cmake: Add missing headers.
-
----
- rct.cmake | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
-
diff --git a/rct.cmake b/rct.cmake
-index 323e7b9..3e0ac6b 100644
+index daaa05a..aa82f9f 100644
--- a/rct.cmake
+++ b/rct.cmake
-@@ -339,7 +339,27 @@ if (NOT RCT_NO_INSTALL)
- rct/Timer.h
- rct/Value.h
- rct/WriteLocker.h
-+ rct/CpuUsage.h
+@@ -336,18 +336,27 @@ if (NOT RCT_NO_INSTALL)
+ rct/Buffer.h
+ rct/Config.h
+ rct/Connection.h
+ rct/DataFile.h
+ rct/Date.h
+ rct/EmbeddedLinkedList.h
+ rct/EventLoop.h
+ rct/FileSystemWatcher.h
+ rct/FinishMessage.h
+ rct/Flags.h
+ rct/Hash.h
+ rct/List.h
+ rct/LinkedList.h
-+ rct/Map.h
-+ rct/MemoryMappedFile.h
+ rct/Log.h
+ rct/Map.h
+ rct/MemoryMonitor.h
+ rct/Message.h
+ rct/MessageQueue.h
+ rct/OnDestruction.h
+ rct/Path.h
+ rct/Plugin.h
+ rct/Point.h
+ rct/Process.h
+ rct/QuitMessage.h
-+ rct/ResponseMessage.h
-+ rct/ScriptEngine.h
+ rct/Rct.h
+ rct/ReadLocker.h
+ rct/ReadWriteLock.h
+@@ -362,6 +371,7 @@ if (NOT RCT_NO_INSTALL)
+ rct/Size.h
+ rct/SocketClient.h
+ rct/SocketServer.h
+ rct/StackBuffer.h
-+ rct/WindowsUnicodeConversion.h
+ rct/StopWatch.h
+ rct/String.h
+ rct/StringTokenizer.h
+@@ -373,5 +383,9 @@ if (NOT RCT_NO_INSTALL)
+ rct/WriteLocker.h
DESTINATION include/rct)
-
+
+ install(FILES
+ json/json.hpp
+ DESTINATION include/rct/json)
+
install(EXPORT "rct" DESTINATION lib/cmake)
endif ()
---
-2.13.6
-
--
2.29.1
M
M
Malte Frank Gerdes wrote on 31 Oct 2020 15:11
[PATCH 4/6] gnu: Add emacs-flycheck-rtags.
(address . 44342@debbugs.gnu.org)(name . Malte Frank Gerdes)(address . malte.f.gerdes@gmail.com)
20201031141118.21536-4-malte.f.gerdes@gmail.com
* gnu/packages/emacs-xyz.scm (emacs-flycheck-rtags): New variable.
---
gnu/packages/emacs-xyz.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 3369bd837f..58ed15d005 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -23072,6 +23072,28 @@ Google guidelines.")
(home-page "https://github.com/flycheck/flycheck-google-cpplint")
(license license:gpl3+))))
+(define-public emacs-flycheck-rtags
+ (package
+ (name "emacs-flycheck-rtags")
+ (version "20191222.920")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://melpa.org/packages/flycheck-rtags-"
+ version ".el"))
+ (sha256
+ (base32
+ "1cxj251fc7f910wqj1prdjq5zgx7n0zx4bw8m2kf267pxcimb828"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("flycheck" ,emacs-flycheck)
+ ("rtags" ,emacs-rtags)))
+ (home-page "https://github.com/Andersbakken/rtags")
+ (synopsis "Flycheck backend for RTags")
+ (description "@code{emacs-flycheck-rtags} integrates RTags, a Client/Server
+Indexer for C/C++/ObjC/ObjC++ into Flycheck.")
+ (license license:gpl3)))
+
(define-public emacs-helm-fish-completion
(package
(name "emacs-helm-fish-completion")
--
2.29.1
M
M
Malte Frank Gerdes wrote on 31 Oct 2020 15:11
[PATCH 3/6] gnu: Add emacs-rtags.
(address . 44342@debbugs.gnu.org)(name . Malte Frank Gerdes)(address . malte.f.gerdes@gmail.com)
20201031141118.21536-3-malte.f.gerdes@gmail.com
* gnu/packages/emacs-xyz.scm (emacs-rtags): New variable.
---
gnu/packages/emacs-xyz.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 7dba5c50b8..3369bd837f 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -82,6 +82,7 @@
;;; Copyright © 2020 Marco Grassi <marco.au.grassi98@protonmail.com>
;;; Copyright © 2020 Tomás Ortín Fernández <tomasortin@mailbox.org>
;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
+;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -25161,3 +25162,24 @@ the TypeScript implementation.")
(description "This package provides an Emacs client for the Rocket.chat
service.")
(license license:expat))))
+
+(define-public emacs-rtags
+ (package
+ (name "emacs-rtags")
+ (version "20201008.1707")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://melpa.org/packages/rtags-"
+ version ".el"))
+ (sha256
+ (base32
+ "05bbldla0rwnal3q97a36vhm2jlq659w293n5b5j109my4c5qxfn"))))
+ (build-system emacs-build-system)
+ (inputs
+ `(("rtags" ,rtags)))
+ (home-page "https://github.com/Andersbakken/rtags")
+ (synopsis "RTags integration in Emacs")
+ (description "@code{emacs-rtags} integrates RTags, a Client/Server
+Indexer for C/C++/ObjC/ObjC++ into Emacs.")
+ (license license:gpl3)))
--
2.29.1
M
M
Malte Frank Gerdes wrote on 31 Oct 2020 15:11
[PATCH 5/6] gnu: Add emacs-helm-rtags.
(address . 44342@debbugs.gnu.org)(name . Malte Frank Gerdes)(address . malte.f.gerdes@gmail.com)
20201031141118.21536-5-malte.f.gerdes@gmail.com
* gnu/packages/emacs-xyz.scm (emacs-helm-rtags): New variable.
---
gnu/packages/emacs-xyz.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 58ed15d005..9152cee786 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -23884,6 +23884,28 @@ pattern guessed from thing under current cursor position.
@end itemize\n")
(license license:gpl3+))))
+(define-public emacs-helm-rtags
+ (package
+ (name "emacs-helm-rtags")
+ (version "20191222.920")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://melpa.org/packages/helm-rtags-"
+ version ".el"))
+ (sha256
+ (base32
+ "1ysk07vkyd5dvnnpw6qzsqhlz0k8nj0nr8i3w4sc224pp1pa5lg8"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("helm" ,emacs-helm)
+ ("rtags" ,emacs-rtags)))
+ (home-page "https://github.com/Andersbakken/rtags")
+ (synopsis "Helm backend for RTags")
+ (description "@code{emacs-helm-rtags} integrates RTags, a Client/Server
+Indexer for C/C++/ObjC/ObjC++ into Helm.")
+ (license license:gpl3)))
+
(define-public emacs-helm-selector
(package
(name "emacs-helm-selector")
--
2.29.1
M
M
Malte Frank Gerdes wrote on 31 Oct 2020 15:11
[PATCH 6/6] gnu: Add emacs-company-rtags.
(address . 44342@debbugs.gnu.org)(name . Malte Frank Gerdes)(address . malte.f.gerdes@gmail.com)
20201031141118.21536-6-malte.f.gerdes@gmail.com
* gnu/packages/emacs-xyz.scm (emacs-company-rtags): New variable.
---
gnu/packages/emacs-xyz.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 9152cee786..5fb3fb2b08 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -25072,6 +25072,28 @@ label references and citations in LaTeX. It is based on RefTeX, which is
included with Emacs.")
(license license:gpl3+)))
+(define-public emacs-company-rtags
+ (package
+ (name "emacs-company-rtags")
+ (version "20191222.920")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://melpa.org/packages/company-rtags-"
+ version ".el"))
+ (sha256
+ (base32
+ "0vfg4d7s7zf33938aw8m4pc5bc1bzb96b3w360k8nnhh6xxy54nc"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("company" ,emacs-company)
+ ("rtags" ,emacs-rtags)))
+ (home-page "https://github.com/Andersbakken/rtags")
+ (synopsis "Company backend for RTags")
+ (description "@code{emacs-company-rtags} integrates a RTags Client/Server
+Indexer for C/C++/ObjC/ObjC++ into Company.")
+ (license license:gpl3)))
+
(define-public emacs-html-to-hiccup
;; Package has no release. Version is extracted from "Version:" keyword in
;; main file.
--
2.29.1
N
N
Nicolas Goaziou wrote on 7 Nov 2020 11:03
Re: [bug#44342] [PATCH 2/6] gnu: cpp: Update rct to e706998697b8d48fa9e5b9ab33aeded705129a66.
(name . Malte Frank Gerdes)(address . malte.f.gerdes@gmail.com)(address . 44342@debbugs.gnu.org)
875z6hjxg0.fsf@nicolasgoaziou.fr
Hello,

Malte Frank Gerdes <malte.f.gerdes@gmail.com> writes:

Toggle quote (4 lines)
> * gnu/packages/cpp.scm (rct): Update variable.
> * gnu/packages/patches/rct-add-missing-headers.patch: Adjust
> accordingly.

Thank you.

Toggle quote (5 lines)
> - (let* ((commit "b3e6f41d9844ef64420e628e0c65ed98278a843a")
> - (revision "2"))
> + (let* ((commit "e706998697b8d48fa9e5b9ab33aeded705129a66")
> + (revision "0"))

Why are you resetting revision here? This is going to break version
comparison, isn't it?

Otherwise, LGTM.

Regards,
--
Nicolas Goaziou
N
N
Nicolas Goaziou wrote on 7 Nov 2020 11:41
Re: [bug#44342] [PATCH 4/6] gnu: Add emacs-flycheck-rtags.
(name . Malte Frank Gerdes)(address . malte.f.gerdes@gmail.com)(address . 44342@debbugs.gnu.org)
871rh5jvof.fsf@nicolasgoaziou.fr
Hello,

Malte Frank Gerdes <malte.f.gerdes@gmail.com> writes:

Toggle quote (2 lines)
> * gnu/packages/emacs-xyz.scm (emacs-flycheck-rtags): New variable.

Thank you.

Toggle quote (10 lines)
> +(define-public emacs-flycheck-rtags
> + (package
> + (name "emacs-flycheck-rtags")
> + (version "20191222.920")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "http://melpa.org/packages/flycheck-rtags-"
> + version ".el"))

We don't use MELPA because the files they provide are not reliable
(hash may change over time).

As a consequence, the version should be "2.38".

The same applies to the other packages, I think.

Regards,
--
Nicolas Goaziou
?