rev 16644 - in trunk/packages: . kdevelop-php kdevelop-php/debian kdevelop-php/debian/patches kdevelop-php/debian/source

Fathi Boudra fabo at alioth.debian.org
Sun Jan 17 22:07:03 UTC 2010


Author: fabo
Date: 2010-01-17 22:07:03 +0000 (Sun, 17 Jan 2010)
New Revision: 16644

Added:
   trunk/packages/kdevelop-php/
   trunk/packages/kdevelop-php/debian/
   trunk/packages/kdevelop-php/debian/changelog
   trunk/packages/kdevelop-php/debian/compat
   trunk/packages/kdevelop-php/debian/control
   trunk/packages/kdevelop-php/debian/copyright
   trunk/packages/kdevelop-php/debian/docs
   trunk/packages/kdevelop-php/debian/kdevelop-php.lintian-overrides
   trunk/packages/kdevelop-php/debian/patches/
   trunk/packages/kdevelop-php/debian/patches/01_kdevelop-plugin_php_branch_pull_r1076222.diff
   trunk/packages/kdevelop-php/debian/patches/series
   trunk/packages/kdevelop-php/debian/rules
   trunk/packages/kdevelop-php/debian/source/
   trunk/packages/kdevelop-php/debian/source/format
Log:
Add kdevelop-php package - PHP plugin support for KDevelop.


Added: trunk/packages/kdevelop-php/debian/changelog
===================================================================
--- trunk/packages/kdevelop-php/debian/changelog	                        (rev 0)
+++ trunk/packages/kdevelop-php/debian/changelog	2010-01-17 22:07:03 UTC (rev 16644)
@@ -0,0 +1,5 @@
+kdevelop-php (1.0.0~beta2-1) UNRELEASED; urgency=low
+
+  * Initial release (Closes: #nnnn)
+
+ -- Fathi Boudra <fabo at debian.org>  Sun, 17 Jan 2010 17:10:22 +0100

Added: trunk/packages/kdevelop-php/debian/compat
===================================================================
--- trunk/packages/kdevelop-php/debian/compat	                        (rev 0)
+++ trunk/packages/kdevelop-php/debian/compat	2010-01-17 22:07:03 UTC (rev 16644)
@@ -0,0 +1 @@
+7

Added: trunk/packages/kdevelop-php/debian/control
===================================================================
--- trunk/packages/kdevelop-php/debian/control	                        (rev 0)
+++ trunk/packages/kdevelop-php/debian/control	2010-01-17 22:07:03 UTC (rev 16644)
@@ -0,0 +1,21 @@
+Source: kdevelop-php
+Section: devel
+Priority: optional
+Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>
+Uploaders: Fathi Boudra <fabo at debian.org>
+Build-Depends: debhelper (>= 7.3), cmake, pkg-kde-tools (>= 0.5),
+ kdevplatform-dev (>= 0.9.97)
+Standards-Version: 3.8.3
+Homepage: http://www.kdevelop.org/
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-kde/trunk/packages/kdevelop-php/#_trunk_packages_kdevelop-php_
+Vcs-Svn: svn://svn.debian.org/pkg-kde/trunk/packages/kdevelop-php
+
+Package: kdevelop-php
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, kdevelop (>= 4:3.9.97)
+Description: PHP plugin for KDevelop
+ KDevelop is an easy to use integrated development environment for KDE.
+ It supports a wide range of programming languages and features project
+ management, an advanced editor, a class browser and an integrated debugger.
+ .
+ This package contains the PHP language support plugin.

Added: trunk/packages/kdevelop-php/debian/copyright
===================================================================
--- trunk/packages/kdevelop-php/debian/copyright	                        (rev 0)
+++ trunk/packages/kdevelop-php/debian/copyright	2010-01-17 22:07:03 UTC (rev 16644)
@@ -0,0 +1,69 @@
+This work was packaged for Debian by:
+
+    Fathi Boudra <fabo at debian.org> on Sun, 17 Jan 2010 17:10:22 +0100
+
+It was downloaded from:
+
+    ftp://ftp.kde.org/pub/kde/
+
+Upstream Authors:
+
+    Niko Sams <niko.sams at gmail.com>
+    Milian Wolff <mail at milianw.de>
+
+Copyright:
+
+    Copyright (C) 2008-2010 Niko Sams <niko.sams at gmail.com>
+    Copyright (C) 2008-2010 Milian Wolff <mail at milianw.de>
+    Copyright (C) 2007-2008 David Nolden <david.nolden.kdevelop at art-master.de>
+    Copyright (C) 2006-2008 Hamish Rodda <rodda at kde.org>
+    Copyright (C) 2007 Andreas Pakulat <apaku at gmx.de>
+    Copyright (C) 2007 Piyush verma <piyush.verma at gmail.com>
+    Copyright (C) 2002-2006 Roberto Raggi <roberto at kdevelop.org>
+    Copyright (C) 2006 Matt Rogers <mattr at kde.org>
+    Copyright (C) 2004 Jaroslaw Staniek <js at iidea.pl>
+
+Copyright for FindKDevPlatform.cmake file:
+
+    Copyright (C) 2007 Andreas Pakulat <apaku at gmx.de>
+    Redistribution and use is allowed according to the terms of the BSD license.
+
+On Debian systems, the complete text of the BSD license can be found in
+`/usr/share/common-licenses/BSD'.
+
+License:
+
+    This package is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This package is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this package; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL-2' and
+`/usr/share/common-licenses/GPL-3'.
+
+Some parts of the source code are copied from KDevelop cpp language support.
+They are licensed under the terms of GNU Lesser General Public License
+version 2 or any later version.
+
+On Debian systems, the complete text of the GNU Lesser General
+Public License can be found in `/usr/share/common-licenses/LGPL-2' and
+`/usr/share/common-licenses/LGPL-3'.
+
+The Debian packaging is:
+
+    Copyright (C) 2010 Fathi Boudra <fabo at debian.org>
+
+you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.

Added: trunk/packages/kdevelop-php/debian/docs
===================================================================
--- trunk/packages/kdevelop-php/debian/docs	                        (rev 0)
+++ trunk/packages/kdevelop-php/debian/docs	2010-01-17 22:07:03 UTC (rev 16644)
@@ -0,0 +1 @@
+TODO

Added: trunk/packages/kdevelop-php/debian/kdevelop-php.lintian-overrides
===================================================================
--- trunk/packages/kdevelop-php/debian/kdevelop-php.lintian-overrides	                        (rev 0)
+++ trunk/packages/kdevelop-php/debian/kdevelop-php.lintian-overrides	2010-01-17 22:07:03 UTC (rev 16644)
@@ -0,0 +1,5 @@
+kdevelop-php: package-name-doesnt-match-sonames libkdev4phpcompletion libkdev4phpduchain libkdev4phpparser
+kdevelop-php: shlib-without-versioned-soname usr/lib/libkdev4phpparser.so libkdev4phpparser.so
+kdevelop-php: shlib-without-versioned-soname usr/lib/libkdev4phpduchain.so libkdev4phpduchain.so
+kdevelop-php: shlib-without-versioned-soname usr/lib/libkdev4phpcompletion.so libkdev4phpcompletion.so
+kdevelop-php: postinst-must-call-ldconfig usr/lib/libkdev4phpparser.so

Added: trunk/packages/kdevelop-php/debian/patches/01_kdevelop-plugin_php_branch_pull_r1076222.diff
===================================================================
--- trunk/packages/kdevelop-php/debian/patches/01_kdevelop-plugin_php_branch_pull_r1076222.diff	                        (rev 0)
+++ trunk/packages/kdevelop-php/debian/patches/01_kdevelop-plugin_php_branch_pull_r1076222.diff	2010-01-17 22:07:03 UTC (rev 16644)
@@ -0,0 +1,1369 @@
+Description: KDevelop plugin PHP branch pull from KDE svn r1076222
+Author: Fathi Boudra <fabo at debian.org>
+Forwarded: not-needed
+
+--- a/app_templates/simple_phpapp/simple_phpapp.kdevtemplate
++++ b/app_templates/simple_phpapp/simple_phpapp.kdevtemplate
+@@ -1,6 +1,20 @@
+ # KDE Config File
+ [General]
+ Name=Simple PHP Application
++Name[en_GB]=Simple PHP Application
++Name[es]=Aplicación PHP sencilla
++Name[pt]=Aplicação Simples em PHP
++Name[pt_BR]=Aplicativo PHP simples
++Name[sv]=Ett enkelt PHP-program
++Name[uk]=Проста програма мовою PHP
++Name[zh_TW]=簡單的 PHP 應用程式
+ Category=PHP
+ Comment=Generate filestructure to start a PHP application
++Comment[en_GB]=Generate filestructure to start a PHP application
++Comment[es]=Generar una estructura de archivos para iniciar una aplicación PHP
++Comment[pt]=Gerar a estrutura de ficheiros para iniciar uma aplicação em PHP
++Comment[pt_BR]=Gera a estrutura de arquivos para iniciar um aplicativo PHP
++Comment[sv]=Skapa filstruktur för att påbörja ett PHP-program
++Comment[uk]=Створити початкову файлову структуру програми мовою PHP
++Comment[zh_TW]=開始寫一個 PHP 應用程式的一般檔案結構
+ ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.php
+--- /dev/null
++++ b/COPYING
+@@ -0,0 +1,340 @@
++		    GNU GENERAL PUBLIC LICENSE
++		       Version 2, June 1991
++
++ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
++                       51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
++ Everyone is permitted to copy and distribute verbatim copies
++ of this license document, but changing it is not allowed.
++
++			    Preamble
++
++  The licenses for most software are designed to take away your
++freedom to share and change it.  By contrast, the GNU General Public
++License is intended to guarantee your freedom to share and change free
++software--to make sure the software is free for all its users.  This
++General Public License applies to most of the Free Software
++Foundation's software and to any other program whose authors commit to
++using it.  (Some other Free Software Foundation software is covered by
++the GNU Library General Public License instead.)  You can apply it to
++your programs, too.
++
++  When we speak of free software, we are referring to freedom, not
++price.  Our General Public Licenses are designed to make sure that you
++have the freedom to distribute copies of free software (and charge for
++this service if you wish), that you receive source code or can get it
++if you want it, that you can change the software or use pieces of it
++in new free programs; and that you know you can do these things.
++
++  To protect your rights, we need to make restrictions that forbid
++anyone to deny you these rights or to ask you to surrender the rights.
++These restrictions translate to certain responsibilities for you if you
++distribute copies of the software, or if you modify it.
++
++  For example, if you distribute copies of such a program, whether
++gratis or for a fee, you must give the recipients all the rights that
++you have.  You must make sure that they, too, receive or can get the
++source code.  And you must show them these terms so they know their
++rights.
++
++  We protect your rights with two steps: (1) copyright the software, and
++(2) offer you this license which gives you legal permission to copy,
++distribute and/or modify the software.
++
++  Also, for each author's protection and ours, we want to make certain
++that everyone understands that there is no warranty for this free
++software.  If the software is modified by someone else and passed on, we
++want its recipients to know that what they have is not the original, so
++that any problems introduced by others will not reflect on the original
++authors' reputations.
++
++  Finally, any free program is threatened constantly by software
++patents.  We wish to avoid the danger that redistributors of a free
++program will individually obtain patent licenses, in effect making the
++program proprietary.  To prevent this, we have made it clear that any
++patent must be licensed for everyone's free use or not licensed at all.
++
++  The precise terms and conditions for copying, distribution and
++modification follow.
++
++		    GNU GENERAL PUBLIC LICENSE
++   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
++
++  0. This License applies to any program or other work which contains
++a notice placed by the copyright holder saying it may be distributed
++under the terms of this General Public License.  The "Program", below,
++refers to any such program or work, and a "work based on the Program"
++means either the Program or any derivative work under copyright law:
++that is to say, a work containing the Program or a portion of it,
++either verbatim or with modifications and/or translated into another
++language.  (Hereinafter, translation is included without limitation in
++the term "modification".)  Each licensee is addressed as "you".
++
++Activities other than copying, distribution and modification are not
++covered by this License; they are outside its scope.  The act of
++running the Program is not restricted, and the output from the Program
++is covered only if its contents constitute a work based on the
++Program (independent of having been made by running the Program).
++Whether that is true depends on what the Program does.
++
++  1. You may copy and distribute verbatim copies of the Program's
++source code as you receive it, in any medium, provided that you
++conspicuously and appropriately publish on each copy an appropriate
++copyright notice and disclaimer of warranty; keep intact all the
++notices that refer to this License and to the absence of any warranty;
++and give any other recipients of the Program a copy of this License
++along with the Program.
++
++You may charge a fee for the physical act of transferring a copy, and
++you may at your option offer warranty protection in exchange for a fee.
++
++  2. You may modify your copy or copies of the Program or any portion
++of it, thus forming a work based on the Program, and copy and
++distribute such modifications or work under the terms of Section 1
++above, provided that you also meet all of these conditions:
++
++    a) You must cause the modified files to carry prominent notices
++    stating that you changed the files and the date of any change.
++
++    b) You must cause any work that you distribute or publish, that in
++    whole or in part contains or is derived from the Program or any
++    part thereof, to be licensed as a whole at no charge to all third
++    parties under the terms of this License.
++
++    c) If the modified program normally reads commands interactively
++    when run, you must cause it, when started running for such
++    interactive use in the most ordinary way, to print or display an
++    announcement including an appropriate copyright notice and a
++    notice that there is no warranty (or else, saying that you provide
++    a warranty) and that users may redistribute the program under
++    these conditions, and telling the user how to view a copy of this
++    License.  (Exception: if the Program itself is interactive but
++    does not normally print such an announcement, your work based on
++    the Program is not required to print an announcement.)
++
++These requirements apply to the modified work as a whole.  If
++identifiable sections of that work are not derived from the Program,
++and can be reasonably considered independent and separate works in
++themselves, then this License, and its terms, do not apply to those
++sections when you distribute them as separate works.  But when you
++distribute the same sections as part of a whole which is a work based
++on the Program, the distribution of the whole must be on the terms of
++this License, whose permissions for other licensees extend to the
++entire whole, and thus to each and every part regardless of who wrote it.
++
++Thus, it is not the intent of this section to claim rights or contest
++your rights to work written entirely by you; rather, the intent is to
++exercise the right to control the distribution of derivative or
++collective works based on the Program.
++
++In addition, mere aggregation of another work not based on the Program
++with the Program (or with a work based on the Program) on a volume of
++a storage or distribution medium does not bring the other work under
++the scope of this License.
++
++  3. You may copy and distribute the Program (or a work based on it,
++under Section 2) in object code or executable form under the terms of
++Sections 1 and 2 above provided that you also do one of the following:
++
++    a) Accompany it with the complete corresponding machine-readable
++    source code, which must be distributed under the terms of Sections
++    1 and 2 above on a medium customarily used for software interchange; or,
++
++    b) Accompany it with a written offer, valid for at least three
++    years, to give any third party, for a charge no more than your
++    cost of physically performing source distribution, a complete
++    machine-readable copy of the corresponding source code, to be
++    distributed under the terms of Sections 1 and 2 above on a medium
++    customarily used for software interchange; or,
++
++    c) Accompany it with the information you received as to the offer
++    to distribute corresponding source code.  (This alternative is
++    allowed only for noncommercial distribution and only if you
++    received the program in object code or executable form with such
++    an offer, in accord with Subsection b above.)
++
++The source code for a work means the preferred form of the work for
++making modifications to it.  For an executable work, complete source
++code means all the source code for all modules it contains, plus any
++associated interface definition files, plus the scripts used to
++control compilation and installation of the executable.  However, as a
++special exception, the source code distributed need not include
++anything that is normally distributed (in either source or binary
++form) with the major components (compiler, kernel, and so on) of the
++operating system on which the executable runs, unless that component
++itself accompanies the executable.
++
++If distribution of executable or object code is made by offering
++access to copy from a designated place, then offering equivalent
++access to copy the source code from the same place counts as
++distribution of the source code, even though third parties are not
++compelled to copy the source along with the object code.
++
++  4. You may not copy, modify, sublicense, or distribute the Program
++except as expressly provided under this License.  Any attempt
++otherwise to copy, modify, sublicense or distribute the Program is
++void, and will automatically terminate your rights under this License.
++However, parties who have received copies, or rights, from you under
++this License will not have their licenses terminated so long as such
++parties remain in full compliance.
++
++  5. You are not required to accept this License, since you have not
++signed it.  However, nothing else grants you permission to modify or
++distribute the Program or its derivative works.  These actions are
++prohibited by law if you do not accept this License.  Therefore, by
++modifying or distributing the Program (or any work based on the
++Program), you indicate your acceptance of this License to do so, and
++all its terms and conditions for copying, distributing or modifying
++the Program or works based on it.
++
++  6. Each time you redistribute the Program (or any work based on the
++Program), the recipient automatically receives a license from the
++original licensor to copy, distribute or modify the Program subject to
++these terms and conditions.  You may not impose any further
++restrictions on the recipients' exercise of the rights granted herein.
++You are not responsible for enforcing compliance by third parties to
++this License.
++
++  7. If, as a consequence of a court judgment or allegation of patent
++infringement or for any other reason (not limited to patent issues),
++conditions are imposed on you (whether by court order, agreement or
++otherwise) that contradict the conditions of this License, they do not
++excuse you from the conditions of this License.  If you cannot
++distribute so as to satisfy simultaneously your obligations under this
++License and any other pertinent obligations, then as a consequence you
++may not distribute the Program at all.  For example, if a patent
++license would not permit royalty-free redistribution of the Program by
++all those who receive copies directly or indirectly through you, then
++the only way you could satisfy both it and this License would be to
++refrain entirely from distribution of the Program.
++
++If any portion of this section is held invalid or unenforceable under
++any particular circumstance, the balance of the section is intended to
++apply and the section as a whole is intended to apply in other
++circumstances.
++
++It is not the purpose of this section to induce you to infringe any
++patents or other property right claims or to contest validity of any
++such claims; this section has the sole purpose of protecting the
++integrity of the free software distribution system, which is
++implemented by public license practices.  Many people have made
++generous contributions to the wide range of software distributed
++through that system in reliance on consistent application of that
++system; it is up to the author/donor to decide if he or she is willing
++to distribute software through any other system and a licensee cannot
++impose that choice.
++
++This section is intended to make thoroughly clear what is believed to
++be a consequence of the rest of this License.
++
++  8. If the distribution and/or use of the Program is restricted in
++certain countries either by patents or by copyrighted interfaces, the
++original copyright holder who places the Program under this License
++may add an explicit geographical distribution limitation excluding
++those countries, so that distribution is permitted only in or among
++countries not thus excluded.  In such case, this License incorporates
++the limitation as if written in the body of this License.
++
++  9. The Free Software Foundation may publish revised and/or new versions
++of the General Public License from time to time.  Such new versions will
++be similar in spirit to the present version, but may differ in detail to
++address new problems or concerns.
++
++Each version is given a distinguishing version number.  If the Program
++specifies a version number of this License which applies to it and "any
++later version", you have the option of following the terms and conditions
++either of that version or of any later version published by the Free
++Software Foundation.  If the Program does not specify a version number of
++this License, you may choose any version ever published by the Free Software
++Foundation.
++
++  10. If you wish to incorporate parts of the Program into other free
++programs whose distribution conditions are different, write to the author
++to ask for permission.  For software which is copyrighted by the Free
++Software Foundation, write to the Free Software Foundation; we sometimes
++make exceptions for this.  Our decision will be guided by the two goals
++of preserving the free status of all derivatives of our free software and
++of promoting the sharing and reuse of software generally.
++
++			    NO WARRANTY
++
++  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
++FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
++OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
++PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
++OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
++MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
++TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
++PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
++REPAIR OR CORRECTION.
++
++  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
++WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
++REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
++INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
++OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
++TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
++YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
++PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGES.
++
++		     END OF TERMS AND CONDITIONS
++
++	    How to Apply These Terms to Your New Programs
++
++  If you develop a new program, and you want it to be of the greatest
++possible use to the public, the best way to achieve this is to make it
++free software which everyone can redistribute and change under these terms.
++
++  To do so, attach the following notices to the program.  It is safest
++to attach them to the start of each source file to most effectively
++convey the exclusion of warranty; and each file should have at least
++the "copyright" line and a pointer to where the full notice is found.
++
++    <one line to give the program's name and a brief idea of what it does.>
++    Copyright (C) <year>  <name of author>
++
++    This program is free software; you can redistribute it and/or modify
++    it under the terms of the GNU General Public License as published by
++    the Free Software Foundation; either version 2 of the License, or
++    (at your option) any later version.
++
++    This program is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++    GNU General Public License for more details.
++
++    You should have received a copy of the GNU General Public License
++    along with this program; if not, write to the Free Software
++    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
++
++
++Also add information on how to contact you by electronic and paper mail.
++
++If the program is interactive, make it output a short notice like this
++when it starts in an interactive mode:
++
++    Gnomovision version 69, Copyright (C) year name of author
++    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
++    This is free software, and you are welcome to redistribute it
++    under certain conditions; type `show c' for details.
++
++The hypothetical commands `show w' and `show c' should show the appropriate
++parts of the General Public License.  Of course, the commands you use may
++be called something other than `show w' and `show c'; they could even be
++mouse-clicks or menu items--whatever suits your program.
++
++You should also get your employer (if you work as a programmer) or your
++school, if any, to sign a "copyright disclaimer" for the program, if
++necessary.  Here is a sample; alter the names:
++
++  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
++  `Gnomovision' (which makes passes at compilers) written by James Hacker.
++
++  <signature of Ty Coon>, 1 April 1989
++  Ty Coon, President of Vice
++
++This General Public License does not permit incorporating your program into
++proprietary programs.  If your program is a subroutine library, you may
++consider it more useful to permit linking proprietary applications with the
++library.  If this is what you want to do, use the GNU Library General
++Public License instead of this License.
+--- a/create_functions.php
++++ b/create_functions.php
+@@ -1,26 +1,23 @@
+ <?php
+ /*****************************************************************************
+  * Copyright (c) 2008 Niko Sams <niko.sams at gmail.com>                        *
+- *                                                                           *
+- * Permission is hereby granted, free of charge, to any person obtaining     *
+- * a copy of this software and associated documentation files (the           *
+- * "Software"), to deal in the Software without restriction, including       *
+- * without limitation the rights to use, copy, modify, merge, publish,       *
+- * distribute, sublicense, and/or sell copies of the Software, and to        *
+- * permit persons to whom the Software is furnished to do so, subject to     *
+- * the following conditions:                                                 *
+- *                                                                           *
+- * The above copyright notice and this permission notice shall be            *
+- * included in all copies or substantial portions of the Software.           *
+- *                                                                           *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,           *
+- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF        *
+- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND                     *
+- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE    *
+- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION    *
+- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION     *
+- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.           *
+- *****************************************************************************/
++ *                                                                         *
++ *   This program is free software; you can redistribute it and/or modify  *
++ *   it under the terms of the GNU Library General Public License as       *
++ *   published by the Free Software Foundation; either version 2 of the    *
++ *   License, or (at your option) any later version.                       *
++ *                                                                         *
++ *   This program is distributed in the hope that it will be useful,       *
++ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
++ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
++ *   GNU General Public License for more details.                          *
++ *                                                                         *
++ *   You should have received a copy of the GNU Library General Public     *
++ *   License along with this program; if not, write to the                 *
++ *   Free Software Foundation, Inc.,                                       *
++ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
++ ***************************************************************************/
++
+ 
+ if (!isset($_SERVER['argv'][1]) || !isset($_SERVER['argv'][2])) {
+     $msg = "Usage:\n".$_SERVER['argv'][0]." [path to phpdoc] [path to php sources]\n";
+--- a/duchain/declarationbuilder.cpp
++++ b/duchain/declarationbuilder.cpp
+@@ -446,6 +446,7 @@ void DeclarationBuilder::declareClassMem
+                     return;
+                 }
+                 if ( cdec->abstractType()->indexed() == type->indexed() ) {
++                    setEncountered(cdec);
+                     return;
+                 }
+             }
+@@ -651,7 +652,6 @@ void DeclarationBuilder::declareVariable
+     }
+ 
+     DUChainWriteLocker lock(DUChain::lock());
+-
+     // check if this variable is already declared
+     {
+         QList< Declaration* > decs = parentCtx->findLocalDeclarations(identifier.first());
+@@ -661,6 +661,7 @@ void DeclarationBuilder::declareVariable
+                 // we expect that the list of declarations has the newest declaration at back
+                 if ( dynamic_cast<VariableDeclaration*>( *it ) ) {
+                     if ( (*it)->abstractType()->indexed() == type->indexed() ) {
++                        setEncountered(*it);
+                         return;
+                     }
+                     break;
+@@ -887,6 +888,7 @@ void DeclarationBuilder::declareFoundVar
+                 foreach ( Declaration* dec, ctx->findDeclarations(m_variable) ) {
+                     if ( dec->kind() == Declaration::Instance ) {
+                         isDeclared = true;
++                        setEncountered(dec);
+                         break;
+                     }
+                 }
+@@ -956,10 +958,23 @@ void DeclarationBuilder::visitGlobalVar(
+ {
+     DeclarationBuilderBase::visitGlobalVar(node);
+     if (node->var) {
++        QualifiedIdentifier id = identifierForNode(node->var);
++        if ( recompiling() ) {
++            DUChainWriteLocker lock(DUChain::lock());
++            // sadly we can't use findLocalDeclarations() here, since it un-aliases declarations
++            foreach ( Declaration* dec, currentContext()->localDeclarations() ) {
++                if ( dynamic_cast<AliasDeclaration*>(dec) && dec->identifier() == id.first() ) {
++                    // don't redeclare but reuse the existing declaration
++                    setEncountered(dec);
++                    return;
++                }
++            }
++        }
++        // no existing declaration found, create one
+         Declaration* aliasedDeclaration = findDeclarationImport(GlobalVariableDeclarationType, node->var);
+         if (aliasedDeclaration) {
+             DUChainWriteLocker lock(DUChain::lock());
+-            AliasDeclaration* dec = openDefinition<AliasDeclaration>(identifierForNode(node->var), editor()->findRange(node->var));
++            AliasDeclaration* dec = openDefinition<AliasDeclaration>(id, editor()->findRange(node->var));
+             dec->setAliasedDeclaration(aliasedDeclaration);
+             closeDeclaration();
+         }
+@@ -994,6 +1009,7 @@ void DeclarationBuilder::visitUnaryExpre
+         foreach ( Declaration* dec, includedCtx->findDeclarations(identifier, SimpleCursor(0, 1)) ) {
+             if ( dec->kind() == Declaration::Import ) {
+                 // nothing to do
++                setEncountered(dec);
+                 return;
+             }
+         }
+@@ -1012,4 +1028,22 @@ void DeclarationBuilder::updateCurrentTy
+     currentDeclaration()->setAbstractType(currentAbstractType());
+ }
+ 
++void DeclarationBuilder::supportBuild(AstNode* node, DUContext* context)
++{
++    // generally we are the second pass through the doc (see PreDeclarationBuilder)
++    // so notify our base about it
++    setCompilingContexts(false);
++    DeclarationBuilderBase::supportBuild(node, context);
++}
++
++void DeclarationBuilder::closeContext()
++{
++    // We don't want the first pass to clean up stuff, since
++    // there is lots of stuff we visit/encounter here first.
++    // So we clean things up here.
++    setCompilingContexts(true);
++    DeclarationBuilderBase::closeContext();
++    setCompilingContexts(false);
++}
++
+ }
+--- a/duchain/declarationbuilder.h
++++ b/duchain/declarationbuilder.h
+@@ -95,6 +95,9 @@ protected:
+     virtual void closeDeclaration();
+     void classContextOpened(KDevelop::DUContext* context);
+ 
++    virtual void supportBuild(AstNode* node, KDevelop::DUContext* context = 0);
++    virtual void closeContext();
++
+     /// don't forget to closeDeclaration() afterwards
+     /// set m_currentModifers to your likings and reset it afterwards
+     void openClassMemberDeclaration(Php::AstNode* node, const KDevelop::QualifiedIdentifier& name);
+--- a/duchain/predeclarationbuilder.cpp
++++ b/duchain/predeclarationbuilder.cpp
+@@ -26,7 +26,6 @@
+ #include <ktexteditor/smartinterface.h>
+ 
+ #include <language/duchain/stringhelpers.h>
+-#include <language/duchain/aliasdeclaration.h>
+ #include <language/duchain/types/functiontype.h>
+ 
+ #include <klocalizedstring.h>
+@@ -85,8 +84,7 @@ void PreDeclarationBuilder::visitClassDe
+         m_types->insert(node->className->string, dec);
+     }
+ 
+-    // only visit the body to look for other function declarations inside the methods
+-    visitNode(node->body);
++    PreDeclarationBuilderBase::visitClassDeclarationStatement(node);
+ 
+     closeDeclaration();
+ }
+@@ -112,21 +110,11 @@ void PreDeclarationBuilder::visitInterfa
+         m_types->insert(node->interfaceName->string, dec);
+     }
+ 
+-    // don't evaluate the body or extends of interfaces in PreDeclarationBuilder
++    PreDeclarationBuilderBase::visitInterfaceDeclarationStatement(node);
+ 
+     closeDeclaration();
+ }
+ 
+-void PreDeclarationBuilder::visitClassStatement(ClassStatementAst* node)
+-{
+-    // we are only looking for function declarations inside methods
+-    if (node->methodBody) {
+-        visitNode(node->methodBody);
+-    } else {
+-        PreDeclarationBuilderBase::visitClassStatement(node);
+-    }
+-}
+-
+ void PreDeclarationBuilder::visitClassVariable(ClassVariableAst* node)
+ {
+     m_upcomingClassVariables->append(identifierForNode(node->variable));
+@@ -149,10 +137,18 @@ void PreDeclarationBuilder::visitFunctio
+ 
+         m_functions->insert(node->functionName->string, dec);
+     }
+-    // only visit the body to look for other function declarations
+-    visitNode(node->functionBody);
++
++    PreDeclarationBuilderBase::visitFunctionDeclarationStatement(node);
+ 
+     closeDeclaration();
+ }
+ 
++void PreDeclarationBuilder::closeContext()
++{
++    // we don't want to cleanup here, see DeclarationBuilder::closeContext()
++    setCompilingContexts(false);
++    PreDeclarationBuilderBase::closeContext();
++    setCompilingContexts(true);
++}
++
+ }
+--- a/duchain/predeclarationbuilder.h
++++ b/duchain/predeclarationbuilder.h
+@@ -63,10 +63,10 @@ protected:
+ //     virtual void visitNode(Php::AstNode* node);
+     virtual void visitClassDeclarationStatement(ClassDeclarationStatementAst *node);
+     virtual void visitInterfaceDeclarationStatement(InterfaceDeclarationStatementAst *node);
+-    virtual void visitClassStatement(ClassStatementAst *node);
+     virtual void visitFunctionDeclarationStatement(FunctionDeclarationStatementAst *node);
+     virtual void visitClassVariable(ClassVariableAst* node);
+ 
++    virtual void closeContext();
+ private:
+     QHash<qint64, Php::ClassDeclaration*>* m_types;
+     QHash<qint64, Php::FunctionDeclaration*>* m_functions;
+--- a/duchain/tests/test_duchain.cpp
++++ b/duchain/tests/test_duchain.cpp
+@@ -506,6 +506,25 @@ void TestDUChain::testDeclarationReturnT
+     QVERIFY(IntegralType::Ptr::dynamicCast(fType->returnType())->dataType() == IntegralType::TypeInt);
+ }
+ 
++void TestDUChain::testDeclarationReturnTypeClassChain()
++{
++    QByteArray method("<? class A { /** @return this **/ function a() {} /** @return self **/ function b() {} }");
++
++    TopDUContext* top = parse(method, DumpNone);
++    DUChainReleaser releaseTop(top);
++    DUChainWriteLocker lock(DUChain::lock());
++
++    // class a
++    DUContext* ctx = top->childContexts().first();
++    QCOMPARE(ctx->type(), DUContext::Class);
++    QVERIFY(ctx->owner());
++    QVERIFY(StructureType::Ptr::dynamicCast(ctx->owner()->abstractType()));
++
++    //function a
++    QVERIFY(/* func a (this) */ ctx->localDeclarations().at(0)->type<FunctionType>() == ctx->owner()->abstractType());
++    QVERIFY(/* func b (self) */ ctx->localDeclarations().at(1)->type<FunctionType>() == ctx->owner()->abstractType());
++}
++
+ void TestDUChain::testDeclareTypehintFunction()
+ {
+     //                 0         1         2         3         4         5         6         7
+--- a/duchain/tests/test_duchain.h
++++ b/duchain/tests/test_duchain.h
+@@ -44,6 +44,7 @@ private slots:
+     void testDeclarationMultipleReturnTypes();
+     void testDeclarationReturnTypeDocBlock();
+     void testDeclarationReturnTypeDocBlockIntegral();
++    void testDeclarationReturnTypeClassChain();
+     void testClassImplementsInterface();
+     void testClassExtends();
+     void testStaticMethod();
+--- a/duchain/typebuilder.cpp
++++ b/duchain/typebuilder.cpp
+@@ -81,6 +81,11 @@ AbstractType::Ptr TypeBuilder::parseType
+         iType = IntegralType::TypeNull;
+     } else if (lType == "void") {
+         iType = IntegralType::TypeVoid;
++    } else if (lType == "self" || lType == "this") {
++        DUChainReadLocker lock(DUChain::lock());
++        if ( currentContext()->type() == DUContext::Class && currentContext()->owner() ) {
++            return currentContext()->owner()->abstractType();
++        }
+     } else {
+         //don't use openTypeFromName as it uses cursor for findDeclarations
+         Declaration* decl = findDeclarationImport(ClassDeclarationType, QualifiedIdentifier(type.toLower()), node);
+@@ -119,21 +124,95 @@ AbstractType::Ptr TypeBuilder::injectPar
+     return ret;
+ }
+ 
++/**
++ * Find all (or only one - see @p docCommentName) values for a given needle
++ * in a doc-comment. Needle has to start a line in the doccomment,
++ * i.e.:
++ *
++ *  * @docCommentName value
++ *
++ * or
++ *
++ *  /// @docCommentName value
++ */
++QStringList findInDocComment(const QString &docComment, const QString &docCommentName, const bool onlyOne)
++{
++    QStringList matches;
++    // optimization that does not require potentially slow regexps
++    // old code was something like this:
++    /*
++    if (!docComment.isEmpty()) {
++        QRegExp rx("\\*\\s+ at param\\s([^\\s]*)");
++        int pos = 0;
++        while ((pos = rx.indexIn(docComment, pos)) != -1) {
++            ret << parseType(rx.cap(1), node);
++            pos += rx.matchedLength();
++        }
++    }
++    */
++
++    for ( int i = 0, size = docComment.size(); i < size; ++i ) {
++        if ( docComment[i].isSpace() || docComment[i] == '*' || docComment[i] == '/' ) {
++            // skip whitespace and comment-marker at beginning of line
++            continue;
++        } else if ( docComment[i] == '@' && docComment.midRef(i + 1, docCommentName.size()) == docCommentName ) {
++            // find @return or similar
++            i += docCommentName.size() + 1;
++            // skip whitespace (at least one is required)
++            if ( i >= size || !docComment[i].isSpace() ) {
++                // skip to next line
++                i = docComment.indexOf('\n', i);
++                if ( i == -1 ) {
++                    break;
++                }
++                continue;
++            } else if ( docComment[i] == '\n' ) {
++                continue;
++            }
++            ++i; // at least one whitespace
++            while ( i < size && docComment[i].isSpace() ) {
++                ++i;
++            }
++            // finally get the typename
++            int pos = i;
++            while ( pos < size && !docComment[pos].isSpace() ) {
++                ++pos;
++            }
++            if ( pos > i ) {
++                matches << docComment.mid(i, pos - i);
++                if ( onlyOne ) {
++                    break;
++                } else {
++                    i = pos;
++                }
++            }
++        }
++        // skip to next line
++        i = docComment.indexOf('\n', i);
++        if ( i == -1 ) {
++            break;
++        }
++    }
++
++    return matches;
++}
++
+ AbstractType::Ptr TypeBuilder::parseDocComment(AstNode* node, const QString& docCommentName)
+ {
+     m_gotTypeFromDocComment = false;
+-    QString docComment = editor()->parseSession()->docComment(node->startToken);
+-    if (!docComment.isEmpty()) {
+-        QRegExp rx("(?:\\*|///)\\s+@" + QRegExp::escape(docCommentName) + "\\s+([^\\s]*)");
+-        if (rx.indexIn(docComment) != -1) {
++    const QString& docComment = editor()->parseSession()->docComment(node->startToken);
++
++    if ( !docComment.isEmpty() ) {
++        const QStringList& matches = findInDocComment(docComment, docCommentName, true);
++        if ( !matches.isEmpty() ) {
+             AbstractType::Ptr type;
+-            if (rx.cap(1) == "$this") {
++            if (matches.first() == "$this") {
+                 DUChainReadLocker lock(DUChain::lock());
+                 if (currentContext()->owner()) {
+                     type = currentContext()->owner()->abstractType();
+                 }
+             } else {
+-                type = injectParseType(rx.cap(1), node);
++                type = injectParseType(matches.first(), node);
+             }
+             if (type) {
+                 m_gotTypeFromDocComment = true;
+@@ -144,17 +223,16 @@ AbstractType::Ptr TypeBuilder::parseDocC
+     return AbstractType::Ptr();
+ }
+ 
+-
+ QList<AbstractType::Ptr> TypeBuilder::parseDocCommentParams(AstNode* node)
+ {
+     QList<AbstractType::Ptr> ret;
+     QString docComment = editor()->parseSession()->docComment(node->startToken);
+-    if (!docComment.isEmpty()) {
+-        QRegExp rx("\\*\\s+ at param\\s([^\\s]*)");
+-        int pos = 0;
+-        while ((pos = rx.indexIn(docComment, pos)) != -1) {
+-            ret << parseType(rx.cap(1), node);
+-            pos += rx.matchedLength();
++    if ( !docComment.isEmpty() ) {
++        const QStringList& matches = findInDocComment(docComment, "param", false);
++        if ( !matches.isEmpty() ) {
++            foreach ( const QString& type, matches ) {
++                ret << parseType(type, node);
++            }
+         }
+     }
+     return ret;
+--- a/kdevphpsupport.desktop
++++ b/kdevphpsupport.desktop
+@@ -3,69 +3,37 @@ Encoding=UTF-8
+ Type=Service
+ Exec=blubb
+ Comment=Php Language Support
+-Comment[ca]=Implementació del llenguatge PHP
+-Comment[de]=Sprachunterstützung für Php
+-Comment[el]=Υποστήριξη γλώσσας Php
+ Comment[en_GB]=Php Language Support
+ Comment[es]=Implementación de lenguaje PHP
+-Comment[et]=PHP keele toetus
+-Comment[fr]=Prise en charge du langage PHP
+-Comment[ga]=Tacaíocht PHP
+-Comment[gl]=Soporte da linguaxe PHP
+-Comment[hne]=पीएचपी भाखा समर्थन
+-Comment[ja]=Php 言語のサポート
+-Comment[nds]=Ünnerstütten för PHP
+ Comment[pt]=Suporte à Linguagem PHP
+ Comment[pt_BR]=Suporte à linguagem PHP
+ Comment[sv]=Stöd för språket PHP
+-Comment[tr]=Php Dil Desteği
+-Comment[uk]=Підтримка мови Php
+-Comment[x-test]=xxPhp Language Supportxx
++Comment[uk]=Підтримка мови PHP
++Comment[zh_TW]=PHP 語言支援
+ Name=KDevPhpSupport
+-Name[ca]=KDevPhpSupport
+-Name[de]=KDevPhpSupport
+-Name[el]=KDevPhpSupport
+ Name[en_GB]=KDevPhpSupport
+ Name[es]=KDevPhpSupport
+-Name[et]=KDevPhpSupport
+-Name[fr]=KDevCSharpSupport
+-Name[ga]=KDevPhpSupport
+-Name[gl]=KDevPhpSupport
+-Name[hne]=केडेवपीएचपीसपोर्ट
+-Name[ja]=KDevPhpSupport
+-Name[nds]=KDevPhpSupport
+ Name[pt]=KDevPhpSupport
+ Name[pt_BR]=KDevPhpSupport
+ Name[sv]=KDevelop PHP-stöd
+-Name[tr]=KDevPhpSupport
+ Name[uk]=KDevPhpSupport
+-Name[x-test]=xxKDevPhpSupportxx
++Name[zh_TW]=KDevPhpSupport
+ GenericName=Php Support
+-GenericName[ca]=Implementació de PHP
+-GenericName[de]=Unterstützung für Php
+-GenericName[el]=Υποστήριξη Php
+ GenericName[en_GB]=Php Support
+ GenericName[es]=Implementación de PHP
+-GenericName[et]=PHP toetus
+-GenericName[fr]=Prise en charge du PHP
+-GenericName[ga]=Tacaíocht PHP
+-GenericName[gl]=Soporte de PHP
+-GenericName[hne]=पीएचपी सपोर्ट
+-GenericName[ja]=Php サポート
+-GenericName[nds]=PHP-Ünnerstütten
+-GenericName[pt]=Suporte a PHP
++GenericName[pt]=Suporte para PHP
+ GenericName[pt_BR]=Suporte a PHP
+ GenericName[sv]=PHP-stöd
+-GenericName[tr]=Php Desteği
+-GenericName[uk]=Підтримка Php
+-GenericName[x-test]=xxPhp Supportxx
++GenericName[uk]=Підтримка PHP
++GenericName[zh_TW]=PHP 支援
+ ServiceTypes=KDevelop/Plugin
+ Icon=application-x-php
+ X-KDE-Library=kdevphplanguagesupport
+-X-KDevelop-Version=7
++X-KDevelop-Version=8
+ X-KDevelop-Language=Php
+ X-KDevelop-Args=PHP
+ X-KDevelop-Interfaces=ILanguageSupport
+ X-KDevelop-SupportedMimeTypes=application/x-php
+ X-KDE-PluginInfo-Name=KDevPhpSupport
+ X-KDevelop-Mode=NoGUI
++X-KDevelop-LoadMode=AlwaysOn
+--- a/parser/generated/phpast.h
++++ b/parser/generated/phpast.h
+@@ -495,7 +495,7 @@ struct KDEVPHPPARSER_EXPORT ClassStateme
+ {
+     enum { KIND = ClassStatementKind };
+ 
+-    ClassConstantDeclarationAst *consts;
++    const KDevPG::ListNode<ClassConstantDeclarationAst *> *constsSequence;
+     ClassVariableDeclarationAst *variable;
+     OptionalModifiersAst *modifiers;
+     IdentifierAst *methodName;
+--- a/parser/generated/phpdebugvisitor.h
++++ b/parser/generated/phpdebugvisitor.h
+@@ -355,7 +355,16 @@ public:
+     virtual void visitClassStatement(ClassStatementAst *node)
+     {
+         if (!m_indent) printToken(node, "classStatement");
+-        if (node->consts) printToken(node->consts, "classConstantDeclaration", "consts");
++        if (node->constsSequence)
++        {
++            const KDevPG::ListNode<ClassConstantDeclarationAst*> *__it = node->constsSequence->front(), *__end = __it;
++            do
++            {
++                printToken(__it->element, "classConstantDeclaration", "consts[]");
++                __it = __it->next;
++            }
++            while (__it != __end);
++        }
+         if (node->variable) printToken(node->variable, "classVariableDeclaration", "variable");
+         if (node->modifiers) printToken(node->modifiers, "optionalModifiers", "modifiers");
+         if (node->methodName) printToken(node->methodName, "identifier", "methodName");
+--- a/parser/generated/phpdefaultvisitor.cpp
++++ b/parser/generated/phpdefaultvisitor.cpp
+@@ -245,7 +245,16 @@ void DefaultVisitor::visitClassNameRefer
+ 
+ void DefaultVisitor::visitClassStatement(ClassStatementAst *node)
+ {
+-    visitNode(node->consts);
++    if (node->constsSequence)
++    {
++        const KDevPG::ListNode<ClassConstantDeclarationAst*> *__it = node->constsSequence->front(), *__end = __it;
++        do
++        {
++            visitNode(__it->element);
++            __it = __it->next;
++        }
++        while (__it != __end);
++    }
+     visitNode(node->variable);
+     visitNode(node->modifiers);
+     visitNode(node->methodName);
+--- a/parser/generated/phpparser.cpp
++++ b/parser/generated/phpparser.cpp
+@@ -2465,7 +2465,7 @@ bool Parser::parseClassStatement(ClassSt
+                 }
+                 return false;
+             }
+-            (*yynode)->consts = __node_52;
++            (*yynode)->constsSequence = snoc((*yynode)->constsSequence, __node_52, memoryPool);
+ 
+             while (yytoken == Token_COMMA)
+             {
+@@ -2488,7 +2488,7 @@ bool Parser::parseClassStatement(ClassSt
+                     }
+                     return false;
+                 }
+-                (*yynode)->consts = __node_53;
++                (*yynode)->constsSequence = snoc((*yynode)->constsSequence, __node_53, memoryPool);
+ 
+             }
+             if (yytoken != Token_SEMICOLON)
+--- a/parser/parsesession.cpp
++++ b/parser/parsesession.cpp
+@@ -1,27 +1,21 @@
+ /*****************************************************************************
+- * Copyright (c) 2007 Andreas Pakulat <apaku at gmx.de>                         *
+  * Copyright (c) 2007 Piyush verma <piyush.verma at gmail.com>                  *
+  * Copyright (c) 2008 Niko Sams <niko.sams at gmail.com>                        *
+  *                                                                           *
+- * Permission is hereby granted, free of charge, to any person obtaining     *
+- * a copy of this software and associated documentation files (the           *
+- * "Software"), to deal in the Software without restriction, including       *
+- * without limitation the rights to use, copy, modify, merge, publish,       *
+- * distribute, sublicense, and/or sell copies of the Software, and to        *
+- * permit persons to whom the Software is furnished to do so, subject to     *
+- * the following conditions:                                                 *
++ * This program is free software; you can redistribute it and/or modify      *
++ * it under the terms of the GNU General Public License as published by      *
++ * the Free Software Foundation; either version 2 of the License, or         *
++ * (at your option) any later version.                                       *
+  *                                                                           *
+- * The above copyright notice and this permission notice shall be            *
+- * included in all copies or substantial portions of the Software.           *
++ * This program is distributed in the hope that it will be useful,           *
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
++ * GNU General Public License for more details.                              *
+  *                                                                           *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,           *
+- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF        *
+- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND                     *
+- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE    *
+- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION    *
+- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION     *
+- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.           *
++ * You should have received a copy of the GNU General Public License         *
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.     *
+  *****************************************************************************/
++
+ #include "parsesession.h"
+ 
+ #include "kdev-pg-memory-pool.h"
+--- a/parser/parsesession.h
++++ b/parser/parsesession.h
+@@ -1,27 +1,21 @@
+ /*****************************************************************************
+- * Copyright (c) 2007 Andreas Pakulat <apaku at gmx.de>                         *
+  * Copyright (c) 2007 Piyush verma <piyush.verma at gmail.com>                  *
+  * Copyright (c) 2008 Niko Sams <niko.sams at gmail.com>                        *
+  *                                                                           *
+- * Permission is hereby granted, free of charge, to any person obtaining     *
+- * a copy of this software and associated documentation files (the           *
+- * "Software"), to deal in the Software without restriction, including       *
+- * without limitation the rights to use, copy, modify, merge, publish,       *
+- * distribute, sublicense, and/or sell copies of the Software, and to        *
+- * permit persons to whom the Software is furnished to do so, subject to     *
+- * the following conditions:                                                 *
++ * This program is free software; you can redistribute it and/or modify      *
++ * it under the terms of the GNU General Public License as published by      *
++ * the Free Software Foundation; either version 2 of the License, or         *
++ * (at your option) any later version.                                       *
+  *                                                                           *
+- * The above copyright notice and this permission notice shall be            *
+- * included in all copies or substantial portions of the Software.           *
++ * This program is distributed in the hope that it will be useful,           *
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
++ * GNU General Public License for more details.                              *
+  *                                                                           *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,           *
+- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF        *
+- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND                     *
+- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE    *
+- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION    *
+- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION     *
+- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.           *
++ * You should have received a copy of the GNU General Public License         *
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.     *
+  *****************************************************************************/
++
+ #ifndef PHP_PARSESESSION_H
+ #define PHP_PARSESESSION_H
+ 
+--- a/parser/php.g
++++ b/parser/php.g
+@@ -804,7 +804,7 @@ identifier=identifier
+ #classStatements=classStatement*
+ -> classBody ;;
+ 
+-    CONST consts=classConstantDeclaration @ COMMA SEMICOLON
++    CONST #consts=classConstantDeclaration @ COMMA SEMICOLON
+   | VAR variable=classVariableDeclaration SEMICOLON
+   | modifiers=optionalModifiers
+     ( variable=classVariableDeclaration SEMICOLON
+--- a/phplanguagesupport.cpp
++++ b/phplanguagesupport.cpp
+@@ -1,28 +1,21 @@
+ /*****************************************************************************
+- * Copyright (c) 2007 Andreas Pakulat <apaku at gmx.de>                         *
+  * Copyright (c) 2007 Piyush verma <piyush.verma at gmail.com>                  *
++ * Copyright (c) 2009 Niko Sams <niko.sams at gmail.com>                        *
+  *                                                                           *
+- * Permission is hereby granted, free of charge, to any person obtaining     *
+- * a copy of this software and associated documentation files (the           *
+- * "Software"), to deal in the Software without restriction, including       *
+- * without limitation the rights to use, copy, modify, merge, publish,       *
+- * distribute, sublicense, and/or sell copies of the Software, and to        *
+- * permit persons to whom the Software is furnished to do so, subject to     *
+- * the following conditions:                                                 *
++ * This program is free software; you can redistribute it and/or modify      *
++ * it under the terms of the GNU General Public License as published by      *
++ * the Free Software Foundation; either version 2 of the License, or         *
++ * (at your option) any later version.                                       *
+  *                                                                           *
+- * The above copyright notice and this permission notice shall be            *
+- * included in all copies or substantial portions of the Software.           *
++ * This program is distributed in the hope that it will be useful,           *
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
++ * GNU General Public License for more details.                              *
+  *                                                                           *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,           *
+- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF        *
+- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND                     *
+- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE    *
+- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION    *
+- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION     *
+- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.           *
++ * You should have received a copy of the GNU General Public License         *
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.     *
+  *****************************************************************************/
+ 
+-
+ #include "phplanguagesupport.h"
+ 
+ #include <QMutexLocker>
+@@ -62,7 +55,11 @@
+ using namespace KDevelop;
+ 
+ K_PLUGIN_FACTORY(KDevPhpSupportFactory, registerPlugin<Php::LanguageSupport>();)
+-K_EXPORT_PLUGIN(KDevPhpSupportFactory("kdevphpsupport"))
++K_EXPORT_PLUGIN(KDevPhpSupportFactory(KAboutData("kdevphpsupport","kdevphp", ki18n("Php Support"), "1.0 Beta 2", ki18n("Support for Php Language"), KAboutData::License_GPL)
++    .addAuthor(ki18n("Milian Wolff"), ki18n("Author"), "mail at milianw.de", "http://milianw.de")
++    .addAuthor(ki18n("Niko Sams"), ki18n("Author"), "niko.sams at gmail.com", "http://nikosams.blogspot.com")
++))
++
+ 
+ namespace Php
+ {
+--- a/phplanguagesupport.h
++++ b/phplanguagesupport.h
+@@ -1,25 +1,18 @@
+ /*****************************************************************************
+- * Copyright (c) 2007 Andreas Pakulat <apaku at gmx.de>                         *
+  * Copyright (c) 2007 Piyush verma <piyush.verma at gmail.com>                  *
+  *                                                                           *
+- * Permission is hereby granted, free of charge, to any person obtaining     *
+- * a copy of this software and associated documentation files (the           *
+- * "Software"), to deal in the Software without restriction, including       *
+- * without limitation the rights to use, copy, modify, merge, publish,       *
+- * distribute, sublicense, and/or sell copies of the Software, and to        *
+- * permit persons to whom the Software is furnished to do so, subject to     *
+- * the following conditions:                                                 *
++ * This program is free software; you can redistribute it and/or modify      *
++ * it under the terms of the GNU General Public License as published by      *
++ * the Free Software Foundation; either version 2 of the License, or         *
++ * (at your option) any later version.                                       *
+  *                                                                           *
+- * The above copyright notice and this permission notice shall be            *
+- * included in all copies or substantial portions of the Software.           *
++ * This program is distributed in the hope that it will be useful,           *
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
++ * GNU General Public License for more details.                              *
+  *                                                                           *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,           *
+- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF        *
+- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND                     *
+- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE    *
+- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION    *
+- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION     *
+- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.           *
++ * You should have received a copy of the GNU General Public License         *
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.     *
+  *****************************************************************************/
+ 
+ #ifndef KDEVPHPLANGUAGESUPPORT_H
+--- a/phpparsejob.cpp
++++ b/phpparsejob.cpp
+@@ -1,27 +1,21 @@
+ /*****************************************************************************
+- * Copyright (c) 2007 Andreas Pakulat <apaku at gmx.de>                         *
+  * Copyright (c) 2007 Piyush verma <piyush.verma at gmail.com>                  *
+  * Copyright (c) 2008 Niko Sams <niko.sams at gmail.com>                        *
+  *                                                                           *
+- * Permission is hereby granted, free of charge, to any person obtaining     *
+- * a copy of this software and associated documentation files (the           *
+- * "Software"), to deal in the Software without restriction, including       *
+- * without limitation the rights to use, copy, modify, merge, publish,       *
+- * distribute, sublicense, and/or sell copies of the Software, and to        *
+- * permit persons to whom the Software is furnished to do so, subject to     *
+- * the following conditions:                                                 *
++ * This program is free software; you can redistribute it and/or modify      *
++ * it under the terms of the GNU General Public License as published by      *
++ * the Free Software Foundation; either version 2 of the License, or         *
++ * (at your option) any later version.                                       *
+  *                                                                           *
+- * The above copyright notice and this permission notice shall be            *
+- * included in all copies or substantial portions of the Software.           *
++ * This program is distributed in the hope that it will be useful,           *
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
++ * GNU General Public License for more details.                              *
+  *                                                                           *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,           *
+- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF        *
+- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND                     *
+- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE    *
+- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION    *
+- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION     *
+- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.           *
++ * You should have received a copy of the GNU General Public License         *
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.     *
+  *****************************************************************************/
++
+ #include "phpparsejob.h"
+ #include <QFile>
+ #include <QReadWriteLock>
+@@ -98,9 +92,6 @@ struct UrlParseLock {
+ 
+ ParseJob::ParseJob(const KUrl &url)
+         : KDevelop::ParseJob(url)
+-        , m_session(new ParseSession)
+-        , m_ast(0)
+-        , m_readFromDisk(false)
+         , m_url(url)
+         , m_parentJob(0)
+ {
+@@ -108,7 +99,6 @@ ParseJob::ParseJob(const KUrl &url)
+ 
+ ParseJob::~ParseJob()
+ {
+-     delete m_session;
+ }
+ 
+ LanguageSupport *ParseJob::php() const
+@@ -116,17 +106,6 @@ LanguageSupport *ParseJob::php() const
+     return LanguageSupport::self();
+ }
+ 
+-StartAst *ParseJob::ast() const
+-{
+-    Q_ASSERT(isFinished() && m_ast);
+-    return m_ast;
+-}
+-
+-bool ParseJob::wasReadFromDisk() const
+-{
+-    return m_readFromDisk;
+-}
+-
+ void ParseJob::run()
+ {
+     // make sure we loaded the internal file already
+@@ -156,9 +135,11 @@ void ParseJob::run()
+ 
+     kDebug() << "parsing" << document().str();
+ 
+-    m_readFromDisk = !contentsAvailableFromEditor();
++    bool readFromDisk = !contentsAvailableFromEditor();
++
++    ParseSession session;
+ 
+-    if (m_readFromDisk) {
++    if (readFromDisk) {
+         QString fileName = document().str();
+         if (fileName == "InternalFunctions.php") {
+             fileName = KStandardDirs::locate("data", "kdevphpsupport/phpfunctions.php");
+@@ -194,26 +175,27 @@ void ParseJob::run()
+ 
+ //         if( codec )
+ //             s.setCodec( QTextCodec::codecForName(codec) );
+-        m_session->setContents(s.readAll());
++        session.setContents(s.readAll());
+         file.close();
+     } else {
+-        m_session->setContents(contentsFromEditor());
+-        m_session->setCurrentDocument(document().str());
++        session.setContents(contentsFromEditor());
++        session.setCurrentDocument(document().str());
+     }
+ 
+ 
+     // 2) parse
+-    bool matched = m_session->parse(&m_ast);
++    StartAst* ast = 0;
++    bool matched = session.parse(&ast);
+ 
+     if (abortRequested()) {
+         return abortJob();
+     }
+ 
+     if (matched) {
+-        EditorIntegrator editor(m_session);
++        EditorIntegrator editor(&session);
+ 
+         IncludeBuilder includeBuilder(&editor);
+-        includeBuilder.build(document(), m_ast);
++        includeBuilder.build(document(), ast);
+ 
+         QList<ProblemPointer> includeProblems;
+         {
+@@ -251,7 +233,7 @@ void ParseJob::run()
+         QReadLocker parseLock(php()->language()->parseLock());
+ 
+         DeclarationBuilder builder(&editor);
+-        KDevelop::ReferencedTopDUContext chain = builder.build(document(), m_ast);
++        KDevelop::ReferencedTopDUContext chain = builder.build(document(), ast);
+ 
+         if (abortRequested()) {
+             return abortJob();
+@@ -263,7 +245,7 @@ void ParseJob::run()
+                 && document() != IndexedString("InternalFunctions.php") )
+         {
+             UseBuilder useBuilder(&editor);
+-            useBuilder.buildUses(m_ast);
++            useBuilder.buildUses(ast);
+         }
+ 
+         if (abortRequested()) {
+@@ -291,7 +273,7 @@ void ParseJob::run()
+ 
+         QFileInfo fileInfo(document().str());
+         QDateTime lastModified = fileInfo.lastModified();
+-        if (m_readFromDisk) {
++        if (readFromDisk) {
+             file->setModificationRevision(KDevelop::ModificationRevision(lastModified));
+         } else {
+             file->setModificationRevision(KDevelop::ModificationRevision(lastModified, revisionToken()));
+@@ -318,7 +300,7 @@ void ParseJob::run()
+             DUChain::self()->addDocumentChain(top);
+         }
+         setDuChain(top);
+-        foreach(const ProblemPointer &p, m_session->problems()) {
++        foreach(const ProblemPointer &p, session.problems()) {
+             DUChainWriteLocker lock(DUChain::lock());
+             top->addProblem(p);
+         }
+@@ -331,11 +313,6 @@ void ParseJob::run()
+     }
+ }
+ 
+-ParseSession *ParseJob::parseSession() const
+-{
+-    return m_session;
+-}
+-
+ void ParseJob::setParentJob(ParseJob *job)
+ {
+     m_parentJob = job;
+--- a/phpparsejob.h
++++ b/phpparsejob.h
+@@ -1,27 +1,21 @@
+ /*****************************************************************************
+- * Copyright (c) 2007 Andreas Pakulat <apaku at gmx.de>                         *
+  * Copyright (c) 2007 Piyush verma <piyush.verma at gmail.com>                  *
+  * Copyright (c) 2008 Niko Sams <niko.sams at gmail.com>                        *
+  *                                                                           *
+- * Permission is hereby granted, free of charge, to any person obtaining     *
+- * a copy of this software and associated documentation files (the           *
+- * "Software"), to deal in the Software without restriction, including       *
+- * without limitation the rights to use, copy, modify, merge, publish,       *
+- * distribute, sublicense, and/or sell copies of the Software, and to        *
+- * permit persons to whom the Software is furnished to do so, subject to     *
+- * the following conditions:                                                 *
++ * This program is free software; you can redistribute it and/or modify      *
++ * it under the terms of the GNU General Public License as published by      *
++ * the Free Software Foundation; either version 2 of the License, or         *
++ * (at your option) any later version.                                       *
+  *                                                                           *
+- * The above copyright notice and this permission notice shall be            *
+- * included in all copies or substantial portions of the Software.           *
++ * This program is distributed in the hope that it will be useful,           *
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
++ * GNU General Public License for more details.                              *
+  *                                                                           *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,           *
+- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF        *
+- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND                     *
+- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE    *
+- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION    *
+- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION     *
+- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.           *
++ * You should have received a copy of the GNU General Public License         *
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.     *
+  *****************************************************************************/
++
+ #ifndef PHP_PARSEJOB_H
+ #define PHP_PARSEJOB_H
+ 
+@@ -35,17 +29,10 @@
+ #include <ksharedptr.h>
+ #include <ktexteditor/range.h>
+ 
+-#include <language/duchain/duchainpointer.h>
+-#include <language/duchain/topducontext.h>
+-
+-
+ namespace Php
+ {
+ 
+ class LanguageSupport;
+-
+-class ParseSession;
+-
+ class EditorIntegrator;
+ 
+ class ParseJob : public KDevelop::ParseJob
+@@ -56,14 +43,9 @@ public:
+     explicit ParseJob(const KUrl &url);
+     virtual ~ParseJob();
+ 
+-    void setAST(StartAst* ast);
+-    virtual StartAst *ast() const;
+-
+     const KTextEditor::Range& textRangeToParse() const;
+ 
+     LanguageSupport* php() const;
+-    ParseSession* parseSession() const;
+-    bool wasReadFromDisk() const;
+ 
+     void setParentJob(ParseJob *job);
+ 
+@@ -71,10 +53,6 @@ protected:
+     virtual void run();
+ 
+ private:
+-    ParseSession *m_session;
+-    StartAst *m_ast;
+-    bool m_readFromDisk;
+-    KDevelop::ReferencedTopDUContext m_duContext;
+     KUrl m_url;
+     KTextEditor::Range m_textRangeToParse;
+     ParseJob *m_parentJob; ///< parent job if this one is an include

Added: trunk/packages/kdevelop-php/debian/patches/series
===================================================================
--- trunk/packages/kdevelop-php/debian/patches/series	                        (rev 0)
+++ trunk/packages/kdevelop-php/debian/patches/series	2010-01-17 22:07:03 UTC (rev 16644)
@@ -0,0 +1 @@
+01_kdevelop-plugin_php_branch_pull_r1076222.diff

Added: trunk/packages/kdevelop-php/debian/rules
===================================================================
--- trunk/packages/kdevelop-php/debian/rules	                        (rev 0)
+++ trunk/packages/kdevelop-php/debian/rules	2010-01-17 22:07:03 UTC (rev 16644)
@@ -0,0 +1,9 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+%:
+	dh --with kde $@
+
+.PHONY: override_dh_auto_test


Property changes on: trunk/packages/kdevelop-php/debian/rules
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/packages/kdevelop-php/debian/source/format
===================================================================
--- trunk/packages/kdevelop-php/debian/source/format	                        (rev 0)
+++ trunk/packages/kdevelop-php/debian/source/format	2010-01-17 22:07:03 UTC (rev 16644)
@@ -0,0 +1 @@
+3.0 (quilt)




More information about the pkg-kde-commits mailing list