Added abandoned version of kio-apt

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kio-apt@1088432 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
commit ea4406b477

@ -0,0 +1,15 @@
Sylvain Joyeux <sylvain.joyeux@m4x.org>
Willy De la Court <wdl@linux-lovers.be>
Search form and minor improvements
Spec file for building RPMs
Jalub Stachowski
Polish translation and minor improvements
David Maciejak
RPM support
Emmanuel Bouthenot <kolter@openics.org>
Inclusion of kio-apt in Debian
Daniel Nylander <info@danielnylander.se>
Swedish translation

@ -0,0 +1,7 @@
== Version 0.13.2
* included a patch to make links in description field clickable
patch from Sergey Saukh <thelich@yandex.ru>
* include AMD64 in the list of architectures
patch taken from the Debian package
* included Swedish translation
from Daniel Nylander <info@danielnylander.se>

@ -0,0 +1,280 @@
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

@ -0,0 +1,7 @@
0.1 to 0.2
Added the policy action
Added the policy on top of show. If somebody finds
that annoying, may add a config option
Fixed the css, mostly the bogus margin-top on
the header table
Fixed various bugs

@ -0,0 +1,234 @@
# Doxyfile 1.3.3-Gideon
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = deb.kdevelop
PROJECT_NUMBER = 0.1
OUTPUT_DIRECTORY =
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = /home/doudou/src/deb
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.idl \
*.odl \
*.cs \
*.php \
*.php3 \
*.inc \
*.C \
*.H \
*.tlh \
*.diff \
*.patch \
*.moc \
*.xpm \
*.dox
RECURSIVE = yes
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = YES
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = yes
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
MAX_DOT_GRAPH_DEPTH = 1000
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO

@ -0,0 +1,167 @@
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes a while. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Type `make install' to install the programs and any data files and
documentation.
4. You can remove the program binaries and object files from the
source code directory by typing `make clean'.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.

@ -0,0 +1,22 @@
SUBDIRS = $(TOPSUBDIRS)
$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;
$(top_srcdir)/subdirs:
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in
@cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4
MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files
package-messages:
$(MAKE) -f admin/Makefile.common package-messages
$(MAKE) -C po merge
EXTRA_DIST = admin COPYING configure.in.in
dist-hook:
cd $(top_distdir) && perl admin/am_edit -padmin
cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs

@ -0,0 +1,10 @@
all:
@echo "This Makefile is only for the CVS repository"
@echo "This will be deleted before making the distribution"
@echo ""
$(MAKE) -f admin/Makefile.common cvs
dist:
$(MAKE) -f admin/Makefile.common dist
.SILENT:

@ -0,0 +1 @@

File diff suppressed because it is too large Load Diff

863
aclocal.m4 vendored

@ -0,0 +1,863 @@
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.9.6])])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
# therefore $ac_aux_dir as well) can be either absolute or relative,
# depending on how configure is run. This is pretty annoying, since
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
# source directory, any form will work fine, but in subdirectories a
# relative path needs to be adjusted first.
#
# $ac_aux_dir/missing
# fails when called from a subdirectory if $ac_aux_dir is relative
# $top_srcdir/$ac_aux_dir/missing
# fails if $ac_aux_dir is absolute,
# fails when called from a subdirectory in a VPATH build with
# a relative $ac_aux_dir
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
# harmless because $srcdir is `.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
# and then we would define $MISSING as
# MISSING="\${SHELL} $am_aux_dir/missing"
# This will work as long as MISSING is not called from configure, because
# unfortunately $(top_srcdir) has no meaning in configure.
# However there are other variables, like CC, which are often used in
# configure, and could therefore not use this "fixed" $ac_aux_dir.
#
# Another solution, used here, is to always expand $ac_aux_dir to an
# absolute PATH. The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND],
[dnl Rely on autoconf to set up CDPATH properly.
AC_PREREQ([2.50])dnl
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
])
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 7
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
[AC_PREREQ(2.52)dnl
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])
AC_SUBST([$1_FALSE])
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([[conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 8
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
# NAME is "CC", "CXX", "GCJ", or "OBJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
# dependency, and given that the user is not expected to run this macro,
# just rely on AC_PROG_CC.
AC_DEFUN([_AM_DEPENDENCIES],
[AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
[$1], CXX, [depcc="$CXX" am_compiler_list=],
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
none) break ;;
esac
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_$1_dependencies_compiler_type=$depmode
break
fi
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_$1_dependencies_compiler_type=none
fi
])
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
AM_CONDITIONAL([am__fastdep$1], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
])
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
AC_DEFUN([AM_SET_DEPDIR],
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
[AC_ARG_ENABLE(dependency-tracking,
[ --disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
#serial 3
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[for mf in $CONFIG_FILES; do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named `Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# So let's grep whole file.
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
# AM_OUTPUT_DEPENDENCY_COMMANDS
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
# This code is only required when automatic dependency tracking
# is enabled. FIXME. This creates each `.P' file that we will
# need in order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 8
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 12
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
# The call with PACKAGE and VERSION arguments is the old style
# call (pre autoconf-2.50), which is being phased out. PACKAGE
# and VERSION should now be passed to AC_INIT and removed from
# the call to AM_INIT_AUTOMAKE.
# We support both call styles for the transition. After
# the next Automake release, Autoconf can make the AC_INIT
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.58])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
# test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
# test whether we have cygpath
if test -z "$CYGPATH_W"; then
if (cygpath --version) >/dev/null 2>/dev/null; then
CYGPATH_W='cygpath -w'
else
CYGPATH_W=echo
fi
fi
AC_SUBST([CYGPATH_W])
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
AM_PROG_INSTALL_SH
AM_PROG_INSTALL_STRIP
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES(CC)],
[define([AC_PROG_CC],
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES(CXX)],
[define([AC_PROG_CXX],
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
])
])
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
# loop where config.status creates the headers, so we can generate
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
$1 | $1:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
AC_DEFUN([AM_SET_LEADING_DOT],
[rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
am__leading_dot=.
else
am__leading_dot=_
fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 3
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
am__doit:
@echo done
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# We grep out `Entering directory' and `Leaving directory'
# messages which can occur if `w' ends up in MAKEFLAGS.
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
am__include=include
am__quote=
_am_result=GNU
fi
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
am__include=.include
am__quote="\""
_am_result=BSD
fi
fi
AC_SUBST([am__include])
AC_SUBST([am__quote])
AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
[AC_REQUIRE([AM_MISSING_HAS_RUN])
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
# AM_MISSING_HAS_RUN
# ------------------
# Define MISSING if not defined so far and test if it supports --run.
# If it does, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
AC_MSG_WARN([`missing' script is too old or missing])
fi
])
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_MKDIR_P
# ---------------
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
#
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
# created by `make install' are always world readable, even if the
# installer happens to have an overly restrictive umask (e.g. 077).
# This was a mistake. There are at least two reasons why we must not
# use `-m 0755':
# - it causes special bits like SGID to be ignored,
# - it may be too restrictive (some setups expect 775 directories).
#
# Do not use -m 0755 and let people choose whatever they expect by
# setting umask.
#
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
# Some implementations (such as Solaris 8's) are not thread-safe: if a
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
# concurrently, both version can detect that a/ is missing, but only
# one can create it and the other will error out. Consequently we
# restrict ourselves to GNU make (using the --version option ensures
# this.)
AC_DEFUN([AM_PROG_MKDIR_P],
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
# We used to keeping the `.' as first argument, in order to
# allow $(mkdir_p) to be used without argument. As in
# $(mkdir_p) $(somedir)
# where $(somedir) is conditionally defined. However this is wrong
# for two reasons:
# 1. if the package is installed by a user who cannot write `.'
# make install will fail,
# 2. the above comment should most certainly read
# $(mkdir_p) $(DESTDIR)$(somedir)
# so it does not work when $(somedir) is undefined and
# $(DESTDIR) is not.
# To support the latter case, we have to write
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
# so the `.' trick is pointless.
mkdir_p='mkdir -p --'
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
for d in ./-p ./--version;
do
test -d $d && rmdir $d
done
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
if test -f "$ac_aux_dir/mkinstalldirs"; then
mkdir_p='$(mkinstalldirs)'
else
mkdir_p='$(install_sh) -d'
fi
fi
AC_SUBST([mkdir_p])])
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 3
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
# ------------------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
# ----------------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftest.file`
fi
rm -f conftest.file
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
test "$[2]" = conftest.file
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
AC_MSG_RESULT(yes)])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_STRIP
# ---------------------
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
# always use install-sh in `make install-strip', and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the `STRIP' environment variable to overrule this program.
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
# FORMAT should be one of `v7', `ustar', or `pax'.
#
# Substitute a variable $(am__tar) that is a command
# writing to stdout a FORMAT-tarball containing the directory
# $tardir.
# tardir=directory && $(am__tar) > result.tar
#
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility.
AM_MISSING_PROG([AMTAR], [tar])
m4_if([$1], [v7],
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
# Loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
# Do not fold the above two line into one, because Tru64 sh and
# Solaris sh will not grok spaces in the rhs of `-'.
for _am_tool in $_am_tools
do
case $_am_tool in
gnutar)
for _am_tar in tar gnutar gtar;
do
AM_RUN_LOG([$_am_tar --version]) && break
done
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
am__untar="$_am_tar -xf -"
;;
plaintar)
# Must skip GNU tar: if it does not support --format= it doesn't create
# ustar tarball either.
(tar --version) >/dev/null 2>&1 && continue
am__tar='tar chf - "$$tardir"'
am__tar_='tar chf - "$tardir"'
am__untar='tar xf -'
;;
pax)
am__tar='pax -L -x $1 -w "$$tardir"'
am__tar_='pax -L -x $1 -w "$tardir"'
am__untar='pax -r'
;;
cpio)
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
am__untar='cpio -i -H $1 -d'
;;
none)
am__tar=false
am__tar_=false
am__untar=false
;;
esac
# If the value was cached, stop now. We just wanted to have am__tar
# and am__untar set.
test -n "${am_cv_prog_tar_$1}" && break
# tar/untar a dummy directory, and stop if the command works
rm -rf conftest.dir
mkdir conftest.dir
echo GrepMe > conftest.dir/file
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
rm -rf conftest.dir
if test -s conftest.tar; then
AM_RUN_LOG([$am__untar <conftest.tar])
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
fi
done
rm -rf conftest.dir
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([acinclude.m4])

@ -0,0 +1,161 @@
<?xml version = '1.0'?>
<kdevelop>
<general>
<author>Sylvain Joyeux</author>
<email>sylvain.joyeux@m4x.org</email>
<version>0.12</version>
<projectmanagement>KDevKDEAutoProject</projectmanagement>
<primarylanguage>C++</primarylanguage>
<keywords>
<keyword>C++</keyword>
<keyword>Code</keyword>
<keyword>Qt</keyword>
<keyword>KDE</keyword>
<keyword>kioslave</keyword>
</keywords>
<projectdirectory>.</projectdirectory>
<absoluteprojectpath>false</absoluteprojectpath>
<description/>
<ignoreparts>
<part>KDevClearCase</part>
<part>KDevFileGroups</part>
<part>KDevdistpart</part>
<part>KDevPerforce</part>
</ignoreparts>
<secondaryLanguages/>
</general>
<kdevautoproject>
<general>
<activetarget>src/kio_apt.la</activetarget>
<useconfiguration>debug</useconfiguration>
</general>
<configurations>
<optimized>
<builddir>optimized</builddir>
<ccompiler>GccOptions</ccompiler>
<cxxcompiler>GppOptions</cxxcompiler>
<f77compiler>G77Options</f77compiler>
<cxxflags>-O2 -g0</cxxflags>
</optimized>
<debug>
<configargs>--enable-debug=full --prefix=/usr</configargs>
<builddir>debug</builddir>
<ccompiler>kdevgccoptions</ccompiler>
<cxxcompiler>kdevgppoptions</cxxcompiler>
<f77compiler>kdevpgf77options</f77compiler>
<cxxflags>-O0 -g3</cxxflags>
<topsourcedir/>
<cppflags/>
<ldflags/>
<ccompilerbinary/>
<cxxcompilerbinary/>
<f77compilerbinary/>
<cflags/>
<f77flags/>
</debug>
</configurations>
<make>
<envvars>
<envvar value="1" name="WANT_AUTOCONF_2_5" />
<envvar value="1" name="WANT_AUTOMAKE_1_6" />
</envvars>
<abortonerror>false</abortonerror>
<numberofjobs>1</numberofjobs>
<dontact>false</dontact>
<makebin/>
</make>
<run>
<directoryradio>executable</directoryradio>
<customdirectory>/</customdirectory>
<mainprogram>usr/bin/konqueror</mainprogram>
<programargs>apt:/search?kde</programargs>
<terminal>false</terminal>
<autocompile>true</autocompile>
<envvars/>
</run>
</kdevautoproject>
<kdevfileview>
<groups>
<group pattern="*.cpp;*.cxx;*.h" name="Sources" />
<group pattern="*.po;*.ts" name="Translations" />
<group pattern="*" name="Others" />
<hidenonprojectfiles>false</hidenonprojectfiles>
</groups>
<tree>
<hidepatterns></hidepatterns>
<hidenonprojectfiles>false</hidenonprojectfiles>
<showvcsfields>true</showvcsfields>
</tree>
</kdevfileview>
<kdevdoctreeview>
<ignoretocs>
<toc>gtk</toc>
<toc>gnustep</toc>
<toc>python</toc>
<toc>php</toc>
<toc>perl</toc>
</ignoretocs>
<projectdoc>
<userdocDir>html/</userdocDir>
<apidocDir>html/</apidocDir>
</projectdoc>
<ignoreqt_xml/>
<ignoredoxygen/>
<ignorekdocs/>
<ignoredevhelp/>
</kdevdoctreeview>
<kdevdebugger>
<general>
<dbgshell>libtool</dbgshell>
<programargs/>
<gdbpath/>
<configGdbScript/>
<runShellScript/>
<runGdbScript/>
<breakonloadinglibs>true</breakonloadinglibs>
<separatetty>false</separatetty>
<floatingtoolbar>false</floatingtoolbar>
</general>
<display>
<staticmembers>false</staticmembers>
<demanglenames>true</demanglenames>
<outputradix>10</outputradix>
</display>
</kdevdebugger>
<kdevfilecreate>
<filetypes/>
<useglobaltypes/>
</kdevfilecreate>
<cppsupportpart>
<filetemplates>
<interfacesuffix>.h</interfacesuffix>
<implementationsuffix>.cpp</implementationsuffix>
</filetemplates>
</cppsupportpart>
<kdevcppsupport>
<codecompletion>
<includeGlobalFunctions>true</includeGlobalFunctions>
<includeTypes>true</includeTypes>
<includeEnums>true</includeEnums>
<includeTypedefs>false</includeTypedefs>
<automaticCodeCompletion>true</automaticCodeCompletion>
<automaticArgumentsHint>true</automaticArgumentsHint>
<automaticHeaderCompletion>true</automaticHeaderCompletion>
<codeCompletionDelay>250</codeCompletionDelay>
<argumentsHintDelay>400</argumentsHintDelay>
<headerCompletionDelay>250</headerCompletionDelay>
</codecompletion>
<references/>
</kdevcppsupport>
<kdevcvs>
<cvsoptions>-f</cvsoptions>
<commitoptions/>
<addoptions/>
<logoptions/>
<updateoptions>-dP</updateoptions>
<removeoptions>-f</removeoptions>
<revertoptions>-C -d -P</revertoptions>
<diffoptions>-u3 -p</diffoptions>
<rshoptions/>
</kdevcvs>
</kdevelop>

@ -0,0 +1,247 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the <Carbon/Carbon.h> header file. */
#undef HAVE_CARBON_CARBON_H
/* Define if you have the CoreAudio API */
#undef HAVE_COREAUDIO
/* Define to 1 if you have the <crt_externs.h> header file. */
#undef HAVE_CRT_EXTERNS_H
/* Defines if your system has the crypt function */
#undef HAVE_CRYPT
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define if you have libjpeg */
#undef HAVE_LIBJPEG
/* Define if you have libpng */
#undef HAVE_LIBPNG
/* Define if you have a working libpthread (will enable threaded code) */
#undef HAVE_LIBPTHREAD
/* Define if you have libz */
#undef HAVE_LIBZ
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define if your system needs _NSGetEnviron to set up the environment */
#undef HAVE_NSGETENVIRON
/* Define if you have res_init */
#undef HAVE_RES_INIT
/* Define if you have the res_init prototype */
#undef HAVE_RES_INIT_PROTO
/* Define if you have a STL implementation by SGI */
#undef HAVE_SGI_STL
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have strlcat */
#undef HAVE_STRLCAT
/* Define if you have the strlcat prototype */
#undef HAVE_STRLCAT_PROTO
/* Define if you have strlcpy */
#undef HAVE_STRLCPY
/* Define if you have the strlcpy prototype */
#undef HAVE_STRLCPY_PROTO
/* Define to 1 if you have the <sys/bitypes.h> header file. */
#undef HAVE_SYS_BITYPES_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `vsnprintf' function. */
#undef HAVE_VSNPRINTF
/* Suffix for lib directories */
#undef KDELIBSUFF
/* Define a safe value for MAXPATHLEN */
#undef KDEMAXPATHLEN
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* The size of `char *', as computed by sizeof. */
#undef SIZEOF_CHAR_P
/* The size of `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* The size of `short', as computed by sizeof. */
#undef SIZEOF_SHORT
/* The size of `size_t', as computed by sizeof. */
#undef SIZEOF_SIZE_T
/* The size of `unsigned long', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_LONG
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if your package manager is not dpkg but RPM */
#undef USE_RPM
/* Version number of package */
#undef VERSION
/* Defined if compiling without arts */
#undef WITHOUT_ARTS
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/*
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
* headers and I'm too lazy to write a configure test as long as only
* unixware is related
*/
#ifdef _UNIXWARE
#define HAVE_BOOLEAN
#endif
/*
* AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
* that defines bzero.
*/
#if defined(_AIX)
#include <strings.h>
#endif
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
# include <sys/time.h>
# include <crt_externs.h>
# define environ (*_NSGetEnviron())
#endif
#if !defined(HAVE_RES_INIT_PROTO)
#ifdef __cplusplus
extern "C" {
#endif
int res_init(void);
#ifdef __cplusplus
}
#endif
#endif
#if !defined(HAVE_STRLCAT_PROTO)
#ifdef __cplusplus
extern "C" {
#endif
unsigned long strlcat(char*, const char*, unsigned long);
#ifdef __cplusplus
}
#endif
#endif
#if !defined(HAVE_STRLCPY_PROTO)
#ifdef __cplusplus
extern "C" {
#endif
unsigned long strlcpy(char*, const char*, unsigned long);
#ifdef __cplusplus
}
#endif
#endif
/*
* On HP-UX, the declaration of vsnprintf() is needed every time !
*/
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
#if __STDC__
#include <stdarg.h>
#include <stdlib.h>
#else
#include <varargs.h>
#endif
#ifdef __cplusplus
extern "C"
#endif
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
#ifdef __cplusplus
extern "C"
#endif
int snprintf(char *str, size_t n, char const *fmt, ...);
#endif
#if defined(__SVR4) && !defined(__svr4__)
#define __svr4__ 1
#endif
/* type to use in place of socklen_t if not defined */
#undef kde_socklen_t
/* type to use in place of socklen_t if not defined (deprecated, use
kde_socklen_t) */
#undef ksize_t

@ -0,0 +1,2 @@
./admin/configure.in.min
configure.in.in

@ -0,0 +1,138 @@
dnl =======================================================
dnl FILE: ./admin/configure.in.min
dnl =======================================================
dnl This file is part of the KDE libraries/packages
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
dnl This file is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Library General Public
dnl License as published by the Free Software Foundation; either
dnl version 2 of the License, or (at your option) any later version.
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Library General Public License for more details.
dnl You should have received a copy of the GNU Library General Public License
dnl along with this library; see the file COPYING.LIB. If not, write to
dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
dnl Boston, MA 02110-1301, USA.
# Original Author was Kalle@kde.org
# I lifted it in some mater. (Stephan Kulow)
# I used much code from Janos Farkas
dnl Process this file with autoconf to produce a configure script.
AC_INIT(acinclude.m4) dnl a source file from your sub dir
dnl This is so we can use kde-common
AC_CONFIG_AUX_DIR(admin)
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
unset CDPATH
dnl Checking host/target/build systems, for make, install etc.
AC_CANONICAL_SYSTEM
dnl Perform program name transformation
AC_ARG_PROGRAM
dnl Automake doc recommends to do this only here. (Janos)
AM_INIT_AUTOMAKE(kio-apt, 0.13.2) dnl searches for some needed programs
KDE_SET_PREFIX
dnl generate the config header
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
dnl Checks for programs.
AC_CHECK_COMPILERS
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
KDE_PROG_LIBTOOL
dnl for NLS support. Call them in this order!
dnl WITH_NLS is for the po files
AM_KDE_WITH_NLS
KDE_USE_QT(3.0.0)
AC_PATH_KDE
dnl =======================================================
dnl FILE: configure.in.in
dnl =======================================================
#MIN_CONFIG(3.0.0)
dnl PACKAGE set before
AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN
AC_ARG_WITH(rpm,
[ --with-rpm use rpm instead of dpkg ],
[use_rpm=$withval],
[use_rpm=no])
echo -n "Package manager to use... "
AM_CONDITIONAL(USE_RPM, test "x$use_rpm" != "xno")
if [ test "x$use_rpm" != "xno" ]; then
AC_DEFINE_UNQUOTED(USE_RPM, 1, [Define if your package manager is not dpkg but RPM])
echo "rpm"
else
echo "dpkg"
fi
KDE_CREATE_SUBDIRSLIST
AC_CONFIG_FILES([ Makefile ])
AC_CONFIG_FILES([ po/Makefile ])
AC_CONFIG_FILES([ src/Makefile ])
AC_CONFIG_FILES([ src/parsers/Makefile ])
AC_OUTPUT
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
# And if so, warn when they don't match
if test "$kde_libs_prefix" != "$given_prefix"; then
# And if kde doesn't know about the prefix yet
echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
if test $? -ne 0; then
echo ""
echo "Warning: you chose to install this package in $given_prefix,"
echo "but KDE was found in $kde_libs_prefix."
echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
echo "Then restart KDE."
echo ""
fi
fi
fi
if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then
echo ""
echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility"
echo "was not included. Therefore, GCC symbol visibility support remains disabled."
echo ""
echo "For better performance, consider including the Qt visibility supporting patch"
echo "located at:"
echo ""
echo "http://bugs.kde.org/show_bug.cgi?id=109386"
echo ""
echo "and recompile all of Qt and KDE. Note, this is entirely optional and"
echo "everything will continue to work just fine without it."
echo ""
fi
if test "$all_tests" = "bad"; then
if test ! "$cache_file" = "/dev/null"; then
echo ""
echo "Please remove the file $cache_file after changing your setup"
echo "so that configure will find the changes next time."
echo ""
fi
else
echo ""
echo "Good - your configure finished. Start make now"
echo ""
fi

@ -0,0 +1,22 @@
#MIN_CONFIG(3.0.0)
AM_INIT_AUTOMAKE(kio-apt, 0.13.2)
AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN
AC_ARG_WITH(rpm,
[ --with-rpm use rpm instead of dpkg ],
[use_rpm=$withval],
[use_rpm=no])
echo -n "Package manager to use... "
AM_CONDITIONAL(USE_RPM, test "x$use_rpm" != "xno")
if [ test "x$use_rpm" != "xno" ]; then
AC_DEFINE_UNQUOTED(USE_RPM, 1, [Define if your package manager is not dpkg but RPM])
echo "rpm"
else
echo "dpkg"
fi

@ -0,0 +1,4 @@
POFILES = AUTO
clean:
rm -f *.gmo

@ -0,0 +1,165 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: 0.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2003-12-31 02:15+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Jakub Stachowski <qbast@go2.pl>\n"
"Language-Team: Polish <pl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apt.cpp:156
msgid "Search"
msgstr "Szukaj"
#: apt.cpp:157
msgid "Show"
msgstr "Pokaż"
#: apt.cpp:158
msgid "Policy"
msgstr "Ustawienia polityki"
#: apt.cpp:162
msgid "Search for a file"
msgstr "Szukaj pliku"
#: apt.cpp:163
msgid "List the files of a package"
msgstr "Lista plików pakietu"
#: apt.cpp:177 apt.cpp:178
msgid "Page generated by kio_apt."
msgstr "Strona wygenerowana przez kio_apt."
#: apt.cpp:323
msgid "AptCache"
msgstr ""
#: apt.cpp:324
msgid "AptCache Interface"
msgstr ""
#: apt.cpp:348
msgid "AptCache search result for %1"
msgstr ""
#: apt.cpp:349
msgid "Search result for \"%1\""
msgstr "Wyniki wyszukiwania \"%1\""
#: apt.cpp:358
msgid "Can't launch \"apt-cache search %1\""
msgstr "Nie można uruchomić \"apt-cache search %1\""
#: apt.cpp:367
msgid "%1 results"
msgstr "%1 wyników"
#: apt.cpp:406 apt.cpp:553 apt.cpp:723
msgid "\"%1\" is not a valid package name"
msgstr "\"%1\" nie jest prawidłową nazwą pakietu"
#: apt.cpp:416
msgid "AptCache show result for %1"
msgstr ""
#: apt.cpp:419 apt.cpp:425
msgid "Description for \"%1\""
msgstr "Opis \"%1\""
#: apt.cpp:420
msgid "List package files"
msgstr "Lista plików pakietu"
#: apt.cpp:434 apt.cpp:573
msgid "Can't launch \"apt-cache policy %1\""
msgstr "Nie można uruchomić \"apt-cache policy %1\""
#: apt.cpp:444
msgid "Can't launch \"apt-cache show %1\""
msgstr "Nie można uruchomić \"apt-cache show %1\""
#: apt.cpp:460
msgid "No package found named \"%1\""
msgstr "Nie znaleziono pakietu o nazwie \"%1\""
#: apt.cpp:464
msgid "%1 versions found"
msgstr "Znaleziono %1 wersji"
#: apt.cpp:531
msgid "Version %1"
msgstr "Wersja %1"
#: apt.cpp:565
msgid "AptCache policy result for %1"
msgstr ""
#: apt.cpp:566
msgid "APT Policy for \"%1\""
msgstr "Polityka APT dla \"%1\""
#: apt.cpp:593
msgid "Installed"
msgstr "Zainstalowany"
#: apt.cpp:595
msgid "Candidate"
msgstr "Kandydat"
#: apt.cpp:599
msgid "The table of available versions"
msgstr "Tablela dostępnych wersji"
#: apt.cpp:602
msgid "Version Table"
msgstr "Tabela wersji"
#: apt.cpp:659
msgid "File search for %1"
msgstr "Szukanie pliku %1"
#: apt.cpp:660
msgid "File search for \"%1\""
msgstr "Szukanie pliku \"%1\""
#: apt.cpp:668 apt.cpp:746
msgid "Can't launch the package manager"
msgstr "Nie można uruchomić menedżera pakietów"
#: apt.cpp:672
msgid "%1 files found"
msgstr "Znaleziono %1 plików"
#: apt.cpp:735
msgid "Package file list for %1"
msgstr "Lista plików pakietu %1"
#: apt.cpp:736
msgid "Package file list for \"%1\""
msgstr "Lista plików pakietu \"%1\""
#: apt.cpp:737
msgid "Show package info"
msgstr "Pokaż informacje o pakiecie"
#: apt.cpp:750
msgid "%1 files in the package"
msgstr "%1 plików w pakiecie"
#: dpkg.cpp:73
msgid "%1 not found"
msgstr "Nie znaleziono %1"
#: dpkg.cpp:110
msgid "Package %1 is not installed"
msgstr "Pakiet %1 nie jest zainstalowany"

@ -0,0 +1,258 @@
# Swedish translation of kio-apt.
# Copyright (C) 2006 Free Software Foundation, Inc.
# This file is distributed under the same license as the kio-apt package.
# Daniel Nylander <po@danielnylander.se>, 2006.
#
msgid ""
msgstr ""
"Project-Id-Version: kio-apt 0.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2003-12-31 02:15+0100\n"
"PO-Revision-Date: 2006-06-25 23:34+0100\n"
"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apt.cpp:134 apt.cpp:135
msgid "Page generated by kio_apt."
msgstr "Sidan genererades av kio_apt."
#: apt.cpp:167
msgid "Hide extended form"
msgstr "Dölj utökat formulär"
#: apt.cpp:167
msgid "Show extended form"
msgstr "Visa utökat formulär"
#: apt.cpp:200
msgid "Offline search"
msgstr "Frånkopplad sökning"
#: apt.cpp:201
msgid "Package search"
msgstr "Paketsökning"
#: apt.cpp:205
msgid "File search"
msgstr "Filsökning"
#: apt.cpp:206
msgid "Package info"
msgstr "Paketinformation"
#: apt.cpp:208
msgid "Search"
msgstr "Sök"
#: apt.cpp:236
msgid "KDE on Debian"
msgstr "KDE på Debian"
#: apt.cpp:299
msgid "\"%1\" is not a valid package name"
msgstr "\"%1\" är inte ett giltigt paketnamn"
#: apt.cpp:454
msgid "Search Form"
msgstr "Sökformulär"
#: apt.cpp:476
msgid "Package search result for \"%1\""
msgstr "Paketsökresultat för \"%1\""
#: apt.cpp:482
msgid "Error launching the search"
msgstr "Fel vid start av sökning"
#: apt.cpp:487
msgid "%1 results"
msgstr "%1 resultat"
#: apt.cpp:504
msgid "Hide file list"
msgstr "Dölj fillista"
#: apt.cpp:504
msgid "Show file list"
msgstr "Visa fillista"
#: apt.cpp:543
msgid "Can't launch \"apt-cache policy %1\""
msgstr "Kan inte starta \"apt-cache policy %1\""
#: apt.cpp:554 apt.cpp:560
msgid "Package description for \"%1\""
msgstr "Paketbeskrivning för \"%1\""
#: apt.cpp:555
msgid "List package files"
msgstr "Lista paketfiler"
#: apt.cpp:573
msgid "Can't launch \"apt-cache show %1\""
msgstr "Kan inte starta \"apt-cache show %1\""
#: apt.cpp:578
msgid "No package found named \"%1\""
msgstr "Inget paket hittades med namnet \"%1\""
#: apt.cpp:604
#, c-format
msgid "Error listing files of %1"
msgstr "Fel vid listning av filer i %1"
#: apt.cpp:616
msgid "Cannot list files for non-installed packages"
msgstr "Kan inte lista filer för icke-installerade paket"
#: apt.cpp:643
msgid "Apt policy for \"%1\""
msgstr "Apt-policy för \"%1\""
#: apt.cpp:649
#, c-format
msgid "Can't launch the policy for %1"
msgstr "Kan inte starta policyn för %1"
#: apt.cpp:682
msgid "File search for \"%1\""
msgstr "Filsökning efter \"%1\""
#: apt.cpp:688 apt.cpp:735
msgid "Can't launch the package manager"
msgstr "Kan inte starta pakethanteraren"
#: apt.cpp:693
msgid "%1 files found"
msgstr "%1 filer hittades"
#: apt.cpp:725
msgid "Files in \"%1\""
msgstr "Filer i \"%1\""
#: apt.cpp:726
msgid "Show package info"
msgstr "Visa paketinformation"
#: apt.cpp:781
msgid "No package manager command specified"
msgstr "Inget kommando för pakethanterare har angivits"
#: apt.cpp:787
msgid "No package specified"
msgstr "Inget paket angivit"
#: apt.cpp:796
msgid "Both package version and distribution are specified"
msgstr "Både paketversion och distribution har angivits"
#: dpkg.cpp:90 rpm.cpp:91
msgid "%1 not found"
msgstr "%1 hittades inte"
#: dpkg.cpp:127 rpm.cpp:121
msgid "Package %1 is not installed"
msgstr "Paketet %1 är inte installerat"
#: dpkg.cpp:184
msgid "packages.ubuntu.com"
msgstr "packages.ubuntu.com"
#: dpkg.cpp:186 rpm.cpp:181
msgid "File to search"
msgstr "Fil att söka efter"
#: dpkg.cpp:187 rpm.cpp:182
msgid "Architecture"
msgstr "Arkitektur"
#: dpkg.cpp:188
msgid "Intel x86"
msgstr "Intel x86"
#: dpkg.cpp:189
msgid "AMD 64"
msgstr "AMD 64"
#: dpkg.cpp:190 rpm.cpp:192
msgid "PowerPC"
msgstr "PowerPC"
#: dpkg.cpp:192
msgid "Version"
msgstr "Version"
#: dpkg.cpp:199 rpm.cpp:208
msgid "Go online!"
msgstr "Gå online!"
#: rpm.cpp:179
msgid "rpmfind.net"
msgstr "rpmfind.net"
#: rpm.cpp:183
msgid "All"
msgstr "Alla"
#: rpm.cpp:184
msgid "Source"
msgstr "Källkod"
#: rpm.cpp:185
msgid "Intel 386"
msgstr "Intel 386"
#: rpm.cpp:186
msgid "Intel 486"
msgstr "Intel 486"
#: rpm.cpp:187
msgid "Intel 586"
msgstr "Intel 586"
#: rpm.cpp:188
msgid "Intel 686"
msgstr "Intel 686"
#: rpm.cpp:189
msgid "Motorola 680x0"
msgstr "Motorola 680x0"
#: rpm.cpp:190
msgid "Alpha"
msgstr "Alpha"
#: rpm.cpp:191
msgid "SPARC"
msgstr "SPARC"
#: rpm.cpp:193
msgid "ARM"
msgstr "ARM"
#: rpm.cpp:194
msgid "HP PA/RISC"
msgstr "HP PA/RISC"
#: rpm.cpp:195
msgid "Intel IA-64"
msgstr "Intel IA-64"
#: rpm.cpp:196
msgid "MIPS"
msgstr "MIPS"
#: rpm.cpp:197
msgid "MIPS (DEC)"
msgstr "MIPS (DEC)"
#: rpm.cpp:198
msgid "IBM S/390"
msgstr "IBM S/390"
#: rpm.cpp:200
msgid "Distribution"
msgstr "Distribution"

@ -0,0 +1,25 @@
INCLUDES = $(all_includes)
kde_module_LTLIBRARIES = kio_apt.la
METASOURCES = AUTO
kio_apt_la_SOURCES = aptcache.cpp apt.cpp regexps.cpp packagemanager.cpp dpkg.cpp
kio_apt_la_LIBADD = $(top_builddir)/src/parsers/libparsers.la -lkio
kio_apt_la_LDFLAGS = -avoid-version -module $(all_libraries) $(KDE_PLUGIN)
protocoldir = $(kde_servicesdir)
protocol_DATA = apt.protocol apt+http.protocol
appdatadir = $(kde_datadir)/kio_apt/
appdata_DATA = kio_apt.css kdedeb_logo.png
messages: rc.cpp
$(XGETTEXT) *.cpp -o $(podir)/kio_apt.pot
noinst_HEADERS = debug.h aptcache.h apt.h regexps.h dpkg.h packagemanager.h
searchproviderdir = $(kde_servicesdir)/searchproviders
searchprovider_DATA = apt-search.desktop apt-file.desktop apt-files.desktop
SUBDIRS = parsers

@ -0,0 +1,11 @@
[Protocol]
exec=kio_apt
protocol=apt+http
input=none
output=stream
reading=true
defaultMimetype=text/html
Icon=remote
Description=A kioslave for using apt-cache functionalities inside konqueror
determineMimetypeFromExtension=false
DocPath=kio_apt/index.html

@ -0,0 +1,8 @@
[Desktop Entry]
Charset=
Hidden=false
Keys=apt-file
Name=APT - Find File
Query=apt:/fsearch?\\{@}
ServiceTypes=SearchProvider
Type=Service

@ -0,0 +1,8 @@
[Desktop Entry]
Charset=
Hidden=false
Keys=apt-files
Name=APT - Filelist
Query=apt:/list?\\{@}
ServiceTypes=SearchProvider
Type=Service

@ -0,0 +1,8 @@
[Desktop Entry]
Charset=
Hidden=false
Keys=apt-search
Name=APT - Search Package
Query=apt:/search?\\{@}
ServiceTypes=SearchProvider
Type=Service

@ -0,0 +1,946 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* The forms are by Willy De la Court <wdl@linux-lovers.be> *
* *
* 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. *
***************************************************************************/
#include "apt.h"
#include "regexps.h"
#include "dpkg.h"
#include "parsers/parsers.h"
#include <qcstring.h>
#include <kapplication.h>
#include <kinstance.h>
#include <kglobal.h>
#include <kconfig.h>
#include <kstandarddirs.h>
#include <klocale.h>
#include <kurl.h>
#include <kio/slavebase.h>
#include <kmessagebox.h>
#include <kdebug.h>
#include <qregexp.h>
#include <stdlib.h>
#include <config.h>
using namespace KIO;
/*************************************************************************
* Common definitions of HTML fragments
*/
static const QString
html_preamble("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Strict//EN\"\n"
"\t\"http://www.w3.org/TR/html4/strict.dtd\">\n"
"<html>\n");
static const QString
html_redirect(html_preamble +
QString("<head>\n"
"\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n"
"\t<meta http-equiv=\"Refresh\" content=\"0 ; URL=%1\">\n"
"</head>\n"
"\n<body></body>\n"
"</html>"));
static const QString
html_head(html_preamble +
QString("<head>\n"
"\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n"
"\t<link rel=\"stylesheet\" href=\"file:%1\">\n"
"\t<title>%2</title>\n"
"</head>\n\n"
"<body>\n"));
static QString close_html_head();
static QString open_html_head(const QString& title, bool links, AptProtocol const& config)
{
static const QString
html_head_table(
"<table class=\"header\" style=\"background-image: url(file:%1);\"\n"
"\t\tcellspacing=\"0\" cellpadding=\"0\">\n"
"<tr>\n"
"\t<td class=\"logo\" %2><img src=\"file:%3\" alt=\"%4\" style=\"border: 0px\" /></td>\n"
"\t<td class=\"header-title\">%4</td>\n");
QString rowspan;
if (links) rowspan = "rowspan=\"2\"";
QString ret =
html_head
.arg(config.stylesheet())
.arg(title)
+ html_head_table
.arg(config.header_background())
.arg(rowspan)
.arg(config.logo())
.arg(config.logo_alt())
.arg(title);
if (links)
{
return ret +
"</tr>\n"
"<tr>\n"
"\t<td class=\"links\">\n"
"\t<table class=\"links\" cellspacing=\"0\" cellpadding=\"0\">\n"
"\t<tr>\n";
}
else
{
return ret + "</tr>\n</table>\n\n";
}
}
static QString add_html_head_link(const QString& url, const QString& name, const QString& long_desc)
{
static const QString format("\t\t<td><a href=\"%1\" title=\"%2\">%3</a></td>\n");
return format.arg(url).arg(long_desc).arg(name);
}
static QString close_html_head()
{
return "\t</tr>\n"
"\t</table>\n"
"\t</td>\n"
"</tr>"
"</table>";
}
static const QString
html_tail("<div class=\"footer\">%1</div>\n"
"</body>\n"
"</html>");
QString AptProtocol::make_html_tail(const QString& note, bool with_form)
{
with_form = m_search && with_form;
QString ret;
if (with_form)
ret = "<hr>\n" + make_html_form();
if (!note.isEmpty())
ret += html_tail.arg(note + ". " + i18n("Page generated by kio_apt."));
else ret += html_tail.arg(i18n("Page generated by kio_apt."));
return ret;
}
/**********************************************************************************
* Search form
*/
static const QString
html_form_begin("\n<form action=\"apt:/\" method=\"GET\">\n"
"<table class=\"query\">\n");
static const QString
html_form_end("<tr>\n"
"\t<td class=\"button\" colspan=\"2\"><input type=\"submit\" value=\"%1\"></td>\n"
"</tr>\n"
"</table>\n"
"</form>\n");
static const QString
html_form_line("<tr>\n"
"\t<td><label for=\"%1\">%2</label></td>\n"
"\t<td><input type=\"text\" name=\"%3\" id=\"%4\"></td>\n"
"</tr>\n");
static QString make_html_form_line(const QString& type, const QString& label)
{ return html_form_line.arg(type).arg(label).arg(type).arg(type); }
static QString make_extform_cmd(bool ext_form, const KURL& query)
{
QString cmd = ext_form ? "0" : "1";
QString msg = ext_form ? i18n("Hide extended form") : i18n("Show extended form");
KURL url(query);
url.addQueryItem("extended_form", cmd);
url.setRef("extformcmd");
return
"<div class=\"command\" id=\"extformcmd\">\n"
"\t<a href=\"" + url.htmlURL() + "\">[" + msg + "]</a>\n"
"</div>\n";
}
/** Prints the HTML code for the query form */
QString AptProtocol::make_html_form() const
{
bool can_fsearch = false;
bool ext_form = KGlobal::config() -> readBoolEntry("extended_form", true);
// Only in config-file. Needed for some dpkg-based distros that are not Debian
can_fsearch = can_searchfile(true);
bool online = false;
bool online_form = KGlobal::config() -> readBoolEntry("online_form", true);
if (m_adept_batch)
online = online_form && (!m_internal) && ext_form && m_adept_batch -> capabilities(PackageManager::ONLINE);
QString ret;
QTextOStream stream(&ret);
stream << make_extform_cmd(ext_form, m_query);
if (online)
stream << "<table class=\"queryform\"><tr><td>\n";
stream << html_form_begin;
stream << "<tr><td colspan=\"2\" class=\"title\">" + i18n("Offline search") + "</td></tr>" << endl;
stream << make_html_form_line("search", i18n("Package search"));
if (ext_form)
{
if (can_fsearch)
stream << make_html_form_line("fsearch", i18n("File search"));
stream << make_html_form_line("show", i18n("Package info"));
}
stream << html_form_end.arg( i18n("Search") );
if (online)
{
stream << "\n</td><td>\n";
stream << m_adept_batch -> getOnlineForm();
stream << "\n</td></tr>\n</table>";
}
return ret;
}
/****************************************************************************************/
AptProtocol::AptProtocol( const QCString &pool_socket, const QCString &app_socket )
: SlaveBase( "kio_apt", pool_socket, app_socket ),
m_adept_batch(0), m_parser(0)
{
KStandardDirs* dirs = KGlobal::dirs();
m_stylesheet = dirs->findResource( "data", "kio_apt/kio_apt.css" );
m_logo = dirs->findResource( "data", "kio_apt/"
+ KGlobal::config() -> readEntryUntranslated("logo", "kdedeb_logo.png" ) );
m_header_background = dirs->findResource( "data", "kio_apt/"
+ KGlobal::config() -> readEntryUntranslated("background", "headerbg.png" ) );
m_logo_alt = KGlobal::config() -> readEntryUntranslated("alt_tag", i18n("KDE on Debian") );
connect(&m_process, SIGNAL(token(const QString&, const QString&)),
this, SLOT(token_dispatch(const QString&, const QString&)));
m_adept_batch = new Dpkg(this);
if (m_adept_batch)
{
connect(m_adept_batch, SIGNAL(token(const QString&, const QString&)),
this, SLOT(token_dispatch(const QString&, const QString&)));
}
}
AptProtocol::~AptProtocol() {}
QString AptProtocol::stylesheet() const { return m_stylesheet; }
QString AptProtocol::logo() const { return m_logo; }
QString AptProtocol::logo_alt() const { return m_logo_alt; }
QString AptProtocol::header_background() const { return m_header_background; }
void AptProtocol::token_dispatch(const QString& name, const QString& val)
{
if (m_parser.get())
(*m_parser)(this, name, val);
}
void AptProtocol::data(const QCString& string)
{
using namespace Parsers;
(*this) << string;
}
void AptProtocol::data(const QString& string)
{
using namespace Parsers;
(*this) << string;
}
void AptProtocol::data(const char* string)
{
using namespace Parsers;
(*this) << string;
}
void AptProtocol::data(const QByteArray& array)
{ SlaveBase::data(array); }
void AptProtocol::mimetype( const KURL & /*url*/ )
{
mimeType( "text/html" );
finished();
}
bool AptProtocol::check_validpackage(const QString& query)
{
static QRegExp rx_pkgname(rxs_pkgname);
if (!rx_pkgname.exactMatch(query))
{
error( ERR_SLAVE_DEFINED, i18n("\"%1\" is not a valid package name").arg(query) );
return false;
}
return true;
}
/********************************************************************
* Main entry point
*/
static QString read_option(QMap<QString, QString>& map, const QString& name, const QString& def)
{
if (!map.contains(name)) return def;
QString ret = map[name];
map.remove(name);
return ret;
}
void AptProtocol::get ( const KURL& url )
{
/* The queries have two possible formats :
- clean way to call a command
apt:/command?query&option=value&option=value&...
- needed to simplify forms
apt:/?command=query&command2=&command3=&option=value&option=value&...
- calls only the query form page
apt:/
*/
typedef void (AptProtocol::*Command)(const QString&, const QueryOptions&);
static const QString commands[] =
{ "search", "show", "policy",
"fsearch", "list", "online",
"get", QString::null };
static const Command methods[] =
{ &AptProtocol::search, &AptProtocol::show, &AptProtocol::policy,
&AptProtocol::searchfile, &AptProtocol::listfiles, &AptProtocol::online,
&AptProtocol::adept_batch };
QString command, query;
Command method = 0;
QueryOptions options = url.queryItems(KURL::CaseInsensitiveKeys);
// canonize the part before ? : remove the first /
QString path = url.path();
QString host = url.host();
if ( path.isEmpty() && !host.isEmpty() )
{
path = host;
}
if (path [0] == '/')
path = path.right(path.length() - 1);
for (int cmd_idx = 0; !commands[cmd_idx].isNull(); ++cmd_idx)
{
const QString cmd_it = commands[cmd_idx];
// Look if the command is in the path part
if (command.isEmpty() && cmd_it == path)
{
command = cmd_it;
method = methods[cmd_idx];
}
if (options.contains(cmd_it))
{
if (options[cmd_it].isEmpty() && !options[cmd_it].isNull())
{ // we have a &command=& format, we remove it
options.remove(cmd_it);
}
else if (command.isEmpty() && !options[cmd_it].isEmpty())
{ // the command is set in the options map
command = cmd_it;
method = methods[cmd_idx];
query = options[cmd_it];
options.remove(cmd_it);
}
}
}
// Well, we have no query for now, let's find it
if (query.isEmpty())
{
for (QueryOptions::Iterator i = options.begin(); i != options.end(); ++i)
{
if ((*i).isNull())
{
query = KURL::decode_string(i.key());
options.remove(i);
break;
}
}
}
// Interpret the ioslave config options
// and remove them from the options map
QString opt = read_option(options, "extended_form", QString::null);
if (!opt.isNull())
{
bool ext_form = (opt != "0");
KGlobal::config() -> writeEntry("extended_form", ext_form);
}
// Enable install/remove/upgrade/...
opt = read_option(options, "enable_actions", "1");
m_act = (opt != "0");
opt = read_option(options, "enable_search", "1");
m_search = (opt != "0");
// Allow links outside of apt:/ hierarchy
opt = read_option(options, "stay_internal", "0");
m_internal = (opt == "1");
// Sync the config (must use kcfg sometime :p)
KGlobal::config() -> sync();
if (command.isEmpty() || query.isEmpty())
{
//If path isn't empty, then a package is to be installed via an apt:/ link
if ( !path.isEmpty())
{
query = "install";
options["package"] = path;
options["weblinkinstall"] = 1;
adept_batch(query, options);
return;
}
// No query or no command, we go in help mode
m_query = buildURL(KURL("apt:/"));
help();
}
else
{
m_query = buildURL(command, query);
m_query.setHTMLRef(url.htmlRef());
for (QueryOptions::ConstIterator i = options.begin(); i != options.end(); ++i)
m_query.addQueryItem(i.key(), i.data());
kdDebug() << "Old url " << url << ", new url " << m_query << endl;
if (m_query != url)
{
redirection(m_query);
data(QByteArray());
finished();
return;
}
(this->*method)(query, options);
}
}
/***********************************************************************************
*
* form
*
*/
void AptProtocol::help()
{
mimeType("text/html");
QString buffer;
QTextOStream stream(&buffer);
stream
<< open_html_head(i18n("Search Form"), false, *this)
<< make_html_form()
<< make_html_tail(QString::null, false);
data(buffer);
data(QByteArray());
finished();
}
/***********************************************************************************
* apt-cache search
*/
void AptProtocol::search( const QString& query, const QueryOptions& /*options*/ )
{
mimeType("text/html");
data(open_html_head(i18n("Package search result for \"%1\"").arg(query), false, *this));
m_parser.reset(new Parsers::Search);
(*m_parser)(this, "begin", query);
if (!m_process.search( query ))
{
error(ERR_SLAVE_DEFINED, i18n("Error launching the search").arg(query));
return;
}
(*m_parser)(this, "end", QString::null);
data(make_html_tail( i18n("%1 results").arg(m_parser -> result_count())) );
data(QByteArray());
finished();
}
/***********************************************************************************
* apt-cache show
*/
static QString filelist_cmd(bool show_filelist, const KURL& query)
{
QString value = show_filelist ? "0" : "1";
QString msg = show_filelist ? i18n("Hide file list") : i18n("Show file list");
KURL url(query);
url.addQueryItem("show_filelist", value);
url.setRef("filelistcmd");
return
"<div class=\"command\" id=\"filelistcmd\">\n"
"\t<a href=\"" + url.htmlURL() + "\">"
"[" + msg + "]"
"</a>\n"
"</div>";
}
void AptProtocol::show(const QString& package, const QueryOptions& options)
{
if (!check_validpackage(package)) return;
if (options.contains("show_filelist"))
{
KGlobal::config() -> writeEntry("show_filelist", options["show_filelist"] != "0");
KGlobal::config() -> sync();
}
mimeType("text/html");
QString installed_version;
/** First, we parse policy
* We use here the fact that HTML is generated
* during the call of (*policy)(...,"end",...),
* since the header changes when the package
* is installed or not */
Parsers::Policy* policy = new Parsers::Policy(package, m_act);
m_parser.reset(policy);
(*m_parser)(this, "begin", QString::null);
{
if (!m_process.policy( package ))
{
error(ERR_SLAVE_DEFINED, i18n("Can't launch \"apt-cache policy %1\"").arg(package));
return;
}
installed_version = policy->getInstalled();
bool can_list = can_listfiles(!installed_version.isEmpty());
QString buffer;
QTextOStream s(&buffer);
if (can_list)
{
KURL url = buildURL("list", package);
s << open_html_head(i18n("Package description for \"%1\"").arg(package), true, *this)
<< add_html_head_link(url.htmlURL(), i18n("List package files"), "")
<< close_html_head();
}
else
{
s << open_html_head(i18n("Package description for \"%1\"").arg(package), false, *this);
}
data(buffer);
}
(*m_parser)(this, "end", QString::null);
/** Add package description section */
m_parser.reset(new Parsers::Show(package, installed_version, m_act));
(*m_parser)(this, "begin", QString::null);
{
if (!m_process.show(package))
{
error(ERR_SLAVE_DEFINED, i18n("Can't launch \"apt-cache show %1\"").arg(package));
return;
}
if (!m_parser -> result_count())
{
data("<div class=\"error\">" + i18n("No package found named \"%1\"").arg(package) + "</div>\n");
data(make_html_tail());
data(QByteArray());
finished();
return;
}
}
(*m_parser)(this, "end", QString::null);
/** Add file list (if enabled) */
bool show_filelist = KGlobal::config() -> readBoolEntry("show_filelist", false);
if ( show_filelist )
{
if (can_listfiles(!installed_version.isEmpty()))
{
data(
"<hr>\n"
+ filelist_cmd(show_filelist, m_query)
+ "<div class=\"filelist\">\n");
m_parser.reset(new Parsers::List(!m_internal));
(*m_parser)(this, "begin", QString::null);
if (!m_adept_batch -> list(package))
{
error(ERR_SLAVE_DEFINED, i18n("Error listing files of %1").arg(package));
return;
}
(*m_parser)(this, "end", QString::null);
data("\n</div>\n");
}
else // cannot list files
{
data(
"<hr>\n"
+ filelist_cmd(show_filelist, m_query)
+ "<div class=\"error\">" + i18n("Cannot list files for non-installed packages") + "</div>\n");
}
}
else
{
data("<hr>\n" + filelist_cmd(show_filelist, m_query));
}
data(make_html_tail());
data(QByteArray());
finished();
}
/***********************************************************************************
* apt-cache policy
*/
void AptProtocol::policy( const QString& query, const QueryOptions& /*options*/ )
{
if (!check_validpackage(query)) return;
mimeType("text/html");
data( open_html_head(i18n("Apt policy for \"%1\"").arg(query), false, *this) );
m_parser.reset(new Parsers::Policy(query, m_act));
(*m_parser)(this, "begin", QString::null);
if (!m_process.policy( query ))
{
error(ERR_SLAVE_DEFINED, i18n("Can't launch the policy for %1").arg(query));
return;
}
(*m_parser)(this, "end", QString::null);
data(make_html_tail());
data(QByteArray());
finished();
}
/***********************************************************************************
* Search the package which contains a specific file
*/
static const QString
html_dpkgs_begin("\n\n<table>\n"),
html_dpkgs_end("\n\n</table>\n");
bool AptProtocol::can_searchfile(bool is_installed) const
{
if (!m_adept_batch) return false;
int caps = m_adept_batch -> capabilities(PackageManager::SEARCH_FILE | PackageManager::OFFLINE);
if (!caps) return false;
return is_installed || !(caps & PackageManager::INSTALLED_ONLY);
}
void AptProtocol::searchfile(const QString& query, const QueryOptions& /*options*/)
{
if (!can_searchfile(true)) return;
mimeType("text/html");
data( open_html_head(i18n("File search for \"%1\"").arg(query), false, *this) + html_dpkgs_begin );
m_parser.reset(new Parsers::FileSearch);
(*m_parser)(this, "begin", QString::null);
if (!m_adept_batch -> search( query ))
{
error(ERR_SLAVE_DEFINED, i18n("Can't launch the package manager").arg(query));
return;
}
(*m_parser)(this, "end", QString::null);
data( html_dpkgs_end + make_html_tail(i18n("%1 files found").arg(m_parser -> result_count())) );
data(QByteArray());
finished();
}
/***********************************************************************************
* List the files of a package
*/
bool AptProtocol::can_listfiles(bool is_installed) const
{
if (!m_adept_batch) return false;
int caps = m_adept_batch -> capabilities(PackageManager::LIST_FILES | PackageManager::OFFLINE);
if (!caps) return false;
return is_installed || !(caps & PackageManager::INSTALLED_ONLY);
}
void AptProtocol::listfiles(const QString& query, const QueryOptions& /*options*/)
{
if (!can_listfiles(true)) return;
if (!check_validpackage(query)) return;
mimeType("text/html");
KURL ret_url = buildURL("show", query);
QString buffer;
QTextOStream stream(&buffer);
stream
<< open_html_head(i18n("Files in \"%1\"").arg(query), true, *this)
<< add_html_head_link(ret_url.htmlURL(), i18n("Show package info"), "")
<< close_html_head()
<< endl;
data(buffer);
m_parser.reset(new Parsers::List(!m_internal));
(*m_parser)(this, "begin", QString::null);
if (!m_adept_batch -> list( query ))
{
error(ERR_SLAVE_DEFINED, i18n("Can't launch the package manager").arg(query));
return;
}
(*m_parser)(this, "end", QString::null);
data(make_html_tail());
data(QByteArray());
finished();
}
/***********************************************************************************
* Go use online search services (like packages.debian.org for instance)
*/
//bool AptProtocol::can_online(int mode) const
//{
//// if (!m_adept_batch) return false;
//// return m_adept_batch -> capabilities(PackageManager::ONLINE | mode);
// return false;
//}
void AptProtocol::online(const QString& query, const QueryOptions& options)
{
QString url = m_adept_batch -> getOnlineURL(query, options);
redirection(url);
finished();
return;
}
/***********************************************************************************
* Send commands for adept_batch
*/
void AptProtocol::adept_batch(const QString& query, const QueryOptions& options)
{
p=NULL;
QString command;
QString url;
QStringList plist;
QStringList puninst;
QStringList pinst;
int pcount;
int ip;
if (query == "install" || query.isEmpty()) {
command = "kdesu adept_batch install ";
} else if (query == "remove") {
command = "kdesu adept_batch remove ";
}
if (command.isEmpty())
{
error(ERR_SLAVE_DEFINED, i18n("No package manager command specified"));
return;
}
if (!options.contains("package"))
{
error(ERR_SLAVE_DEFINED, i18n("No package specified"));
return;
}
plist = QStringList::split(", ", options["package"], false);
pcount = plist.count();
command += plist.join(" ");
if (pcount == 1)
{
if (query == "install")
ip = SlaveBase::messageBox(QuestionYesNo, i18n("Do you want to install %1 ?").arg(plist[0]), i18n("Package Installation"));
else
ip = SlaveBase::messageBox(QuestionYesNo, i18n("Do you want to remove %1 ?").arg(plist[0]), i18n("Package Removal"));
}
else
{
if (query == "install")
ip = SlaveBase::messageBox(QuestionYesNo,i18n("Do you want to install the following %1 packages ?\n%2").arg(pcount).arg(options["package"]));
else
ip = SlaveBase::messageBox(QuestionYesNo,i18n("Do you want to remove the following %1 packages ?\n").arg(pcount).arg(options["package"]));
}
kdDebug(DEBUG_ZONE) << command << endl;
if (ip == KMessageBox::Yes)
{
p = new KShellProcess;
p->clearArguments();
*p << command;
p->start( KProcess::Block, KProcess::All );
for(int i = 0; i != pcount; ++i)
{
QString installed_version;
Parsers::Policy* policy = new Parsers::Policy(plist[i], m_act);
m_parser.reset(policy);
(*m_parser)(this, "begin", QString::null);
{
if (!m_process.policy( plist[i] ))
{
error(ERR_SLAVE_DEFINED, i18n("Can't launch \"apt-cache policy %1\"").arg(plist[i]));
return;
}
installed_version = policy->getInstalled();
if (installed_version.isEmpty())
{
puninst += plist[i];
}
else
{
pinst += plist[i];
}
}
}
if (options.contains("weblinkinstall"))
{
if (puninst.count() == 0)
{
messageBox(Information,i18n("Installation successfull."));
}
else
{
QString toto = puninst.join(" ");
messageBox(Information,i18n("There was a problem installing %1.").arg(toto));
}
return;
}
else
{
url = "apt:/show?";
// Outside of a weblink, only one package can be installed at time
url += plist[0];
redirection(url);
data(QByteArray());
finished();
return;
}
}
else
{
return;
}
}
KURL AptProtocol::buildURL( const QString & command, const QString & query ) const
{
KURL url;
url.setProtocol("apt");
if (!command.startsWith("/"))
url.setPath("/" + command);
else
url.setPath(command);
url.setQuery(query);
return buildURL(url);
}
KURL AptProtocol::buildURL( const KURL& query ) const
{
KURL url(query);
if (!m_act)
url.addQueryItem("enable_actions", "0");
if (!m_search)
url.addQueryItem("enable_search", "0");
if (m_internal)
url.addQueryItem("stay_internal", "1");
return url;
}
/***********************************************************************************
*
* kdemain
*
*/
extern "C" {
int kdemain( int argc, char **argv ) {
KInstance instance( "kio_apt" );
if ( argc != 4 ) {
kdDebug( DEBUG_ZONE ) << "Usage: kio_apt protocol domain-socket1 domain-socket2" << endl;
exit ( -1 );
}
AptProtocol slave( argv[ 2 ], argv[ 3 ] );
slave.dispatchLoop();
return 0;
}
}
#include "apt.moc"

@ -0,0 +1,137 @@
#ifndef KIOAPT_APTPROTOCOL_H
#define KIOAPT_APTPROTOCOL_H
#include <qstring.h>
#include <qcstring.h>
#include <kurl.h>
#include <kio/global.h>
#include <kio/slavebase.h>
#include "debug.h"
#include "aptcache.h"
#include "packagemanager.h"
#include <memory>
class QCString;
namespace Parsers
{
class Parser;
}
class AptProtocol : public QObject, public KIO::SlaveBase {
Q_OBJECT
friend class AptCache;
AptCache m_process;
PackageManager* m_adept_batch;
typedef QMap<QString, QString> QueryOptions;
/** This this the URL that should be used if we want
* to get the same output again. It is especially
* used in the make_html_form for the command link.
*
* The get() method sets it to apt:/command?query
* the various methods should add the relevant options,
* that is options which modify the query itself.
* The GUI-related options (like show_filelist in the
* show command) should NOT be added
*/
KURL m_query;
/** if m_act is false, the ioslave is in browse-only
* mode (for forbidding install, for instance) */
bool m_act, m_search, m_internal;
QString m_stylesheet;
QString m_header_background;
QString m_logo;
QString m_logo_alt;
public:
AptProtocol( const QCString &pool_socket, const QCString &app_socket );
virtual ~AptProtocol();
virtual void mimetype( const KURL& url );
virtual void get ( const KURL& url );
/** Sends the string to the ioslave's master
* SlaveBase::data() sends a byte array as is. Since we
* definitely don't want to send \0 to the master,
* we redefine data() for strings */
void data(const QCString& string);
/** @overload */
void data(const QString& string);
/** @overload */
void data(const char* string);
void data(const QByteArray& array);
KURL buildURL(const QString& command, const QString& query) const;
KURL buildURL(const KURL& query) const;
QString stylesheet() const;
QString header_background() const;
QString logo() const;
QString logo_alt() const;
private slots:
void token_dispatch(const QString& tag, const QString& value);
private:
std::auto_ptr<Parsers::Parser> m_parser;
/** apt-cache search
* Performs apt-cache search, with the query encoded in url.query()
* and sends the result as an HTML file */
void search( const QString& url, const QueryOptions& options );
/** apt-cache show
* Performs apt-cache search, with the package name encoded in url.query()
* and sends the result as an HTML file.
* It checks that the query contains a valid package name */
void show( const QString& url, const QueryOptions& options );
/** apt-cache policy
* Performs apt-cache policy, with the package name encoded in url.query()
* and sends the result as an HTML file.
* It checks that the query contains a valid package name */
void policy( const QString& url, const QueryOptions& options );
/**
* Sends an application/x-adept_batch file with commands
* understandable by adept_batch */
void adept_batch( const QString& url, const QueryOptions& options );
/**
* Shows a form where one can enter parameters for some queries
**/
void help();
/** Offline listing of the file of a package */
bool can_listfiles(bool is_installed) const;
void listfiles( const QString& query, const QueryOptions& options);
/** Offline file search.
* Searches the package which contains the specified file */
bool can_searchfile(bool is_installed) const;
void searchfile( const QString& query, const QueryOptions& options);
bool can_online(int mode) const;
void online( const QString& query, const QueryOptions& options);
bool check_validpackage(const QString& query);
QString make_html_form() const;
QString make_html_tail(const QString& note = QString::null, bool with_form = true);
KShellProcess * p;
};
#endif

@ -0,0 +1,11 @@
[Protocol]
exec=kio_apt
protocol=apt
input=none
output=stream
reading=true
defaultMimetype=text/html
Icon=kioapt
Description=A kioslave for using apt-cache functionalities inside konqueror
determineMimetypeFromExtension=false
DocPath=kio_apt/index.html

@ -0,0 +1,292 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/
#include "aptcache.h"
#include "apt.h"
#include "debug.h"
#include "regexps.h"
#include <qstringlist.h>
#include <qregexp.h>
#include <kdebug.h>
#include <stdlib.h>
#include <signal.h>
#include <errno.h>
AptCache::AptCache()
{
connect(&m_process, SIGNAL(receivedStderr(KProcess*, char*, int)),
this, SLOT(receivedStdErr(KProcess*, char*, int )));
connect(&m_process, SIGNAL(receivedStdout(KProcess*, char*, int)),
this, SLOT(receivedStdOut(KProcess*, char*, int )));
}
AptCache::~AptCache() {}
static QStringList received(QString& buffer, char* input, int input_len)
{
buffer += QString::fromLatin1(input, input_len);
QStringList ret = QStringList::split('\n', buffer, true);
if (!buffer.endsWith("\n"))
{
buffer = ret.last();
ret.pop_back();
}
else
buffer = "";
return ret;
}
void AptCache::receivedStdErr( KProcess * /*process*/, char * buffer, int len )
{
static QRegExp rx_we("(W|E):\\s+(.*)");
QStringList lines = received(m_received_err, buffer, len);
for (QStringList::ConstIterator i = lines.begin(); i != lines.end(); ++i)
{
if (rx_we.exactMatch(*i))
{
if (rx_we.cap(1) == "E") emit token("error", rx_we.cap(2));
else emit token("warning", rx_we.cap(2));
}
else
{
kdDebug() << "Unmatched error : " << *i << endl;
}
}
}
void AptCache::receivedStdOut( KProcess * /*process*/, char * buffer, int len )
{
QStringList lines = received(m_received_out, buffer, len);
(this->*m_receive)(lines);
}
void AptCache::clear()
{
m_process.clearArguments();
m_attribute = "";
m_received_err = "";
m_received_out = "";
}
bool AptCache::search(const QString& expression)
{
clear();
m_process.setEnvironment("LANGUAGE", "C");
m_process << "apt-cache" << "search";
m_process << QStringList::split(" ", expression);
m_receive = &AptCache::receiveSearch;
return m_process.start(KProcess::Block, KProcess::Stdout );
}
void AptCache::receiveSearch(const QStringList& lines)
{
static QRegExp rx_parse("([^ ]+) - (.*)");
QStringList::ConstIterator i;
for (i = lines.begin(); i != lines.end(); ++i)
{
if ((*i).isEmpty()) continue;
if (!rx_parse.exactMatch(*i))
{
kdDebug(DEBUG_ZONE) << "Parsing error. Line is " << *i << endl;
continue;
}
emit token("package", rx_parse.cap(1));
emit token("short_desc", rx_parse.cap(2));
kdDebug(DEBUG_ZONE) << "Found package : " << rx_parse.cap(1) << " - " << rx_parse.cap(2) << endl;
}
}
bool AptCache::show(const QString& package)
{
clear();
m_process.setEnvironment("LANGUAGE", "C");
m_process << "apt-cache" << "show" << package;
m_receive = &AptCache::receiveShow;
return m_process.start(KProcess::Block, KProcess::Stdout );
}
void AptCache::receiveShow(const QStringList& lines)
{
static bool pkgfield = false, insert_newline = false;
static int indent = 0;
static QRegExp rx_attribute("([\\w-]+): (.*)");
static const QString pkg_fields[] =
{ "Suggests", "Replaces", "Depends", "Conflicts", QString::null };
QStringList::ConstIterator i;
for (i = lines.begin(); i != lines.end(); ++i)
{
QString data(*i);
if (data.isEmpty()) continue;
if (rx_attribute.exactMatch(*i))
{
m_attribute = rx_attribute.cap(1);
data = rx_attribute.cap(2);
if (m_attribute != "Package")
emit token("field", m_attribute);
insert_newline = pkgfield = false;
indent = 0;
const QString * test_field;
for (test_field = pkg_fields; !test_field -> isNull(); ++test_field)
if (*test_field == m_attribute)
{
pkgfield = true;
break;
}
}
if (m_attribute == "Package")
emit token("package", data);
else if (pkgfield)
parse_pkgfield(data);
else
{
int new_indent = data.find( QRegExp("[^\\s]") );
// new_indent > 0 means that we are in a multi-line
// field. Those lines always begin with " ", so we want
// to drop it.
if (new_indent > 0) --new_indent;
if (new_indent != indent)
{
emit token("indent", QString::number(new_indent) );
indent = new_indent;
insert_newline = false;
}
if (data == " .")
{
if (insert_newline)
emit token("data", "\n");
}
else
{
if (insert_newline)
emit token("data", "\n" + data);
else
emit token("data", data);
}
insert_newline = true;
}
}
}
void AptCache::parse_pkgfield(const QString& data)
{
QStringList split(QStringList::split(",", data));
for (QStringList::ConstIterator i = split.begin(); i != split.end(); ++i)
{
if (i != split.begin()) emit token("data", ", ");
QStringList bar(QStringList::split("|", *i));
for (QStringList::ConstIterator j = bar.begin(); j != bar.end(); ++j)
{
if (j != bar.begin()) emit token("data", " | ");
QString pkg, remaining;
int paren = (*j).find('(');
if (paren != -1)
{
pkg = (*j).left(paren - 1);
remaining = (*j).right((*j).length() - paren + 1);
}
else
{
pkg = (*j);
}
pkg = pkg.stripWhiteSpace();
remaining = remaining.stripWhiteSpace();
emit token("package_link", pkg);
if (!remaining.isEmpty()) emit token("data", " " + remaining);
}
}
}
bool AptCache::policy( const QString & package )
{
clear();
m_process.setEnvironment("LANGUAGE", "C");
m_process << "apt-cache" << "policy" << package;
m_receive = &AptCache::receivePolicy;
return m_process.start(KProcess::Block, KProcess::Stdout );
}
void AptCache::receivePolicy(const QStringList& lines)
{
static QRegExp rx_pkgname("(\\w[\\w+-.]+):");
static QRegExp rx_location("^\\s*\\d+\\s[^\\d]");
for(QStringList::ConstIterator l = lines.begin(); l != lines.end(); ++l)
{
if ((*l).isEmpty()) continue;
QString data( (*l).stripWhiteSpace() );
if (rx_pkgname.exactMatch(*l))
emit token("package", rx_pkgname.cap(1));
else if (data.startsWith("Installed:", false))
{
data = data.right(data.length() - 11);
emit token("installed", data);
m_installed = data;
}
else if (data.startsWith("Candidate:", false))
{
data = data.right(data.length() - 11);
emit token("candidate", data);
m_candidate = data;
}
else if (data.startsWith("Version table:", false))
emit token("version_table", QString::null);
else if (rx_location.search(data) > -1)
emit token("location", data);
else
{
if (data.startsWith("*** "))
data = data.right( data.length() - 4 );
if (match_dversion(data.section(' ', 0, 0)))
emit token("version", data);
}
}
}
QString AptCache::policy_installed() const
{ return m_installed; }
QString AptCache::policy_candidate() const
{ return m_candidate; }
#include "aptcache.moc"

@ -0,0 +1,81 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/
#ifndef KIOAPT_APTCACHE_H
#define KIOAPT_APTCACHE_H
#include <qvaluelist.h>
#include <qmap.h>
#include <qstring.h>
#include <kprocess.h>
class AptProtocol;
/**
@author Sylvain Joyeux
*/
class AptCache : public QObject {
Q_OBJECT
typedef void (AptCache::*ReceiveMethod) (const QStringList& lines);
ReceiveMethod m_receive;
// KProcIO messes the stderr and the stdout lines :(
KProcess m_process;
QString m_received_out, m_received_err;
QString m_attribute;
QString m_installed, m_candidate;
private slots:
void receivedStdErr(KProcess* process, char* buffer, int len);
void receivedStdOut(KProcess* process, char* buffer, int len);
private:
void clear();
void receiveSearch(const QStringList& lines);
void receiveShow(const QStringList& lines);
void receivePolicy(const QStringList& lines);
void parse_pkgfield(const QString& data);
public:
AptCache();
~AptCache();
bool search(const QString& expression);
bool show(const QString& package);
bool policy(const QString& package);
QString policy_installed() const;
QString policy_candidate() const;
signals:
/** Tags:
* warning (warning text)
* error (error text)
* package (package_name)
* short_desc (description)
* field (field_name)
* package_link (package_name)
* data (plain_data)
* indent (value)
* policy
* installed (version)
* candidate (version)
* version_table
* version (version_desc)
* location (location_desc)
* file (file_name) [for dpkg]
* end
*/
void token(const QString& tag, const QString& value);
};
#endif

@ -0,0 +1,17 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/
#ifndef KIOAPT_DEBUG
#define KIOAPT_DEBUG
#define DEBUG_ZONE 7000
#endif

@ -0,0 +1,210 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/
#include <config.h>
#include "dpkg.h"
#include "debug.h"
#include <klocale.h>
#include <kdebug.h>
#include <qstringlist.h>
#include <qregexp.h>
Dpkg::Dpkg(QObject *parent, const char *name)
: PackageManager(parent, name)
{
connect(&m_process, SIGNAL(readReady (KProcIO *)), this, SLOT(readReady(KProcIO*)));
}
Dpkg::~Dpkg()
{
}
int Dpkg::capabilities( int query ) const
{
if ( (query & SEARCH_FILE) && (query & OFFLINE) )
return query | INSTALLED_ONLY;
if ( (query & LIST_FILES) && (query & OFFLINE) )
return query | INSTALLED_ONLY;
if ( query & ONLINE )
return query;
return NOT_SUPPORTED;
}
void Dpkg::readReady(KProcIO*)
{
bool partial;
QString newline;
QStringList lines;
while(m_process.readln(newline, true, &partial) != -1)
{
if (partial) m_buffer += newline;
else
{
newline.truncate(newline.length());
QString line(m_buffer + newline);
lines << line;
m_buffer = "";
}
}
(this->*m_receive)(lines);
}
bool Dpkg::search( const QString & file )
{
m_process.resetAll();
m_buffer = QString::null;
m_process.clearArguments();
m_process << "dpkg" << "-S" << file;
m_receive = &Dpkg::receiveSearch;
return m_process.start(KProcess::Block, KProcess::Stdout );
}
void Dpkg::receiveSearch( const QStringList & line )
{
static QRegExp rx_notfound("dpkg: (.*) not found");
// the format of the dpkg -S answer is
// package1[, package2[, package3...]]: file
for (QStringList::ConstIterator i = line.begin(); i != line.end(); ++i)
{
//kdDebug(DEBUG_ZONE) << *i << endl;
if ((*i).isEmpty()) continue;
if (rx_notfound.exactMatch(*i))
{
emit token("error", i18n("%1 not found").arg(rx_notfound.cap(1)));
continue;
}
int semicolon = (*i).find(':');
if (semicolon == -1)
{
kdDebug(DEBUG_ZONE) << "receiveSearch unmatched line : " << *i << endl;
continue;
}
QStringList packages = QStringList::split(',', (*i).left(semicolon));
QString file = (*i).right( (*i).length() - semicolon - 1 );
emit token("file", file.stripWhiteSpace());
for (QStringList::ConstIterator j = packages.begin(); j != packages.end(); ++j)
emit token("package", (*j).stripWhiteSpace());
}
}
bool Dpkg::list( const QString & package )
{
m_process.resetAll();
m_buffer = QString::null;
m_process.clearArguments();
m_process << "dpkg" << "-L" << package;
m_receive = &Dpkg::receiveList;
return m_process.start(KProcess::Block, KProcess::Stdout );
}
void Dpkg::receiveList( const QStringList & line )
{
static QRegExp rx_notfound("Package (.*) is not installed");
for (QStringList::ConstIterator i = line.begin(); i != line.end(); ++i)
{
if (rx_notfound.search(*i) > -1)
emit token("error", i18n("Package %1 is not installed").arg(rx_notfound.cap(1)));
else if ((*i).startsWith("/"))
emit token("file", *i);
}
}
static const QString
html_form_begin("\n<form action=\"http://packages.ubuntu.com/cgi-bin/search_contents.pl\" method=\"GET\">\n"
"<table class=\"query\">\n");
static QString make_title(const QString& title)
{ return "\t<tr><td class=\"title\" colspan=\"2\">" + title + "</td></tr>\n"; }
static const QString
html_form_end("<tr>\n"
"\t<td class=\"button\" colspan=\"2\">\n"
"\t\t<input type=\"submit\" value=\"%1\">\n"
"\t\t<input type=\"hidden\" name=\"searchmode\" value=\"searchfilesanddirs\">\n"
"\t\t<input type=\"hidden\" name=\"case\" value=\"insensitive\">\n"
"\t</td>\n"
"</tr>\n"
"</table>\n"
"</form>\n");
static const QString
html_form_line_begin("<tr>\n"
"\t<td><label for=\"%1\">%2</label></td>\n"
"\t<td>\n");
static const QString
html_form_line_end("</td>\n</tr>\n");
static const QString html_form_combo("<select name=\"%1\" id=\"%2\">");
static QString make_form_text(const QString& type, const QString& label)
{
return
html_form_line_begin.arg(type).arg(label)
+ QString("<input type=\"text\" name=\"%1\" id=\"%2\">").arg(type).arg(type)
+ html_form_line_end;
}
static QString begin_form_combo(const QString& type, const QString& label)
{
return
html_form_line_begin.arg(type).arg(label)
+ QString("\t<select name=\"%1\" id=\"%2\">\n").arg(type).arg(type);
}
static QString make_form_option(const QString& name, const QString& text)
{ return "\t\t<option value=" + name + ">" + text + "</option>\n"; }
static QString end_form_combo()
{ return "\t</select>\n\t</td>\n</tr>\n"; }
QString Dpkg::getOnlineForm()
{
QString buffer;
QTextOStream stream(&buffer);
stream
<< html_form_begin
<< make_title( i18n("packages.ubuntu.com"))
<< make_form_text("word", i18n("File to search"))
<< begin_form_combo("arch", i18n("Architecture"))
<< make_form_option("i386", i18n("Intel x86"))
<< make_form_option("amd64", i18n("AMD64"))
<< make_form_option("sparc", i18n("SPARC"))
<< make_form_option("powerpc", i18n("PowerPC"))
<< make_form_option("hppa", i18n("HP PA/RISC"))
<< make_form_option("ia64", i18n("Intel IA-64"))
<< end_form_combo()
<< begin_form_combo("version", i18n("Version"))
<< make_form_option("gutsy", "gutsy")
<< make_form_option("feisty", "feisty")
<< make_form_option("edgy", "edgy")
<< make_form_option("dapper", "dapper")
<< make_form_option("breezy", "breezy")
<< make_form_option("hoary", "hoary")
<< make_form_option("warty", "warty")
<< end_form_combo()
<< html_form_end.arg(i18n("Go online!"));
return buffer;
}
#include "dpkg.moc"

@ -0,0 +1,50 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/
#ifndef DPKG_H
#define DPKG_H
#include <config.h>
#include "packagemanager.h"
#include <kprocio.h>
/**
@author Sylvain Joyeux
*/
class Dpkg : public PackageManager
{
Q_OBJECT
typedef void (Dpkg::*ReceiveMethod) (const QStringList& lines);
ReceiveMethod m_receive;
KProcIO m_process;
QString m_buffer;
private slots:
void readReady(KProcIO* io);
private:
void receiveSearch(const QStringList& line);
void receiveList(const QStringList& line);
public:
Dpkg(QObject *parent = 0, const char *name = 0);
~Dpkg();
virtual bool list(const QString& package);
virtual bool search(const QString& file);
virtual int capabilities(int query) const;
virtual QString getOnlineForm();
};
#endif

Binary file not shown.

Binary file not shown.

@ -0,0 +1,250 @@
/** This is the stylesheet for the
* HTML code produced by the apt:/ ioslave
* (c) 2003 Sylvain Joyeux <sylvain.joyeux@m4x.org>
* Provided under the GPL licenses */
BODY {
background-color: white;
color: black;
}
table { margin-top: 1em; }
table.header {
margin-top: 0;
margin-bottom: 1em;
width: 90%;
font-weight: bold;
/* font-variant: small-caps; */
font-size: x-large;
color: #0855C5;
/*vertical-align: middle;*/
height: 85px;
background-color: #FFFFFF;
background-image: url("headerbg.png");
}
table.header td.logo {
width: 92px;
}
H2 { text-align: justify; }
table.version TR { padding-top: 1em; }
table.version TD { padding-top: 1em; vertical-align: top; }
table.version TD.attname { font-weight: bold; }
.footer {
margin-top: 3em;
font-size: small;
font-weight: bold;
text-align: center;
}
td.header-title {
vertical-align: top;
text-align: center;
padding-top: 1.5em;
font-size: 15pt;
}
td.links {
vertical-align: bottom;
}
/* global lind buttons at bottom of decorative header */
table.links {
float: right;
border:0;
padding: 1px 0 0 0;
margin: 0;
}
table.links td a {
color: white
}
table.links td:hover {
background-color:#0C4293;
}
table.links td a:hover {
color: white;
background-color:#0C4293
}
table.links td {
border-left: 1px solid #4A81D5;
padding: 0px 12px 0px 12px;
background-color:#0E4EAF;
font-size:9pt;
margin: 0;
/*font-weight: bold;*/
}
/******************************************
* Forms
*/
table.queryform {
margin: auto;
width: 80%;
}
table.query {
margin: auto;
margin-top: 1em;
}
table.queryform form {
margin: 2em;
}
table.query td.button {
text-align: center;
padding-top: .7em;
}
table.query td.title {
text-align: center;
font-weight: bold;
padding-bottom: .7em;
}
table.query td.button input[type="submit"] {
width: 40%;
}
/******************************************
* Show
*/
.error {
text-align: center;
font-weight: bold;
font-size: larger;
margin-top: 1em;
}
/*h3.version, h3.installed-version {
padding-left: 1em;
margin-top: 4em;
text-align: left;
background-color: #0855C5;
color: white;
}
h3.installed-version {
background-color: #FF3333;
}*/
.version-header, .version-header-installed {
font-size: larger;
font-weight: bold;
/*padding-left: 1em;*/
margin-top: 4em;
text-align: left;
color: white;
background-color: #0855C5;
}
.version-header-installed {
background-color: #F03333;
}
.version-header .links, .version-header-installed .links {
float: left;
color: white;
font-size:9pt;
background-color:#0C4293;
padding: 0px 12px 0px 12px;
margin: 0 1em 0 0;
border-left: 1px solid #4A81D5;
}
.version-header-installed .links {
background-color: #CC2222;
border-left: 1px solid #FF7D7F;
}
table.version {
margin-left: 3%;
width: 90%;
border-width: thin;
border-style: solid;
}
.command
{
margin-top: 1em;
margin-bottom: 1em;
text-align: center;
font-size: medium;
}
.filelist
{
margin-left: 5%;
}
/***************************
* Policy classes
*/
div.policy
{ margin-top: 1em; }
table.policy
{ margin: auto; }
table.policy TD
{ vertical-align: middle; }
table.curver {
border: solid thin;
margin-left: auto;
margin-right: 2em;
}
.curver form p {
margin: 0;
padding: 0;
}
.vtable {
border: solid thin;
margin-right: auto;
margin-left: 2em;
padding: .5em;
}
.vtable .header {
border-bottom: solid thin black;
text-align: center;
font-weight: bold;
}
.vtable-version {
font-weight: bold;
margin-right: 1em;
}
.vtable .version-pin {
font-weight: bold;
}
.vtable .location-pin {
font-weight: bold;
margin-left: 1em;
margin-right: 1em;
}
table.curver TD, table.vtable TD
{ width: auto;
vertical-align: top; }
table.vtable thead td {
font-weight: bold;
text-align: center;
border-bottom: solid thin;
}
table.curver form {
text-align: center;
}
.pin
{ font-weight: bold; }
.file
{ font-weight: bold; }

@ -0,0 +1,31 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/
#include "packagemanager.h"
PackageManager::PackageManager(QObject *parent, const char *name)
: QObject(parent, name) {}
PackageManager::~PackageManager() {}
bool PackageManager::list( const QString & /*package*/ ) { return false; }
bool PackageManager::search( const QString & /*file*/ ) { return false; }
int PackageManager::capabilities( int /*query*/ ) const { return 0; }
QString PackageManager::getOnlineForm()
{ return QString::null; }
QString PackageManager::getOnlineURL
( const QString& /* query */
, const QMap<QString, QString>& /*options*/ )
{ return QString::null; }
#include "packagemanager.moc"

@ -0,0 +1,76 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/
#ifndef PACKAGEMANAGER_H
#define PACKAGEMANAGER_H
#include <qobject.h>
/** Base class for accessing package-manager specific
* functionalities. ATM, it supports listing files in a
* package and searching the package which owns a file.
*
* Support for online-search support is also included.
*
* @author Sylvain Joyeux
*/
class PackageManager : public QObject
{
Q_OBJECT
public:
PackageManager(QObject *parent = 0, const char *name = 0);
virtual ~PackageManager();
virtual bool search(const QString& file);
virtual bool list(const QString& package);
/** Checks what the package manager is capable of.
* The \c cap parameter should be a or of exactly
* one function (SEARCH, LIST, ...) and one access
* (ONLINE, OFFLINE).
* The function returns NOT_SUPPORTED if the specified query is not
* supported. Otherwise, it returns cap with some
* restrictions (EXHAUSTIVE, INSTALLED_ONLY, ...) if
* they apply
*
* INSTALLED_ONLY meaning changes with the function considered.
* With SEARCH_FILE, it means that SEARCH_FILE only finds
* installed files. With LIST_FILES, it means that listing the
* files of a package is possible only if the package is already
* installed */
virtual int capabilities(int query) const;
virtual QString getOnlineForm();
virtual QString getOnlineURL(const QString& query, const QMap<QString, QString>& options);
enum Capabilities
{
NOT_SUPPORTED = 0,
SEARCH_FILE = 0x01,
LIST_FILES = 0x02,
SHOW = 0x04,
OFFLINE = 0x10,
ONLINE = 0x20,
INSTALLED_ONLY = 0x200
};
signals:
/** Tags:
* warning (warning text)
* error (error text)
* file (file_name) [for dpkg]
* end
*/
void token(const QString& tag, const QString& value);
};
#endif

@ -0,0 +1,7 @@
INCLUDES = $(all_includes)
METASOURCES = AUTO
libparsers_la_LDFLAGS = -avoid-version $(all_libraries)
noinst_LTLIBRARIES = libparsers.la
noinst_HEADERS = parsers.h qhtmlstream.h
libparsers_la_SOURCES = list.cpp search.cpp policy.cpp show.cpp parsers.cpp filesearch.cpp
libparsers_la_LIBADD = $(LIB_KIO)

@ -0,0 +1,52 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/
#include "parsers.h"
#include "../apt.h"
static QString
html_dpkgs_line_begin("<tr><td class=\"file\">%1</td><td>\n\t"),
html_dpkgs_line_end("\n</td></tr>\n");
namespace Parsers
{
void FileSearch::operator() (AptProtocol* slave, const QString & tag, const QString & value )
{
static QString buffer;
if (tag == "begin")
{
m_result_count = 0;
}
else if (tag == "error")
{
*slave << "<div class=\"error\">" + value + "</div>";
}
else if (tag == "file")
{
if (m_result_count)
*slave << buffer + html_dpkgs_line_end;
*slave << html_dpkgs_line_begin.arg(value);
++m_result_count;
buffer = "";
}
else if (tag == "package")
{
if (!buffer.isEmpty()) buffer = buffer + ", ";
buffer += "<a href=\"apt:/show?" + value + "\">" + value + "</a>";
}
else if (tag == "end")
{
*slave << buffer + html_dpkgs_line_end;
buffer="";
}
}
}

@ -0,0 +1,69 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/
#include "parsers.h"
#include "../apt.h"
#include <kio/slavebase.h>
#include <klocale.h>
#include <qregexp.h>
#include <kurl.h>
namespace Parsers
{
List::List(bool links)
: m_links(links) {}
/** Parses the tokens sent by PackageManager::list */
void List::operator() (AptProtocol* slave, const QString& tag, const QString& value )
{
static QRegExp rx_manpage("/man/.*\\.\\d[^/]*$");
static QStringList files;
if (tag == "begin")
{
m_result_count = 0;
}
else if (tag == "error")
{
*slave << "<div class=\"error\">" + value + "</div>";
}
else if (tag == "file" && value != "/.")
{
if (m_links)
{
KURL url;
if (rx_manpage.search(value) >= 0)
url.setProtocol("man");
else
url.setProtocol("file");
url.setPath(value);
files += "<a href=\"" + url.htmlURL() + "\">" + value + "</a>";
}
else
{
files += value;
}
++m_result_count;
}
else if (tag == "end")
{
files.sort();
*slave <<
"<div class=\"filelist\">\n" + files.join("\n<br>") + "\n</div>\n"
"<div class=\"footer\">" + i18n("%1 files in the package").arg(result_count()) + "</div>\n";
files.clear();
}
}
}

@ -0,0 +1,64 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/
#include "parsers.h"
#include <kuserprofile.h>
#include <kio/slavebase.h>
#include <qhtmlstream.h>
#include <qregexp.h>
#include <stdlib.h>
namespace Parsers
{
static void print_czstring(KIO::SlaveBase& slave, const char* data, int len)
{
QByteArray nonull;
nonull.setRawData(data, len);
slave.data(nonull);
nonull.resetRawData(data, len);
}
void operator << (KIO::SlaveBase& slave, const QCString& string)
{ print_czstring(slave, string.data(), string.size() - 1); }
void operator << (KIO::SlaveBase& slave, const QString& string)
{ slave << string.utf8(); }
void operator << (KIO::SlaveBase& slave, const char* string)
{ print_czstring(slave, string, strlen(string)); }
Parser::Parser( ) {}
Parser::~Parser( ) {}
void Parser::attribute_begin(QHtmlStream& stream, const QString& text)
{
stream
<< block("tr") << endl
<< block("td") << param("class") << "attname" << data()
<< text
<< close() << endl
<< block("td");
}
void Parser::attribute_end(QHtmlStream& stream)
{ stream << close() << endl << close(); }
// void Parser::operator ( )( KIO::SlaveBase * /*slave*/,
// const QString & /*tag*/, const QString & /*value*/ )
// {}
QString mangle_version(QString version)
{ return "version_" + version.replace(QRegExp("[-:\\.\\+]"), QString("_")); }
}

@ -0,0 +1,91 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/
#ifndef PARSERS_H
#define PARSERS_H
#include <qstring.h>
namespace KIO
{
class SlaveBase;
}
class QHtmlStream;
class AptProtocol;
/** Here are defined the functional objects that takes the tokens
* sent by AptCache and PackageManager objects, and produces HTML */
namespace Parsers
{
class Parser
{
protected:
int m_result_count;
static void attribute_begin(QHtmlStream& stream, const QString& text);
static void attribute_end(QHtmlStream& stream);
public:
Parser();
virtual ~Parser();
int result_count() const { return m_result_count; }
virtual void operator () (AptProtocol* slave, const QString& tag, const QString& value) = 0;
};
class Search : public Parser
{
public:
void operator () (AptProtocol* slave, const QString& tag, const QString& value);
};
class List : public Parser
{
bool m_links;
public:
List(bool show_links);
void operator () (AptProtocol* slave, const QString& tag, const QString& value);
};
class FileSearch : public Parser
{
public:
void operator () (AptProtocol* slave, const QString& tag, const QString& value);
};
class Show : public Parser
{
QString m_package, m_installed;
bool m_act;
public:
Show(const QString& package, const QString& installed, bool act);
void operator () (AptProtocol* slave, const QString& tag, const QString& value);
};
class Policy : public Parser
{
QString m_package, m_installed;
bool m_has_adept_batch;
bool m_act;
public:
Policy(const QString& package, bool act);
QString getInstalled() const { return m_installed; }
void operator () (AptProtocol* slave, const QString& tag, const QString& value);
};
void operator << (KIO::SlaveBase& slave, const QCString& string);
void operator << (KIO::SlaveBase& slave, const QString& string);
void operator << (KIO::SlaveBase& slave, const char* string);
QString mangle_version(QString version);
}
#endif

@ -0,0 +1,202 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/
#include "parsers.h"
#include "../apt.h"
#include <klocale.h>
#include <kdebug.h>
#include <qhtmlstream.h>
#include <qregexp.h>
static void policy_begin(QHtmlStream& stream)
{
stream
<< block("div") << endl
<< block("table", "policy") << endl
<< block("tr") << block("td") << endl
<< block("table", "curver") << endl
<< block("tbody");
}
static void add_button(QHtmlStream& stream, const QString& mode, const QString& text, const QString& package)
{
stream
<< block("form")
<< param("action") << "apt:/"
<< param("method") << "get" << endl
<< block("p") << endl
<< tag("input")
<< param("type") << "hidden"
<< param("name") << "get"
<< param("value") << mode << endl
<< tag("input")
<< param("type") << "hidden"
<< param("name") << "package"
<< param("value") << package << endl
<< tag("input")
<< param("type") << "submit"
<< param("value") << text << endl
<< close()
<< close() << endl;
}
static void add_version_link(QHtmlStream& stream, AptProtocol* slave, const QString& package, const QString& version)
{
KURL url(slave->buildURL("show", package));
url.setHTMLRef(Parsers::mangle_version(version));
stream
<< block("a", "vtable-version")
<< param("href") << url.htmlURL()
<< data() << version
<< close();
}
namespace Parsers
{
Policy::Policy(const QString& package, bool act)
: m_package(package), m_act(false)
{
m_act = act;
}
void Policy::operator() (AptProtocol* slave, const QString& type, const QString& value)
{
static bool first_version = false, received_sth = false;
static QString buffer;
static QHtmlStream* stream;
static QRegExp rx_notinstalled("(none)");
kdDebug() << "policy : " << type << " " << value << endl;
if (type == "begin")
{
stream = new QHtmlStream(&buffer);
policy_begin(*stream);
}
else if (type == "installed")
{
received_sth = true;
attribute_begin(*stream, i18n("Installed"));
if (rx_notinstalled.match(value) >= 0)
{
m_installed = QString::null;
*stream << i18n("no");
}
else
{
m_installed = value.stripWhiteSpace();
add_version_link(*stream, slave, m_package, m_installed);
}
attribute_end(*stream);
}
else if (type == "candidate")
{
received_sth = true;
bool has_candidate = (rx_notinstalled.match(value) == -1);
if (m_act && has_candidate)
{
*stream
<< block("tr") << endl
<< block("td") << param("colspan") << 2 << endl;
if (m_installed.isEmpty())
add_button(*stream, "install", i18n("Install"), m_package);
else
add_button(*stream, "remove", i18n("Remove"), m_package);
*stream << close() << close() << endl;
}
attribute_begin(*stream, i18n("Candidate"));
if (has_candidate)
add_version_link(*stream, slave, m_package, value);
else
*stream << i18n("none");
attribute_end(*stream);
if (m_act && has_candidate
&& !m_installed.isEmpty() && m_installed != value)
{
*stream
<< block("tr") << endl
<< block("td") << param("colspan") << 2 << endl;
add_button(*stream, "install", i18n("Upgrade"), m_package);
*stream << close() << close() << endl;
}
}
else if (type == "version_table")
{
received_sth = true;
*stream
<< close() << close() << endl // tbody, table, form
<< close() << endl; // td
first_version = true;
}
else if (type == "version")
{
QString version = value.section(' ', 0, 0);
QString pin = value.section(' ', 1, 1);
if (first_version)
{
*stream
<< block("td") << endl
<< block("div", "vtable") << endl
<< block("div", "header") << i18n("Version Table") << close() << endl
<< block("div", "versions") << endl;
} /*else {
*stream << close() << close();
}*/
QString version_link;
version_link = "<a href=\"apt:/show?" + m_package + "#" + mangle_version(version) + "\">"
+ version + "</a>";
*stream << tag("br") << endl;
add_version_link(*stream, slave, m_package, version);
*stream << "[Pin " << block("span", "version-pin") << pin << close() << "]";
first_version = false;
}
else if (type == "location")
{
QStringList sections = QStringList::split(' ', value);
QString pin = sections.first();
sections.pop_front();
// remove the "Packages" field if it is here
if (sections.last() == "Packages")
sections.pop_back();
*stream << tag("br") << endl;
*stream << block("span", "location-pin") << pin << close() << sections.join(" ") << endl;
}
else if (type == "end")
{
if (received_sth)
{
*stream << close_all() << endl;
*slave << buffer;
}
buffer = QString::null;
received_sth = false;
delete stream;
}
}
}

@ -0,0 +1,286 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/
#ifndef QHtmlStream_H
#define QHtmlStream_H
#include <qtextstream.h>
#include <qstringlist.h>
class QHtmlStream;
class QHtmlStreamManip;
/**
@author Sylvain Joyeux
*/
class QHtmlStreamManip
{
protected:
virtual void apply(QHtmlStream& stream) const = 0;
public:
virtual ~QHtmlStreamManip() {};
void operator () (QHtmlStream& stream) const
{ apply(stream); }
};
class QHtmlStream
{
QTextOStream m_stream;
enum States
{
NORMAL_FLOW,
TAG,
BLOCK,
PARAM
};
int m_state, m_enclosing_state;
bool m_newline;
QString m_indent;
QStringList m_blockstack;
void finalize_open()
{
if (m_state == PARAM)
m_state = m_enclosing_state;
if (m_state == BLOCK)
m_stream << ">";
else if (m_state == TAG)
m_stream << " />";
m_state = NORMAL_FLOW;
}
void indent()
{
if (m_newline)
{
m_stream << m_indent;
m_newline = false;
}
}
template<class T>
QHtmlStream& output(const T& o)
{
indent();
if (m_state == PARAM)
{
m_stream << "=\"" << o << "\"";
m_state = m_enclosing_state;
return *this;
}
if (m_state == BLOCK)
{
m_stream << ">";
m_state = NORMAL_FLOW;
}
else if (m_state == TAG)
{
m_stream << "/>";
m_state = NORMAL_FLOW;
}
m_stream << o;
return *this;
}
public:
QHtmlStream(QString* buffer)
: m_stream(buffer), m_state(NORMAL_FLOW), m_newline(true) {}
~QHtmlStream() {}
void tag(const QString& name, const QString& cl, const QString& id)
{
finalize_open();
indent();
m_stream << '<' << name;
m_state = TAG;
if (!cl.isEmpty())
m_stream << " class=\"" << cl << "\"";
if (!id.isEmpty())
m_stream << " id=\"" << id << "\"";
}
void block(const QString& name, const QString& cl, const QString& id)
{
finalize_open();
indent();
m_stream << '<' << name;
m_indent += '\t';
m_blockstack.push_front(name);
m_state = BLOCK;
if (!cl.isEmpty())
m_stream << " class=\"" << cl << "\"";
if (!id.isEmpty())
m_stream << " id=\"" << id << "\"";
}
void parameter(const QString& param_name)
{
if (m_state == NORMAL_FLOW) return;
m_stream << " " << param_name;
m_enclosing_state = m_state;
m_state = PARAM;
}
void close()
{
finalize_open();
m_indent.truncate(m_indent.length() - 1);
indent();
m_stream << "</" << m_blockstack.first() << ">";
m_blockstack.pop_front();
}
void close_all(bool indent)
{
while( ! m_blockstack.empty() )
{
if (indent)
(*this) << endl;
close();
}
}
void data()
{
finalize_open();
}
QHtmlStream & operator<< ( QChar c ) { return output(c); }
QHtmlStream & operator<< ( char c ) { return output(c); }
QHtmlStream & operator<< ( signed short i ) { return output(i); }
QHtmlStream & operator<< ( unsigned short i ) { return output(i); }
QHtmlStream & operator<< ( signed int i ) { return output(i); }
QHtmlStream & operator<< ( unsigned int i ) { return output(i); }
QHtmlStream & operator<< ( signed long i ) { return output(i); }
QHtmlStream & operator<< ( unsigned long i ) { return output(i); }
QHtmlStream & operator<< ( float f ) { return output(f); }
QHtmlStream & operator<< ( double f ) { return output(f); }
QHtmlStream & operator<< ( const char * s ) { return output(s); }
QHtmlStream & operator<< ( const QString & s ) { return output(s); }
QHtmlStream & operator<< ( const QCString & s ) { return output(s); }
QHtmlStream & operator<< ( const QHtmlStreamManip& op )
{
op(*this);
return *this;
}
QHtmlStream & operator<< (QTSManip m)
{
finalize_open();
m_stream << m;
return (*this);
}
QHtmlStream & operator<< (QTSFUNC f)
{
finalize_open();
int old_flags = m_stream.flags();
m_stream << f;
if (old_flags == m_stream.flags())
m_newline = true;
return (*this);
}
};
/***************************************************************************************
* Stream manipulators
*/
class QHtmlStreamManip0 : public QHtmlStreamManip
{
public:
typedef void (QHtmlStream::*Method)();
private:
Method m_method;
void apply (QHtmlStream& stream) const
{ (stream.*m_method)(); }
public:
QHtmlStreamManip0(Method m)
: m_method(m) {}
};
class QHtmlStreamManip1 : public QHtmlStreamManip
{
public:
typedef void (QHtmlStream::*Method)(const QString& param);
private:
Method m_method;
QString m_param;
void apply(QHtmlStream& stream) const
{ (stream.*m_method)(m_param); }
public:
QHtmlStreamManip1(Method m, const QString& param)
: m_method(m), m_param(param) {}
};
class QHtmlStreamManip3 : public QHtmlStreamManip
{
public:
typedef void (QHtmlStream::*Method)(const QString& param0, const QString& param1, const QString& param2);
private:
Method m_method;
QString m_param0, m_param1, m_param2;
void apply(QHtmlStream& stream) const
{ (stream.*m_method)(m_param0, m_param1, m_param2); }
public:
QHtmlStreamManip3(Method m, const QString& param0, const QString& param1, const QString& param2)
: m_method(m),
m_param0(param0), m_param1(param1), m_param2(param2) {}
};
class CloseAll : public QHtmlStreamManip
{
private:
bool m_indent;
void apply(QHtmlStream& stream) const
{ stream.close_all(m_indent); }
public:
CloseAll(bool indent) : m_indent(indent) {}
};
inline QHtmlStreamManip3 tag(const QString& name, const QString& cl = QString::null, const QString& id = QString::null)
{ return QHtmlStreamManip3(&QHtmlStream::tag, name, cl, id); }
inline QHtmlStreamManip3 block(const QString& name, const QString& cl = QString::null, const QString& id = QString::null)
{ return QHtmlStreamManip3(&QHtmlStream::block, name, cl, id); }
inline QHtmlStreamManip1 param(const QString& name)
{ return QHtmlStreamManip1(&QHtmlStream::parameter, name); }
inline QHtmlStreamManip0 close()
{ return QHtmlStreamManip0(&QHtmlStream::close); }
inline QHtmlStreamManip0 data()
{ return QHtmlStreamManip0(&QHtmlStream::data); }
inline CloseAll close_all(bool indent = true)
{ return CloseAll(indent); }
#endif

@ -0,0 +1,76 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/
#include "parsers.h"
#include "../apt.h"
#include "qhtmlstream.h"
#include <kio/slavebase.h>
namespace Parsers
{
/** Parses the output of apt-cache search */
void Search::operator() (AptProtocol* slave, const QString& tag, const QString& value)
{
static QMap<QString, QString> results;
static QString cur_package;
static QString query;
if (tag == "begin")
{
query = value;
m_result_count = 0;
}
else if (tag == "package")
{
++m_result_count;
cur_package = value;
}
else if (tag == "short_desc")
{
results[cur_package] = value;
}
else if (tag == "end")
{
// We separate results whose package name matches the query
// and those who matches only with the description
QString normal, special;
QHtmlStream sstream(&special), nstream(&normal);
// QMap iteration sorts wrt the key < operator
// with QStrings, it means case insensitive sort
QMap<QString, QString>::ConstIterator i;
for (i = results.begin(); i != results.end(); ++i)
{
const QString key = i.key();
QHtmlStream* stream = &nstream;
if (key == query)
stream = &sstream;
(*stream)
<< block("tr")
<< block("td")
<< block("a") << param("href") << "apt:/show?" + key
<< key
<< close()
<< close() << block("td") << *i << close() << endl
<< close() << endl;
}
if (!special.isEmpty())
*slave << QString("<table>") + special + QString("</table>\n<hr>\n");
*slave << QString("<table>") + normal + QString("</table>");
results.clear();
}
}
}

@ -0,0 +1,194 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/
#include "parsers.h"
#include "../apt.h"
#include <klocale.h>
#include <qregexp.h>
static const QString
html_attribute_begin("<tr><td class=\"attname\">%1</td>\n\t<td>\n\t\t"),
html_attribute_classed("<tr class=\"%1\"><td class=\"attname\">%2</td>\n\t<td>\n\t\t"),
html_attribute_end("\n\t</td>\n</tr>\n");
// Converts the special chars in orig into its HTML equivalents
static QString text2html(const QString& orig)
{ QString ret(orig);
ret = ret.replace("<(?!a href)", "&lt;");
//ret = ret.replace( QRegExp("\n"), "<br />\n");
return ret;
}
static void close_indent(int indent, QString& buffer)
{
if (buffer.isEmpty()) return;
if (indent)
buffer += "\n\t\t</div>";
}
static void close_item(int indent, QString& buffer)
{
if (buffer.isEmpty()) return;
close_indent(indent, buffer);
buffer += html_attribute_end;
}
static void close_table(const QString& version, int indent, QString& buffer)
{
if (buffer.isEmpty()) return;
close_item(indent, buffer);
buffer = version + "<table class=\"version\">\n" + buffer + "</table>\n";
}
static QString version_header_link(const KURL& url, const QString& name)
{ return QString("\t<a class=\"links\" href=\"" + url.htmlURL() + "\">" + name + "</a>\n"); }
namespace Parsers
{
Show::Show(const QString& package, const QString& installed_version, bool act)
: m_package(package), m_installed(installed_version), m_act(false)
{
m_act = act;
}
void Show::operator() (AptProtocol* slave, const QString& tag, const QString& value)
{
// Since we want to show the version first, we should wait for it
// before sending anything
static QString version;
static QString buffer;
static QString attribute;
static int indent;
static bool multiline = false;
static bool first_line = false, new_paragraph = true;
if (tag == "begin" || tag == "package" || tag == "end")
{
if (multiline && !new_paragraph)
buffer += "</p>";
if (tag == "begin")
m_result_count = 0;
else
{
m_result_count += (tag == "package");
close_table(version, indent, buffer);
if (!buffer.isEmpty()) *slave << buffer;
}
// init the state variables for the next package
buffer = "";
indent = 0;
first_line = false;
new_paragraph = true;
}
else if (tag == "field")
{
if (multiline && !new_paragraph)
buffer += "</p>";
attribute = value;
if (value == "Depends" || value == "Description")
{
close_item(indent, buffer);
buffer +=
html_attribute_begin.arg(value)
+ "&nbsp;";
close_item(indent, buffer);
buffer += html_attribute_begin.arg("&nbsp;");
}
else if (value != "Version" && value != "Package")
{
close_item(indent, buffer);
buffer += html_attribute_begin.arg(value);
}
if (value == "Description")
{
multiline = true;
new_paragraph = true;
first_line = true;
}
else
{
multiline = false;
}
}
else if (tag == "indent")
{
close_indent(indent, buffer);
int new_indent = value.toInt();
if (new_indent)
buffer += "\n\t<div style=\"margin-left: " + value + "em\">";
indent = new_indent;
}
else if (tag == "data" && attribute == "Version")
{
KURL action ("apt:/get");
QString item_id = mangle_version(value);
if (value == m_installed)
{
action.setQuery("remove");
version = QString("<div class=\"version-header-installed\" id=\"%1\">").arg(item_id)
+ i18n("Installed version %1").arg(value);
}
else
{
action.setQuery("install");
version = QString("<div class=\"version-header\" id=\"%1\">").arg(item_id)
+ i18n("Version %1").arg(value);
}
action.addQueryItem("package", m_package);
action.addQueryItem("version", value);
if (m_act)
{
if (value == m_installed)
version += version_header_link(action, i18n("Remove"));
else
version += version_header_link(action, i18n("Install"));
}
version += "</div>\n";
}
else if (tag == "data")
{
if (multiline)
{
static const QRegExp rx_empty("^\\s*$");
if (rx_empty.exactMatch(value))
{
buffer += "</p>";
new_paragraph = true;
}
else if (first_line)
{
new_paragraph = true;
first_line = false;
}
else if (new_paragraph)
{
buffer += "<p>";
new_paragraph = false;
}
}
buffer += text2html(QString(value).replace(QRegExp("(http://\\S+)"),QString("<a href=\"\\1\">\\1</a>")));
}
else if (tag == "package_link")
buffer += "<a href=\"" + slave->buildURL("show", value).htmlURL() + "\">" + value + "</a>";
}
}

@ -0,0 +1,45 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/
#include "regexps.h"
#include "debug.h"
#include <kdebug.h>
bool match_dversion(QString version)
{
static QRegExp rx_revision(rxs_revision);
QString allowed_vchars = ".+\\w";
kdDebug(DEBUG_ZONE) << version << endl;
if (version[1] == ':')
{
allowed_vchars += ":";
if (! version[0].isDigit()) return false;
kdDebug(DEBUG_ZONE) << "Matched epoch" << endl;
version = version.right( version.length() - 2 );
}
kdDebug(DEBUG_ZONE) << version << endl;
int rev_pos = version.findRev('-');
if (rev_pos > -1)
{
allowed_vchars += "-";
QString revision = version.right( version.length() - rev_pos - 1);
if (! rx_revision.exactMatch(revision))
return false;
kdDebug(DEBUG_ZONE) << "Matched revision" << endl;
version.truncate( version.length() - rev_pos - 1 );
}
QRegExp rx_version("\\d[" + allowed_vchars + "]*");
return rx_version.exactMatch(version);
}

@ -0,0 +1,23 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/
#ifndef REGEXPS_H
#define REGEXPS_H
#include <qstring.h>
#include <qregexp.h>
static const QString rxs_pkgname("\\w[\\w+-.]+");
static const QString rxs_revision("\\w[.+\\w]*");
bool match_dversion(QString version);
#endif

@ -0,0 +1,2 @@
po
src

@ -0,0 +1,9 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/

@ -0,0 +1,9 @@
/***************************************************************************
* Copyright (C) 2003 by Sylvain Joyeux *
* sylvain.joyeux@m4x.org *
* *
* 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. *
***************************************************************************/
Loading…
Cancel
Save