diff --git a/debian/TODO b/debian/TODO index bd553bd1..84fd630c 100644 --- a/debian/TODO +++ b/debian/TODO @@ -8,7 +8,6 @@ * bootstrap of clang with itself -* in the control, use variable instead of hardcoded 3.2 - * update of the soname +* man page for clang-format \ No newline at end of file diff --git a/debian/changelog b/debian/changelog index 68694d95..498aa06c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,10 @@ llvm-toolchain-3.3 (1:3.3~+rc3-1~exp2) UNRELEASED; urgency=low * Print the lldb test failures * Create the compiler-rt directory for unsupported platforms * Fix the FTBFS under HURD (hurd-endian.diff) + * Introduce the clang-format-X.Y package + * Install the vim llvm script at the right place - -- + -- Sylvestre Ledru Thu, 06 Jun 2013 14:28:41 +0200 llvm-toolchain-3.3 (1:3.3~+rc3-1~exp1) experimental; urgency=low diff --git a/debian/clang-format-3.3.install b/debian/clang-format-3.3.install new file mode 100644 index 00000000..4ef29a82 --- /dev/null +++ b/debian/clang-format-3.3.install @@ -0,0 +1,4 @@ +clang/tools/clang-format/clang-format-3.3.py usr/share/vim/addons/syntax/ +clang/tools/clang-format/clang-format-diff-3.3 /usr/bin/ +clang/tools/clang-format/clang-format.el usr/share/emacs/site-lisp/clang-format-3.3/ +usr/bin/clang-format-3.3 diff --git a/debian/control b/debian/control index 3acaf6e1..1a1e9f1c 100644 --- a/debian/control +++ b/debian/control @@ -50,6 +50,20 @@ Description: C, C++ and Objective-C compiler (LLVM based) * A single unified parser for C, Objective C, C++, and Objective C++ * Conformance with C/C++/ObjC and their variants +Package: clang-format-3.3 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Replaces: clang-format-3.4 +Breaks: clang-format-3.4 +Description: Tool to format C/C++/Obj-C code + Clang-format is both a library and a stand-alone tool with the goal of automatically reformatting C++ + sources files according to configurable style guides. To do so, clang-format uses Clang's Lexer to + transform an input file into a token stream and then changes all the whitespace around those tokens. The + goal is for clang-format to both serve both as a user tool (ideally with powerful IDE integrations) and + part of other refactoring tools, e.g. to do a reformatting of all the lines changed during a renaming. + . + This package also provides vim and emacs plugins. + Package: clang-3.3-doc Architecture: all Section: doc diff --git a/debian/patches/clang-format-version.diff b/debian/patches/clang-format-version.diff new file mode 100644 index 00000000..4731441e --- /dev/null +++ b/debian/patches/clang-format-version.diff @@ -0,0 +1,39 @@ +Index: llvm-toolchain-3.3-3.3~+rc3/clang/tools/clang-format/clang-format.py +=================================================================== +--- llvm-toolchain-3.3-3.3~+rc3.orig/clang/tools/clang-format/clang-format.py 2013-04-09 17:23:04.000000000 +0200 ++++ llvm-toolchain-3.3-3.3~+rc3/clang/tools/clang-format/clang-format.py 2013-06-06 15:39:16.284119121 +0200 +@@ -21,7 +21,7 @@ + import subprocess + + # Change this to the full path if clang-format is not on the path. +-binary = 'clang-format' ++binary = 'clang-format-3.3' + + # Change this to format according to other formatting styles (see + # clang-format -help) +Index: llvm-toolchain-3.3-3.3~+rc3/clang/tools/clang-format/clang-format-diff.py +=================================================================== +--- llvm-toolchain-3.3-3.3~+rc3.orig/clang/tools/clang-format/clang-format-diff.py 2013-04-17 09:55:02.000000000 +0200 ++++ llvm-toolchain-3.3-3.3~+rc3/clang/tools/clang-format/clang-format-diff.py 2013-06-06 15:39:50.820117303 +0200 +@@ -28,7 +28,7 @@ + + + # Change this to the full path if clang-format is not on the path. +-binary = 'clang-format' ++binary = 'clang-format-3.3' + + + def getOffsetLength(filename, line_number, line_count): +Index: llvm-toolchain-3.3-3.3~+rc3/clang/tools/clang-format/clang-format.el +=================================================================== +--- llvm-toolchain-3.3-3.3~+rc3.orig/clang/tools/clang-format/clang-format.el 2013-05-08 02:29:53.000000000 +0200 ++++ llvm-toolchain-3.3-3.3~+rc3/clang/tools/clang-format/clang-format.el 2013-06-06 15:39:02.512116254 +0200 +@@ -14,7 +14,7 @@ + (let* ((orig-windows (get-buffer-window-list (current-buffer))) + (orig-window-starts (mapcar #'window-start orig-windows)) + (orig-point (point)) +- (binary "clang-format") ++ (binary "clang-format-3.3") + (style "LLVM")) + (if mark-active + (setq beg (region-beginning) diff --git a/debian/patches/series b/debian/patches/series index 60ac5ad9..6999f81d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -21,3 +21,4 @@ declare_clear_cache.diff ia64-fix.diff hurd-endian.diff +clang-format-version.diff diff --git a/debian/rules b/debian/rules index 7c616665..62c1cba6 100755 --- a/debian/rules +++ b/debian/rules @@ -182,7 +182,7 @@ override_dh_auto_install: d=$(CURDIR)/docs/_build/man/; \ cd $$d; \ for f in *.1; do \ - echo "$$f"|grep "3\.2" || mv $$f `echo $$f|sed "s|\.1|-$(LLVM_VERSION).1|"`; \ + echo "$$f"|grep "3\.3" || mv $$f `echo $$f|sed "s|\.1|-$(LLVM_VERSION).1|"`; \ done # Rename some stuff with the version name @@ -191,6 +191,9 @@ override_dh_auto_install: mv $(CURDIR)/utils/vim/llvm.vim $(CURDIR)/utils/vim/llvm-$(LLVM_VERSION).vim mv $(CURDIR)/utils/vim/tablegen.vim $(CURDIR)/utils/vim/tablegen-$(LLVM_VERSION).vim + mv $(CURDIR)/clang/tools/clang-format/clang-format-diff.py $(CURDIR)/clang/tools/clang-format/clang-format-diff-$(LLVM_VERSION) + mv $(CURDIR)/clang/tools/clang-format/clang-format.py clang/tools/clang-format/clang-format-$(LLVM_VERSION).py + # Remove some license files rm $(CURDIR)/debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/include/llvm/Support/LICENSE.TXT