all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Fis Trivial <ybbs.daans@hotmail.com>
Cc: "30200-done@debbugs.gnu.org" <30200@debbugs.gnu.org>
Subject: [bug#30200] [PATCH 2/2] gnu: rtags: Fix the bundling issue.
Date: Tue, 23 Jan 2018 10:43:28 +0100	[thread overview]
Message-ID: <87po607vwf.fsf@gnu.org> (raw)
In-Reply-To: <MWHPR16MB0063000E6D4E6B034D3F773692ED0@MWHPR16MB0063.namprd16.prod.outlook.com> (Fis Trivial's message of "Sun, 21 Jan 2018 19:32:56 +0000")

[-- Attachment #1: Type: text/plain, Size: 560 bytes --]

Fis Trivial <ybbs.daans@hotmail.com> skribis:

> * gnu/packages/patches/rtags-separate-rct.patch: New file.
> * gnu/packages/code.scm (rtags): Dependencies no longer bundled.
> [source]: Use tar ball release.
> 	  Use the patch to link rct.
> 	  Substitute corresponding headers.
> [native-inputs]: Add new dependencies.
> [inputs]: Likewise.

I slightly tweaked the commit message, but overall it was good.  :-)

I applied the changes below, mostly to clarify the patch by removing
lines instead of commenting them out.

Thanks!

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 4596 bytes --]

diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index 5d2d176eb..a26768862 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -27,7 +27,6 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module ((guix licenses) #:prefix license:)
-  #:use-module (guix build utils)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
   #:use-module (gnu packages)
@@ -408,6 +407,7 @@ functionality such as HTML output.")
         ;; Part of spliting rct with rtags.
         ;; Substitute #include "rct/header.h" with #include <rct/header.h>.
         '(with-directory-excursion "src"
+           (delete-file-recursively "rct")        ;remove bundled copy
            (let ((files (find-files "." ".*\\.cpp|.*\\.h")))
              (substitute* files
                (("#include ?\"rct/(.*.h)\"" all header)
diff --git a/gnu/packages/patches/rtags-separate-rct.patch b/gnu/packages/patches/rtags-separate-rct.patch
index b2e496d8c..533e28b02 100644
--- a/gnu/packages/patches/rtags-separate-rct.patch
+++ b/gnu/packages/patches/rtags-separate-rct.patch
@@ -1,92 +1,72 @@
-From: fis <ybbs.daans@hotmail.com>
-Date: Sat, 20 Jan 2018 08:55:00 +0800
-Subject: [PATCH] src/CMakelists.txt: Fix include and link rct.
+Unbundle RCT and use our own copy.
 
----
- src/CMakeLists.txt | 31 +++++++++++++++++--------------
- 1 file changed, 17 insertions(+), 14 deletions(-)
-
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index ff4f11f0..e4838e0a 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -105,12 +105,13 @@ if (LUA_ENABLED)
+--- 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})
  endif ()
-
+ 
 -set(RCT_RTTI_ENABLED 1)
 -set(RCT_NO_INSTALL 1)
 -set(RCT_NO_LIBRARY 1)
-+# set(RCT_RTTI_ENABLED 1)
-+# set(RCT_NO_INSTALL 1)
-+# set(RCT_NO_LIBRARY 1)
-+
- # Everyting which as been set either in rct/rct.cmake or rct/compiler.cmake
- # doesn't need to be set in this file again.
+-# 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)
-+# 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 +129,8 @@ add_definitions(
+@@ -128,8 +122,7 @@ add_definitions(
      "-DRTAGS_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}"
      "-DCLANG_LIBDIR=${LIBCLANG_LIBDIR}"
      "-DCLANG_VERSION=${LIBCLANG_VERSION_STRING}"
 -    "-DOS_${CMAKE_SYSTEM_NAME}"
 -    ${RCT_DEFINITIONS})
 +    "-DOS_${CMAKE_SYSTEM_NAME}")
-+  # ${RCT_DEFINITIONS})
-
+ 
  if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
      add_definitions(-D__LONG_LONG_SUPPORTED)
-@@ -172,8 +173,8 @@ set(RTAGS_SOURCES
+@@ -172,8 +165,7 @@ set(RTAGS_SOURCES
      Symbol.cpp
      SymbolInfoJob.cpp
      Token.cpp
 -    TokensJob.cpp
 -    ${RCT_SOURCES})
 +    TokensJob.cpp)
-+    # ${RCT_SOURCES})
-
+ 
  if (LUA_ENABLED)
      list(APPEND RTAGS_SOURCES AST.cpp)
-@@ -195,10 +196,11 @@ endif ()
-
+@@ -195,10 +187,10 @@ endif ()
+ 
  include_directories(
      ${CMAKE_CURRENT_LIST_DIR}
 -    ${RCT_INCLUDE_DIRS}
-+    # ${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)
-
+ 
  if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
      set(START_GROUP "")
-@@ -223,17 +225,18 @@ else ()
+@@ -223,17 +215,17 @@ else ()
  endif()
-
+ 
  # RCT_LIBRARIES and stdc++ library must be at the end
 -set(RTAGS_LIBRARIES ${RTAGS_LIBRARIES} -lstdc++ ${RCT_LIBRARIES})
-+# set(RTAGS_LIBRARIES ${RTAGS_LIBRARIES} -lstdc++ ${RCT_LIBRARIES})
 +set(RTAGS_LIBRARIES ${RTAGS_LIBRARIES} -lstdc++)
  add_executable(rc rc.cpp)
 -target_link_libraries(rc ${RTAGS_LIBRARIES})
 +target_link_libraries(rc ${RTAGS_LIBRARIES} rct)
-
+ 
  add_executable(rdm rdm.cpp)
 -target_link_libraries(rdm ${RTAGS_LIBRARIES})
 +target_link_libraries(rdm ${RTAGS_LIBRARIES} rct)
-
+ 
  set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
-
+ 
  add_executable(rp rp.cpp)
 -target_link_libraries(rp ${RTAGS_LIBRARIES})
 +target_link_libraries(rp ${RTAGS_LIBRARIES} rct)
-
+ 
  if (CYGWIN)
      EnsureLibraries(rdm rct)
---
-2.13.6
-

      reply	other threads:[~2018-01-23  9:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-21 19:27 [bug#30200] [PATCH 0/2] gnu: Fix bundling in rtags, and change rct to do that Fis Trivial
2018-01-21 19:31 ` [bug#30200] [PATCH 1/2] gnu: rct: Add missing headers, enable RTTI Fis Trivial
2018-01-23  9:29   ` Ludovic Courtès
2018-01-21 19:32 ` [bug#30200] [PATCH 2/2] gnu: rtags: Fix the bundling issue Fis Trivial
2018-01-23  9:43   ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87po607vwf.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=30200@debbugs.gnu.org \
    --cc=ybbs.daans@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.