Fix #5732 - change to cmake for build
authorAlan Knowles <alan@roojs.com>
Fri, 15 Feb 2019 07:29:03 +0000 (15:29 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 15 Feb 2019 07:29:03 +0000 (15:29 +0800)
45 files changed:
.gitignore
CMakeLists.txt [new file with mode: 0644]
COPYING
INSTALL
LICENSE
Makefile.am [deleted file]
README.md
autogen.sh
bin/.gitignore [new file with mode: 0644]
bin/CMakeLists.txt [new file with mode: 0644]
bin/main.vala [moved from src/main.vala with 98% similarity]
cmake/AddCompilerFlags.cmake [new file with mode: 0644]
cmake/FindGLib.cmake [new file with mode: 0644]
cmake/FindGObjectIntrospection.cmake [new file with mode: 0644]
cmake/FindVala.cmake [new file with mode: 0644]
cmake/FindValadoc.cmake [new file with mode: 0644]
configure [new file with mode: 0755]
configure.ac [deleted file]
roojspacker/.gitignore [new file with mode: 0644]
roojspacker/CMakeLists.txt [new file with mode: 0644]
roojspacker/Collapse.vala [moved from src/jsdoc/Collapse.vala with 100% similarity]
roojspacker/CompressWhite.vala [moved from src/jsdoc/CompressWhite.vala with 100% similarity]
roojspacker/DocBuilder.vala [moved from src/jsdoc/DocBuilder.vala with 100% similarity]
roojspacker/DocComment.vala [moved from src/jsdoc/DocComment.vala with 100% similarity]
roojspacker/DocParser.vala [moved from src/jsdoc/DocParser.vala with 100% similarity]
roojspacker/DocTag.vala [moved from src/jsdoc/DocTag.vala with 100% similarity]
roojspacker/Identifier.vala [moved from src/jsdoc/Identifier.vala with 100% similarity]
roojspacker/Lang.vala [moved from src/jsdoc/Lang.vala with 100% similarity]
roojspacker/Packer.vala [moved from src/jsdoc/Packer.vala with 100% similarity]
roojspacker/PackerRun.vala [moved from src/jsdoc/PackerRun.vala with 100% similarity]
roojspacker/PrettyPrint.vala [moved from src/jsdoc/PrettyPrint.vala with 100% similarity]
roojspacker/Scope.vala [moved from src/jsdoc/Scope.vala with 100% similarity]
roojspacker/ScopeParser.vala [moved from src/jsdoc/ScopeParser.vala with 100% similarity]
roojspacker/Symbol.vala [moved from src/jsdoc/Symbol.vala with 100% similarity]
roojspacker/SymbolSet.vala [moved from src/jsdoc/SymbolSet.vala with 100% similarity]
roojspacker/TextStream.vala [moved from src/jsdoc/TextStream.vala with 100% similarity]
roojspacker/Token.vala [moved from src/jsdoc/Token.vala with 100% similarity]
roojspacker/TokenReader.vala [moved from src/jsdoc/TokenReader.vala with 100% similarity]
roojspacker/TokenStream.vala [moved from src/jsdoc/TokenStream.vala with 100% similarity]
roojspacker/Walker.vala [moved from src/jsdoc/Walker.vala with 100% similarity]
roojspacker/cmake_install.cmake [new file with mode: 0644]
roojspacker/roojspacker.pc.in [moved from roojspacker-1.2.pc.in with 100% similarity]
src/Makefile.am [deleted file]
src/roojspacker-1.2.h [deleted file]
src/roojspacker-1.2.vapi [deleted file]

index 8ada365..a2e6e6e 100644 (file)
@@ -1,52 +1,3 @@
-src/Makefile
-src/jsdoc/*.c
-src/jsdoc/*.o
-src/*.c
-src/*.o
-src/roojspacker
-src/*.stamp
-src/*.stamp-t
-src/*.la
-src/roojspacker-1.0.h
-src/roojspacker-1.1.h
-src/roojspacker-1.2.h
 
-src/roojspacker
-src/*.vapi
-src/*.typelib
-src/*.gir
+build/
 
-tests/*.c
-examples/test
-
-
-Makefile
-Makefile.in
-aclocal.m4
-autom4te.cache
-config.*
-configure
-depcomp
-install-sh
-libtool
-ltmain.sh
-m4/
-missing
-stamp-h?
-.deps/
-.dirstamp
-.libs/
-*.l[ao]
-*~
-compile
-fontconfig/*
-*.pc
-
-
-bindings/php/*
-!bindings/php/config.m4
-!bindings/php/example.php
-!bindings/php/roojspacker.c
-!bindings/php/php_roojspacker.h
-!bindings/php/roojspacker.xml
-!README
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..bd29425
--- /dev/null
@@ -0,0 +1,120 @@
+project("roojspacker" C)
+
+cmake_minimum_required(VERSION 3.2)
+
+
+set(PROJECT_WEB "https://www.roojs.com/")
+# Where to report bugs; usually either an e-mail address or an issue
+# tracker URL.
+set(PROJECT_BUGS "https://www.roojs.com/mtrack/")
+# Gettext package name
+#set(GETTEXT_PACKAGE ${PROJECT_NAME})
+
+# Library version
+#
+# This should be incremented with every release.  See semver.org.
+set (ROOJSPACKER_VERSION_MAJOR    1)
+set (ROOJSPACKER_VERSION_MINOR    2)
+set (ROOJSPACKER_VERSION_REVISION 0)
+
+# API version.
+#
+# This will go in the pkg-config and shared library names.  Should
+# only be changed if the API breaks backwards compatibility.
+set (ROOJSPACKER_VERSION_API      "1.2")
+set (ROOJSPACKER_SOVERSION_CURRENT  ${ROOJSPACKER_VERSION_MAJOR})
+set (ROOJSPACKER_SOVERSION_REVISION ${ROOJSPACKER_VERSION_MINOR})
+set (ROOJSPACKER_SOVERSION_AGE      ${ROOJSPACKER_VERSION_REVISION})
+
+
+
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
+
+find_package(GLib "2.38" REQUIRED) 
+find_package(Vala "0.36.0" REQUIRED)
+
+   
+
+find_package(PkgConfig)
+pkg_check_modules(GOBJECT REQUIRED gobject-2.0)
+pkg_check_modules(GIO REQUIRED gio-2.0)
+pkg_check_modules(GEE REQUIRED gee-0.8)
+pkg_check_modules(GTHREAD REQUIRED gthread-2.0)
+# this was optional??
+pkg_check_modules(JSON REQUIRED json-glib-1.0)
+
+
+set(ROOJSPACKER_VALA_PACKAGES
+    glib-2.0  
+    gobject-2.0  
+    gee-0.8 
+    posix 
+    gio-2.0
+    json-glib-1.0
+)
+
+
+
+set(CFLAGS
+       ${GOBJECT_CFLAGS} ${GOBJECT_CFLAGS_OTHER}
+       ${GIO_CFLAGS} ${GIO_CFLAGS_OTHER}
+       ${GTHREAD_CFLAGS} ${GTHREAD_CFLAGS_OTHER}
+        ${GEE_CFLAGS} ${GEE_CFLAGS_OTHER}
+        ${JSON_CFLAGS} ${JSON_CFLAGS_OTHER}
+)
+add_definitions(${CFLAGS})
+
+
+
+if(CMAKE_BUILD_TYPE STREQUAL "")
+  set(CMAKE_BUILD_TYPE "Debug")
+endif(CMAKE_BUILD_TYPE STREQUAL "")
+
+list(APPEND VALA_COMPILER_FLAGS
+        "--target-glib=2.38"
+        "-g"
+        "--thread"
+        "--vapidir=${CMAKE_SOURCE_DIR}/vapi"
+)
+list(APPEND VALA_COMPILER_FLAGs_DEBUG "--debug")
+#        "-X -shared"
+#"-X -lm"
+
+
+
+include(AddCompilerFlags)
+
+global_add_compiler_flags(-Wno-incompatible-pointer-types)
+
+
+set(LIBS
+       ${GOBJECT_LIBRARIES}
+       ${GIO_LIBRARIES}
+       ${GEE_LIBRARIES}
+       ${GTHREAD_LIBRARIES}
+        ${JSON_LIBRARIES}
+)
+link_libraries(${LIBS})
+
+
+set(LIB_PATHS
+       ${GOBJECT_LIBRARY_DIRS}
+       ${GIO_LIBRARY_DIRS}
+       ${GEE_LIBRARY_DIRS}
+       ${GTHREAD_LIBRARY_DIRS}
+        ${JSON_LIBRARY_DIRS}
+)
+link_directories(${LIB_PATHS})
+
+set (LIBRARY_PATH "src")
+set(ROOJSPACKER_LIBRARY_NAME ${PROJECT_NAME}-${ROOJSPACKER_VERSION_API})
+set(ROOJSPACKER_PKG_NAME ${PROJECT_NAME}-${ROOJSPACKER_VERSION_API})
+
+# Name of the GObject Introspection repository for the library.
+set(ROOJSPACKER_GIR_NAME "MyProject-${ROOJSPACKER_VERSION_API}")
+
+set (LIBRARY_PATH "roojspacker")
+  
+add_subdirectory(roojspacker)
+add_subdirectory(bin)
\ No newline at end of file
diff --git a/COPYING b/COPYING
index 94a9ed0..4ae602e 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -1,674 +1 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  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
-them 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 prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  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.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey 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;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If 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 convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU 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 that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  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.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-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.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+see licence - it's LGPL
\ No newline at end of file
diff --git a/INSTALL b/INSTALL
index 2099840..28814ab 100644 (file)
--- a/INSTALL
+++ b/INSTALL
-Installation Instructions
-*************************
 
-Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
-Inc.
+## -- this is designed to run make from the 'build' directory.... - it's hard coded in configure (called from autogen)
 
-   Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved.  This file is offered as-is,
-without warranty of any kind.
+git clone https://github.com/roojs/roojspacker.git
 
-Basic Installation
-==================
+apt-get install valac cmake gcc libgee-0.8-dev   libtool libjson-glib-dev
 
-   Briefly, the shell command `./configure && make && make install'
-should configure, build, and install this package.  The following
-more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.  Some packages provide this
-`INSTALL' file but do not implement all of the features documented
-below.  The lack of an optional feature in a given package is not
-necessarily a bug.  More recommendations for GNU packages can be found
-in *note Makefile Conventions: (standards)Makefile Conventions.
-
-   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, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
-   It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
-
-   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 you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
-   The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You need `configure.ac' 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.
-
-     Running `configure' might take a while.  While running, it prints
-     some messages telling which features it is checking for.
-
-  2. Type `make' to compile the package.
-
-  3. Optionally, type `make check' to run any self-tests that come with
-     the package, generally using the just-built uninstalled binaries.
-
-  4. Type `make install' to install the programs and any data files and
-     documentation.  When installing into a prefix owned by root, it is
-     recommended that the package be configured and built as a regular
-     user, and only the `make install' phase executed with root
-     privileges.
-
-  5. Optionally, type `make installcheck' to repeat any self-tests, but
-     this time using the binaries in their final installed location.
-     This target does not install anything.  Running this target as a
-     regular user, particularly if the prior `make install' required
-     root privileges, verifies that the installation completed
-     correctly.
-
-  6. You can remove the program binaries and object files from the
-     source code directory by typing `make clean'.  To also remove the
-     files that `configure' created (so you can compile the package for
-     a different kind of computer), type `make distclean'.  There is
-     also a `make maintainer-clean' target, but that is intended mainly
-     for the package's developers.  If you use it, you may have to get
-     all sorts of other programs in order to regenerate files that came
-     with the distribution.
-
-  7. Often, you can also type `make uninstall' to remove the installed
-     files again.  In practice, not all packages have tested that
-     uninstallation works correctly, even though it is required by the
-     GNU Coding Standards.
-
-  8. Some packages, particularly those that use Automake, provide `make
-     distcheck', which can by used by developers to test that all other
-     targets like `make install' and `make uninstall' work correctly.
-     This target is generally not run by end users.
-
-Compilers and Options
-=====================
-
-   Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  Run `./configure --help'
-for details on some of the pertinent environment variables.
-
-   You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment.  Here
-is an example:
-
-     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
-
-   *Note Defining Variables::, for more details.
-
-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 can use 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 `..'.  This
-is known as a "VPATH" build.
-
-   With a non-GNU `make', it is safer 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.
-
-   On MacOS X 10.5 and later systems, you can create libraries and
-executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple `-arch' options to the
-compiler but only a single `-arch' option to the preprocessor.  Like
-this:
-
-     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
-                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
-                 CPP="gcc -E" CXXCPP="g++ -E"
-
-   This is not guaranteed to produce working output in all cases, you
-may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
-
-Installation Names
-==================
-
-   By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc.  You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX', where PREFIX must be an
-absolute file name.
-
-   You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files.  If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
-   In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.  In general, the
-default for these options is expressed in terms of `${prefix}', so that
-specifying just `--prefix' will affect all of the other directory
-specifications that were not explicitly provided.
-
-   The most portable way to affect installation locations is to pass the
-correct locations to `configure'; however, many packages provide one or
-both of the following shortcuts of passing variable assignments to the
-`make install' command line to change installation locations without
-having to reconfigure or recompile.
-
-   The first method involves providing an override variable for each
-affected directory.  For example, `make install
-prefix=/alternate/directory' will choose an alternate location for all
-directory configuration variables that were expressed in terms of
-`${prefix}'.  Any directories that were specified during `configure',
-but not in terms of `${prefix}', must each be overridden at install
-time for the entire installation to be relocated.  The approach of
-makefile variable overrides for each directory variable is required by
-the GNU Coding Standards, and ideally causes no recompilation.
-However, some platforms have known limitations with the semantics of
-shared libraries that end up requiring recompilation when using this
-method, particularly noticeable in packages that use GNU Libtool.
-
-   The second method involves providing the `DESTDIR' variable.  For
-example, `make install DESTDIR=/alternate/directory' will prepend
-`/alternate/directory' before all installation names.  The approach of
-`DESTDIR' overrides is not required by the GNU Coding Standards, and
-does not work on platforms that have drive letters.  On the other hand,
-it does better at avoiding recompilation issues, and works well even
-when some directory options were not specified in terms of `${prefix}'
-at `configure' time.
-
-Optional Features
-=================
-
-   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'.
-
-   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.
-
-   Some packages offer the ability to configure how verbose the
-execution of `make' will be.  For these packages, running `./configure
---enable-silent-rules' sets the default to minimal output, which can be
-overridden with `make V=1'; while running `./configure
---disable-silent-rules' sets the default to verbose, which can be
-overridden with `make V=0'.
-
-Particular systems
-==================
-
-   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
-CC is not installed, it is recommended to use the following options in
-order to use an ANSI C compiler:
-
-     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
-
-and if that doesn't work, install pre-built binaries of GCC for HP-UX.
-
-   HP-UX `make' updates targets which have the same time stamps as
-their prerequisites, which makes it generally unusable when shipped
-generated files such as `configure' are involved.  Use GNU `make'
-instead.
-
-   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
-a workaround.  If GNU CC is not installed, it is therefore recommended
-to try
-
-     ./configure CC="cc"
-
-and if that doesn't work, try
-
-     ./configure CC="cc -nodtk"
-
-   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
-directory contains several dysfunctional programs; working variants of
-these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
-in your `PATH', put it _after_ `/usr/bin'.
-
-   On Haiku, software installed for all users goes in `/boot/common',
-not `/usr/local'.  It is recommended to use the following options:
-
-     ./configure --prefix=/boot/common
-
-Specifying the System Type
-==========================
-
-   There may be some features `configure' cannot figure out
-automatically, but needs to determine by the type of machine the package
-will run on.  Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
-a message saying it cannot guess the machine type, give it the
-`--build=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
-     CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
-     OS
-     KERNEL-OS
-
-   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 machine type.
-
-   If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
-   If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-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.
-
-Defining Variables
-==================
-
-   Variables not defined in a site shell script can be set in the
-environment passed to `configure'.  However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost.  In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'.  For example:
-
-     ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).
-
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf limitation.  Until the limitation is lifted, you can use
-this workaround:
-
-     CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-`configure' Invocation
-======================
-
-   `configure' recognizes the following options to control how it
-operates.
-
-`--help'
-`-h'
-     Print a summary of all of the options to `configure', and exit.
-
-`--help=short'
-`--help=recursive'
-     Print a summary of the options unique to this package's
-     `configure', and exit.  The `short' variant lists options used
-     only in the top level, while the `recursive' variant lists options
-     also present in any nested packages.
-
-`--version'
-`-V'
-     Print the version of Autoconf used to generate the `configure'
-     script, and exit.
-
-`--cache-file=FILE'
-     Enable the cache: use and save the results of the tests in FILE,
-     traditionally `config.cache'.  FILE defaults to `/dev/null' to
-     disable caching.
-
-`--config-cache'
-`-C'
-     Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
-     Do not print messages saying which checks are being made.  To
-     suppress all normal output, redirect it to `/dev/null' (any error
-     messages will still be shown).
-
-`--srcdir=DIR'
-     Look for the package's source code in directory DIR.  Usually
-     `configure' can determine that directory automatically.
-
-`--prefix=DIR'
-     Use DIR as the installation prefix.  *note Installation Names::
-     for more details, including other options available for fine-tuning
-     the installation locations.
-
-`--no-create'
-`-n'
-     Run the configure checks, but stop before creating any output
-     files.
-
-`configure' also accepts some other, not widely useful, options.  Run
-`configure --help' for more details.
+cd roojspacker
+./autogen.sh --prefix=/usr
+cd build
+sudo make install
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
index 341c30b..02bbb60 100644 (file)
--- a/LICENSE
+++ b/LICENSE
@@ -162,5 +162,4 @@ General Public License ever published by the Free Software Foundation.
 whether future versions of the GNU Lesser General Public License shall
 apply, that proxy's public statement of acceptance of any version is
 permanent authorization for you to choose that version for the
-Library.
-
+Library.
\ No newline at end of file
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644 (file)
index 5ed7b6d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-SUBDIRS = src
-
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = roojspacker-1.2.pc
\ No newline at end of file
index 7976043..98bee74 100644 (file)
--- a/README.md
+++ b/README.md
@@ -5,8 +5,12 @@ Installation Procedure (Debian/Ubuntu)
 
 git clone https://github.com/roojs/roojspacker.git
 
-apt-get install valac autoconf automake gcc libgee-0.8-dev make libtool libjson-glib-dev
+apt-get install valac cmake gcc libgee-0.8-dev   libtool libjson-glib-dev
+
+
+## -- this is designed to run make from the 'build' directory.... - it's hard coded in configure (called from autogen)
 
 cd roojspacker
 ./autogen.sh --prefix=/usr
+cd build
 sudo make install
\ No newline at end of file
index d231fbe..b6d4636 100755 (executable)
 #!/bin/sh
-# Run this to generate all the initial makefiles, etc.
 
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
+# Calling this script is basically the same as calling the configure
+# script directly, except that if your project uses submodules calling
+# this script will automatically initialize them.
 
-DIE=0
-
-(test -f $srcdir/configure.ac) || {
-    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
-    echo " top-level package directory"
-    exit 1
-}
-
-(autoconf --version) < /dev/null > /dev/null 2>&1 || {
-  echo
-  echo "**Error**: You must have \`autoconf' installed."
-  echo "Download the appropriate package for your distribution,"
-  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
-  DIE=1
-}
-
-#?? needed??
-(grep "^IT_PROG_INTLTOOL" $srcdir/configure.ac >/dev/null) && {
-  (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
-    echo 
-    echo "**Error**: You must have \`intltool' installed."
-    echo "You can get it from:"
-    echo "  ftp://ftp.gnome.org/pub/GNOME/"
-    DIE=1
-  }
-}
-
-(grep "^LT_INIT" $srcdir/configure.ac >/dev/null) && {
-  (libtoolize --version) < /dev/null > /dev/null 2>&1 || {
-    echo
-    echo "**Error**: You must have \`libtool' installed."
-    echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
-    DIE=1
-  }
-}
-(automake --version) < /dev/null > /dev/null 2>&1 || {
-  echo
-  echo "**Error**: You must have \`automake' installed."
-  echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
-  DIE=1
-  NO_AUTOMAKE=yes
-}
-
-
-# if no automake, don't bother testing for aclocal
-test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
-  echo
-  echo "**Error**: Missing \`aclocal'.  The version of \`automake'"
-  echo "installed doesn't appear recent enough."
-  echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
-  DIE=1
-}
-
-if test "$DIE" -eq 1; then
-  exit 1
-fi
-
-if test -z "$*"; then
-  echo "**Warning**: I am going to run \`configure' with no arguments."
-  echo "If you wish to pass any to it, please specify them on the"
-  echo \`$0\'" command line."
-  echo
-fi
-
-case $CC in
-xlc )
-  am_opt=--include-deps;;
-esac
-
-
-dr=$srcdir
-if test -f $dr/NO-AUTO-GEN; then
-    echo skipping $dr -- flagged as no auto-gen
-else
-    echo processing $dr
-    ( cd $dr
-    
-      aclocalinclude="$ACLOCAL_FLAGS"
-    
-        if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then
-          echo "Creating $dr/aclocal.m4 ..."
-          test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
-          
-          echo "Making $dr/aclocal.m4 writable ..."
-          test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
-        fi
-        
-        #  if grep "^IT_PROG_INTLTOOL" configure.ac >/dev/null; then
-        #    echo "Running intltoolize..."
-        #intltoolize --copy --force --automake
-        #  fi
-        #
-        if grep "^LT_INIT" configure.ac >/dev/null; then
-            if test -z "$NO_LIBTOOLIZE" ; then 
-              echo "Running libtoolize..."
-              libtoolize --force --copy
-            fi
-        fi
-        echo "Running aclocal $aclocalinclude ..."
-        aclocal $aclocalinclude
-        if grep "^A[CM]_CONFIG_HEADER" configure.ac >/dev/null; then
-            echo "Running autoheader..."
-            autoheader
-        fi
-        echo "Running automake  $am_opt ..."
-        automake --add-missing --copy  $am_opt
-        echo "Running autoconf ..."
-        autoconf
-    )
+if [ -e $(dirname "$0")/.gitmodules ]; then
+    (cd "$(dirname "$0")" && git submodule update --init --recursive)
 fi
 
-if test x$NOCONFIGURE = x; then
-  echo Running $srcdir/configure "$@" ...
-  $srcdir/configure "$@" \
-  && echo Now type \`make\' to compile. || exit 1
-else
-  echo Skipping configure process.
-fi
\ No newline at end of file
+$(dirname $0)/configure "$@"
\ No newline at end of file
diff --git a/bin/.gitignore b/bin/.gitignore
new file mode 100644 (file)
index 0000000..a60abec
--- /dev/null
@@ -0,0 +1,3 @@
+# Automatically generated by CMake, do not modify.
+/.gitignore
+/roojspacker
diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt
new file mode 100644 (file)
index 0000000..90e7fa1
--- /dev/null
@@ -0,0 +1,62 @@
+#
+#
+# Main target
+set(ROOJSPACKER_MAIN_VALA_SOURCES
+   main.vala)
+   
+   
+set(ROOJS_VALA_CUSTOM_VAPIS
+  ${CMAKE_BINARY_DIR}/${LIBRARY_PATH}/${ROOJSPACKER_PKG_NAME}.vapi)
+
+set(ROOJSPACKER_VALA_PACKAGES
+    glib-2.0  
+    gobject-2.0  
+    gee-0.8 
+    posix 
+    gio-2.0
+    json-glib-1.0
+)
+
+
+# Compile Vala sources to C
+vala_precompile_target(
+  "${PROJECT_NAME}-valabin"
+  ROOJSPACKER_MAIN_C_SOURCES
+  ${ROOJS_VALA_CUSTOM_VAPIS}
+  ${ROOJSPACKER_MAIN_VALA_SOURCES}
+  PACKAGES ${ROOJSPACKER_VALA_PACKAGES}
+  DEPENDS "${ROOJSPACKER_LIBRARY_NAME}-vala")
+
+# Tell CMake to create an executable named "my-project"
+add_executable(${PROJECT_NAME}
+       ${ROOJSPACKER_MAIN_C_SOURCES})
+
+# Make sure the Vala sources are compiled to C before attempting to
+# build the executable.
+add_dependencies("${PROJECT_NAME}" "${PROJECT_NAME}-valabin")
+
+# We need to add the directory where the C header for our library is
+# installed, otherwise we'll get an error from the C compiler.
+set_target_properties(${PROJECT_NAME} PROPERTIES
+       INCLUDE_DIRECTORIES ${CMAKE_BINARY_DIR}/roojspacker)
+
+# Any libraries that your tests need to link to should go here.
+# Usually this will just be your library.
+target_link_libraries(${PROJECT_NAME}
+    ${ROOJSPACKER_LIBRARY_NAME})
+
+# Install the executable.
+install (TARGETS ${PROJECT_NAME}
+    RUNTIME DESTINATION bin ${CMAKE_INSTALL_BINDIR})
+
+# Generate a .gitignore
+file(WRITE  ".gitignore" "# Automatically generated by CMake, do not modify.\n")
+foreach(file
+    ".gitignore"
+    "roojspacker${CMAKE_EXECUTABLE_SUFFIX}")
+  file(APPEND ".gitignore" "/${file}\n")
+endforeach(file)
+foreach(file ${ROOJSPACKER_MAIN_SOURCES})
+  string(REPLACE "${CMAKE_CURRENT_BINARY_DIR}/" "" file ${file})
+  file(APPEND ".gitignore" "/${file}\n")
+endforeach(file)
\ No newline at end of file
similarity index 98%
rename from src/main.vala
rename to bin/main.vala
index 8162696..fb96d51 100644 (file)
@@ -11,4 +11,4 @@ public static int main(string[] args)
        pr.runPack();
        
        return 0;
-}
\ No newline at end of file
+} 
\ No newline at end of file
diff --git a/cmake/AddCompilerFlags.cmake b/cmake/AddCompilerFlags.cmake
new file mode 100644 (file)
index 0000000..c8e6077
--- /dev/null
@@ -0,0 +1,186 @@
+# Copyright (c) 2016 Evan Nemerson <evan@nemerson.com>
+#
+# Permission is hereby granted, free of charge, to any person
+# obtaining a copy of this software and associated documentation files
+# (the "Software"), to deal in the Software without restriction,
+# including without limitation the rights to use, copy, modify, merge,
+# publish, distribute, sublicense, and/or sell copies of the Software,
+# and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+# This module provides a convenient way to add C/C++ compiler flags if
+# the compiler supports them.
+
+include (CheckCCompilerFlag)
+include (CheckCXXCompilerFlag)
+
+# Depending on the settings, some compilers will accept unknown flags.
+# We try to disable this behavior by also passing these flags when we
+# check if a flag is supported.
+set (ADD_COMPILER_FLAGS_PREPEND "")
+
+if ("GNU" STREQUAL "${CMAKE_C_COMPILER_ID}")
+  set (ADD_COMPILER_FLAGS_PREPEND "-Wall -Wextra -Werror")
+elseif ("Clang" STREQUAL "${CMAKE_C_COMPILER_ID}")
+  set (ADD_COMPILER_FLAGS_PREPEND "-Werror=unknown-warning-option")
+endif ()
+
+##
+# Set a variable to different flags, depending on which compiler is in
+# use.
+#
+# Example:
+#   set_compiler_flags(VARIABLE varname MSVC /wd666 INTEL /wd1729)
+#
+#   This will set varname to /wd666 if the compiler is MSVC, and /wd1729
+#   if it is Intel.
+#
+# Possible compilers:
+#  - GCC: GNU C Compiler
+#  - GCCISH: A compiler that (tries to) be GCC-compatible on the CLI
+#    (i.e., anything but MSVC).
+#  - CLANG: clang
+#  - MSVC: Microsoft Visual C++ compiler
+#  - INTEL: Intel C Compiler
+#
+# Note: the compiler is determined based on the value of the
+# CMAKE_C_COMPILER_ID variable, not CMAKE_CXX_COMPILER_ID.
+##
+function (set_compiler_specific_flags)
+  set (oneValueArgs VARIABLE)
+  set (multiValueArgs GCC GCCISH INTEL CLANG MSVC)
+  cmake_parse_arguments(COMPILER_SPECIFIC_FLAGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+  unset (options)
+  unset (oneValueArgs)
+  unset (multiValueArgs)
+
+  set (compiler_flags)
+
+  if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
+    list (APPEND compiler_flags ${COMPILER_SPECIFIC_FLAGS_GCC})
+  elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
+    list (APPEND compiler_flags ${COMPILER_SPECIFIC_FLAGS_CLANG})
+  elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
+    list (APPEND compiler_flags ${COMPILER_SPECIFIC_FLAGS_INTEL})
+  elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
+    list (APPEND compiler_flags ${COMPILER_SPECIFIC_FLAGS_MSVC})
+  endif()
+
+  if (NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
+    list (APPEND compiler_flags ${COMPILER_SPECIFIC_FLAGS_GCCISH})
+  endif ()
+
+  set (${COMPILER_SPECIFIC_FLAGS_VARIABLE} "${compiler_flags}" PARENT_SCOPE)
+endfunction ()
+
+function (source_file_add_compiler_flags_unchecked file)
+  set (flags ${ARGV})
+  list (REMOVE_AT flags 0)
+  get_source_file_property (sources ${file} SOURCES)
+
+  foreach (flag ${flags})
+    get_source_file_property (existing ${file} COMPILE_FLAGS)
+    if ("${existing}" STREQUAL "NOTFOUND")
+      set_source_files_properties (${file}
+        PROPERTIES COMPILE_FLAGS "${flag}")
+    else ()
+      set_source_files_properties (${file}
+        PROPERTIES COMPILE_FLAGS "${existing} ${flag}")
+    endif ()
+  endforeach (flag)
+endfunction ()
+
+function (source_file_add_compiler_flags file)
+  set (flags ${ARGV})
+  list (REMOVE_AT flags 0)
+  get_source_file_property (sources ${file} SOURCES)
+
+  foreach (flag ${flags})
+    if ("GNU" STREQUAL "${CMAKE_C_COMPILER_ID}")
+      # Because https://gcc.gnu.org/wiki/FAQ#wnowarning
+      string (REGEX REPLACE "\\-Wno\\-(.+)" "-W\\1" flag_to_test "${flag}")
+    else ()
+      set (flag_to_test ${flag})
+    endif ()
+
+    if ("${file}" MATCHES "\\.c$")
+      string (REGEX REPLACE "[^a-zA-Z0-9]+" "_" test_name "CFLAG_${flag_to_test}")
+      CHECK_C_COMPILER_FLAG ("${ADD_COMPILER_FLAGS_PREPEND} ${flag_to_test}" ${test_name})
+    elseif ("${file}" MATCHES "\\.(cpp|cc|cxx)$")
+      string (REGEX REPLACE "[^a-zA-Z0-9]+" "_" test_name "CXXFLAG_${flag_to_test}")
+      CHECK_CXX_COMPILER_FLAG ("${ADD_COMPILER_FLAGS_PREPEND} ${flag_to_test}" ${test_name})
+    endif ()
+
+    if (${test_name})
+      source_file_add_compiler_flags_unchecked (${file} ${flag})
+    endif ()
+
+    unset (test_name)
+    unset (flag_to_test)
+  endforeach (flag)
+
+  unset (flags)
+endfunction ()
+
+function (target_add_compiler_flags target)
+  set (flags ${ARGV})
+  list (REMOVE_AT flags 0)
+  get_target_property (sources ${target} SOURCES)
+
+  foreach (source ${sources})
+    source_file_add_compiler_flags (${source} ${flags})
+  endforeach (source)
+
+  unset (flags)
+  unset (sources)
+endfunction (target_add_compiler_flags)
+
+# global_add_compiler_flags (flag1 [flag2 [flag3 ...]]):
+#
+# This just adds the requested compiler flags to
+# CMAKE_C/CXX_FLAGS variable if they work with the compiler.
+function (global_add_compiler_flags)
+  set (flags ${ARGV})
+
+  foreach (flag ${flags})
+    if ("GNU" STREQUAL "${CMAKE_C_COMPILER_ID}")
+      # Because https://gcc.gnu.org/wiki/FAQ#wnowarning
+      string (REGEX REPLACE "\\-Wno\\-(.+)" "-W\\1" flag_to_test "${flag}")
+    else ()
+      set (flag_to_test "${flag}")
+    endif ()
+
+    string (REGEX REPLACE "[^a-zA-Z0-9]+" "_" c_test_name "CFLAG_${flag_to_test}")
+    CHECK_C_COMPILER_FLAG ("${ADD_COMPILER_FLAGS_PREPEND} ${flag_to_test}" ${c_test_name})
+    if (${c_test_name})
+      set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
+    endif ()
+    unset (c_test_name)
+
+    string (REGEX REPLACE "[^a-zA-Z0-9]+" "_" cxx_test_name "CFLAG_${flag_to_test}")
+    CHECK_CXX_COMPILER_FLAG ("${ADD_COMPILER_FLAGS_PREPEND} ${flag_to_test}" ${cxx_test_name})
+    if (${cxx_test_name})
+      set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
+    endif ()
+    unset (cxx_test_name)
+
+    unset (flag_to_test)
+  endforeach (flag)
+
+  unset (flags)
+
+  set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" PARENT_SCOPE)
+  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" PARENT_SCOPE)
+endfunction (global_add_compiler_flags)
\ No newline at end of file
diff --git a/cmake/FindGLib.cmake b/cmake/FindGLib.cmake
new file mode 100644 (file)
index 0000000..1213561
--- /dev/null
@@ -0,0 +1,257 @@
+# FindGLib.cmake
+# <https://github.com/nemequ/gnome-cmake>
+#
+# CMake support for GLib/GObject/GIO.
+#
+# License:
+#
+#   Copyright (c) 2016 Evan Nemerson <evan@nemerson.com>
+#
+#   Permission is hereby granted, free of charge, to any person
+#   obtaining a copy of this software and associated documentation
+#   files (the "Software"), to deal in the Software without
+#   restriction, including without limitation the rights to use, copy,
+#   modify, merge, publish, distribute, sublicense, and/or sell copies
+#   of the Software, and to permit persons to whom the Software is
+#   furnished to do so, subject to the following conditions:
+#
+#   The above copyright notice and this permission notice shall be
+#   included in all copies or substantial portions of the Software.
+#
+#   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+#   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+#   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+#   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+#   HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+#   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+#   DEALINGS IN THE SOFTWARE.
+
+find_package(PkgConfig)
+
+if(PKG_CONFIG_FOUND)
+  pkg_search_module(GLIB_PKG    glib-2.0)
+  pkg_search_module(GOBJECT_PKG gobject-2.0)
+  pkg_search_module(GIO_PKG     gio-2.0)
+endif()
+
+find_library(GLIB    glib-2.0    HINTS ${GLIB_PKG_LIBRARY_DIRS})
+find_library(GOBJECT gobject-2.0 HINTS ${GOBJECT_PKG_LIBRARY_DIRS})
+find_library(GIO     gio-2.0     HINTS ${GIO_PKG_LIBRARY_DIRS})
+
+if(GLIB)
+  add_library(glib-2.0 SHARED IMPORTED)
+  set_property(TARGET glib-2.0 PROPERTY IMPORTED_LOCATION "${GLIB}")
+
+  find_path(GLIB_INCLUDE_DIRS "glib.h"
+    HINTS ${GLIB_PKG_INCLUDE_DIRS}
+    PATH_SUFFIXES "glib-2.0")
+
+  get_filename_component(GLIB_LIBDIR "${GLIB}" DIRECTORY)
+  find_path(GLIB_CONFIG_INCLUDE_DIR "glibconfig.h"
+    HINTS
+      ${GLIB_LIBDIR}
+      ${GLIB_PKG_INCLUDE_DIRS}
+    PATHS
+      "${CMAKE_LIBRARY_PATH}"
+    PATH_SUFFIXES
+      "glib-2.0/include"
+      "glib-2.0")
+  unset(GLIB_LIBDIR)
+
+  if(NOT GLIB_CONFIG_INCLUDE_DIR)
+    unset(GLIB_INCLUDE_DIRS)
+  else()
+    file(STRINGS "${GLIB_CONFIG_INCLUDE_DIR}/glibconfig.h" GLIB_MAJOR_VERSION REGEX "^#define GLIB_MAJOR_VERSION +([0-9]+)")
+    string(REGEX REPLACE "^#define GLIB_MAJOR_VERSION ([0-9]+)$" "\\1" GLIB_MAJOR_VERSION "${GLIB_MAJOR_VERSION}")
+    file(STRINGS "${GLIB_CONFIG_INCLUDE_DIR}/glibconfig.h" GLIB_MINOR_VERSION REGEX "^#define GLIB_MINOR_VERSION +([0-9]+)")
+    string(REGEX REPLACE "^#define GLIB_MINOR_VERSION ([0-9]+)$" "\\1" GLIB_MINOR_VERSION "${GLIB_MINOR_VERSION}")
+    file(STRINGS "${GLIB_CONFIG_INCLUDE_DIR}/glibconfig.h" GLIB_MICRO_VERSION REGEX "^#define GLIB_MICRO_VERSION +([0-9]+)")
+    string(REGEX REPLACE "^#define GLIB_MICRO_VERSION ([0-9]+)$" "\\1" GLIB_MICRO_VERSION "${GLIB_MICRO_VERSION}")
+    set(GLIB_VERSION "${GLIB_MAJOR_VERSION}.${GLIB_MINOR_VERSION}.${GLIB_MICRO_VERSION}")
+    unset(GLIB_MAJOR_VERSION)
+    unset(GLIB_MINOR_VERSION)
+    unset(GLIB_MICRO_VERSION)
+
+    list(APPEND GLIB_INCLUDE_DIRS ${GLIB_CONFIG_INCLUDE_DIR})
+  endif()
+endif()
+
+if(GOBJECT)
+  add_library(gobject-2.0 SHARED IMPORTED)
+  set_property(TARGET gobject-2.0 PROPERTY IMPORTED_LOCATION "${GOBJECT}")
+
+  find_path(GOBJECT_INCLUDE_DIRS "glib-object.h"
+    HINTS ${GOBJECT_PKG_INCLUDE_DIRS}
+    PATH_SUFFIXES "glib-2.0")
+  if(GOBJECT_INCLUDE_DIRS)
+    list(APPEND GOBJECT_INCLUDE_DIRS ${GLIB_INCLUDE_DIRS})
+    list(REMOVE_DUPLICATES GOBJECT_INCLUDE_DIRS)
+  endif()
+endif()
+
+if(GIO)
+  add_library(gio-2.0 SHARED IMPORTED)
+  set_property(TARGET gio-2.0 PROPERTY IMPORTED_LOCATION "${GIO}")
+
+  find_path(GIO_INCLUDE_DIRS "gio/gio.h"
+    HINTS ${GIO_PKG_INCLUDE_DIRS}
+    PATH_SUFFIXES "glib-2.0")
+  if(GIO_INCLUDE_DIRS)
+    list(APPEND GIO_INCLUDE_DIRS ${GOBJECT_INCLUDE_DIRS})
+    list(REMOVE_DUPLICATES GIO_INCLUDE_DIRS)
+  endif()
+endif()
+
+find_program(GLIB_GENMARSHAL glib-genmarshal)
+if(GLIB_GENMARSHAL)
+  add_executable(glib-genmarshal IMPORTED)
+  set_property(TARGET glib-genmarshal PROPERTY IMPORTED_LOCATION "${GLIB_GENMARSHAL}")
+endif()
+
+find_program(GLIB_MKENUMS glib-mkenums)
+if(GLIB_MKENUMS)
+  add_executable(glib-mkenums IMPORTED)
+  set_property(TARGET glib-mkenums PROPERTY IMPORTED_LOCATION "${GLIB_MKENUMS}")
+endif()
+
+find_program(GLIB_COMPILE_SCHEMAS glib-compile-schemas)
+if(GLIB_COMPILE_SCHEMAS)
+  add_executable(glib-compile-schemas IMPORTED)
+  set_property(TARGET glib-compile-schemas PROPERTY IMPORTED_LOCATION "${GLIB_COMPILE_SCHEMAS}")
+endif()
+
+# glib_install_schemas(
+#   [DESTINATION directory]
+#   schemas…)
+#
+# Validate and install the listed schemas.
+function(glib_install_schemas)
+  set (options)
+  set (oneValueArgs DESTINATION)
+  set (multiValueArgs)
+  cmake_parse_arguments(GSCHEMA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+  unset (options)
+  unset (oneValueArgs)
+  unset (multiValueArgs)
+
+  foreach(schema ${GSCHEMA_UNPARSED_ARGUMENTS})
+    get_filename_component(schema_name "${schema}" NAME)
+    string(REGEX REPLACE "^(.+)\.gschema.xml$" "\\1" schema_name "${schema_name}")
+    set(schema_output "${CMAKE_CURRENT_BINARY_DIR}/${schema_name}.gschema.xml.valid")
+
+    add_custom_command(
+      OUTPUT "${schema_output}"
+      COMMAND glib-compile-schemas
+        --strict
+        --dry-run
+        --schema-file="${schema}"
+      COMMAND "${CMAKE_COMMAND}" ARGS -E touch "${schema_output}"
+      DEPENDS "${schema}"
+      WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+      COMMENT "Validating ${schema}")
+
+    add_custom_target("gsettings-schema-${schema_name}" ALL
+      DEPENDS "${schema_output}")
+
+    if(CMAKE_INSTALL_FULL_DATADIR)
+      set(SCHEMADIR "${CMAKE_INSTALL_FULL_DATADIR}/glib-2.0/schemas")
+    else()
+      set(SCHEMADIR "${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas")
+    endif()
+    install(FILES "${schema}"
+      DESTINATION "${SCHEMADIR}")
+    install(CODE "execute_process(COMMAND \"${GLIB_COMPILE_SCHEMAS}\" \"${SCHEMADIR}\")")
+  endforeach()
+endfunction()
+
+find_program(GLIB_COMPILE_RESOURCES glib-compile-resources)
+if(GLIB_COMPILE_RESOURCES)
+  add_executable(glib-compile-resources IMPORTED)
+  set_property(TARGET glib-compile-resources PROPERTY IMPORTED_LOCATION "${GLIB_COMPILE_RESOURCES}")
+endif()
+
+function(glib_compile_resources SPEC_FILE)
+  set (options INTERNAL)
+  set (oneValueArgs TARGET SOURCE_DIR HEADER SOURCE C_NAME)
+  set (multiValueArgs)
+  cmake_parse_arguments(GLIB_COMPILE_RESOURCES "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+  unset (options)
+  unset (oneValueArgs)
+  unset (multiValueArgs)
+
+  if(NOT GLIB_COMPILE_RESOURCES_SOURCE_DIR)
+    set(GLIB_COMPILE_RESOURCES_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
+  endif()
+
+  set(FLAGS)
+
+  if(GLIB_COMPILE_RESOURCES_INTERNAL)
+    list(APPEND FLAGS "--internal")
+  endif()
+
+  if(GLIB_COMPILE_RESOURCES_C_NAME)
+    list(APPEND FLAGS "--c-name" "${GLIB_COMPILE_RESOURCES_C_NAME}")
+  endif()
+
+  get_filename_component(SPEC_FILE "${SPEC_FILE}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
+
+  execute_process(
+    COMMAND glib-compile-resources
+      --generate-dependencies
+      --sourcedir "${GLIB_COMPILE_RESOURCES_SOURCE_DIR}"
+      "${SPEC_FILE}"
+    OUTPUT_VARIABLE deps
+    WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+  if(GLIB_COMPILE_RESOURCES_HEADER)
+    get_filename_component(GLIB_COMPILE_RESOURCES_HEADER "${GLIB_COMPILE_RESOURCES_HEADER}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_BINARY_DIR}")
+
+    add_custom_command(
+      OUTPUT "${GLIB_COMPILE_RESOURCES_HEADER}"
+      COMMAND glib-compile-resources
+        --sourcedir "${GLIB_COMPILE_RESOURCES_SOURCE_DIR}"
+        --generate-header
+        --target "${GLIB_COMPILE_RESOURCES_HEADER}"
+        ${FLAGS}
+        "${SPEC_FILE}"
+      DEPENDS "${SPEC_FILE}" ${deps}
+      WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
+  endif()
+
+  if(GLIB_COMPILE_RESOURCES_SOURCE)
+    get_filename_component(GLIB_COMPILE_RESOURCES_SOURCE "${GLIB_COMPILE_RESOURCES_SOURCE}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_BINARY_DIR}")
+
+    add_custom_command(
+      OUTPUT "${GLIB_COMPILE_RESOURCES_SOURCE}"
+      COMMAND glib-compile-resources
+        --sourcedir "${GLIB_COMPILE_RESOURCES_SOURCE_DIR}"
+        --generate-source
+        --target "${GLIB_COMPILE_RESOURCES_SOURCE}"
+        ${FLAGS}
+        "${SPEC_FILE}"
+      DEPENDS "${SPEC_FILE}" ${deps}
+      WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
+  endif()
+endfunction()
+
+find_program(GDBUS_CODEGEN gdbus-codegen)
+if(GDBUS_CODEGEN)
+  add_executable(gdbus-codegen IMPORTED)
+  set_property(TARGET gdbus-codegen PROPERTY IMPORTED_LOCATION "${GDBUS_CODEGEN}")
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(GLib
+    REQUIRED_VARS
+      GLIB_INCLUDE_DIRS
+      GOBJECT_INCLUDE_DIRS
+      GIO_INCLUDE_DIRS
+      GLIB_MKENUMS
+      GLIB_GENMARSHAL
+      GLIB_COMPILE_SCHEMAS
+      GLIB_COMPILE_RESOURCES
+      GDBUS_CODEGEN
+    VERSION_VAR
+      GLIB_VERSION)
\ No newline at end of file
diff --git a/cmake/FindGObjectIntrospection.cmake b/cmake/FindGObjectIntrospection.cmake
new file mode 100644 (file)
index 0000000..9d190f6
--- /dev/null
@@ -0,0 +1,62 @@
+# FindGObjectIntrospection.cmake
+# Â© 2016 Evan Nemerson <evan@nemerson.com>
+
+find_program(GI_COMPILER_EXECUTABLE g-ir-compiler)
+find_program(GI_SCANNER_EXECUTABLE g-ir-scanner)
+
+if(CMAKE_INSTALL_FULL_DATADIR)
+  set(GI_REPOSITORY_DIR "${CMAKE_INSTALL_FULL_DATADIR}/gir-1.0")
+else()
+  set(GI_REPOSITORY_DIR "${CMAKE_INSTALL_PREFIX}/share/gir-1.0")
+endif()
+
+if(CMAKE_INSTALL_FULL_LIBDIR)
+  set(GI_TYPELIB_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/girepository-1.0")
+else()
+  set(GI_TYPELIB_DIR "${CMAKE_INSTALL_LIBDIR}/girepository-1.0")
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(GObjectIntrospection
+  REQUIRED_VARS
+    GI_COMPILER_EXECUTABLE
+    GI_SCANNER_EXECUTABLE)
+
+function(gobject_introspection_compile TYPELIB)
+  set (options DEBUG VERBOSE)
+  set (oneValueArgs MODULE SHARED_LIBRARY)
+  set (multiValueArgs FLAGS INCLUDE_DIRS)
+  cmake_parse_arguments(GI_COMPILER "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+  unset (options)
+  unset (oneValueArgs)
+  unset (multiValueArgs)
+
+  get_filename_component(TYPELIB "${TYPELIB}" ABSOLUTE
+    BASE_DIR "${CMAKE_CURRENT_BINARY_DIR}")
+
+  if(GI_COMPILER_DEBUG)
+    list(APPEND GI_COMPILER_FLAGS "--debug")
+  endif()
+
+  if(GI_COMPILER_VERBOSE)
+    list(APPEND GI_COMPILER_FLAGS "--verbose")
+  endif()
+
+  if(GI_SHARED_LIBRARY)
+    list(APPEND GI_COMPILER_FLAGS "--shared-library" "${GI_SHARED_LIBRARY}")
+  endif()
+
+  foreach(include_dir ${GI_COMPILER_INCLUDE_DIRS})
+    list(APPEND GI_COMPILER_FLAGS "--includedir" "${include_dir}")
+  endforeach()
+
+  add_custom_command(
+    OUTPUT "${TYPELIB}"
+    COMMAND "${GI_COMPILER_EXECUTABLE}"
+    ARGS
+      "-o" "${TYPELIB}"
+      ${GI_COMPILER_FLAGS}
+      ${GI_COMPILER_UNPARSED_ARGUMENTS}
+    DEPENDS
+      ${GI_COMPILER_UNPARSED_ARGUMENTS})
+endfunction()
\ No newline at end of file
diff --git a/cmake/FindVala.cmake b/cmake/FindVala.cmake
new file mode 100644 (file)
index 0000000..aaec9c5
--- /dev/null
@@ -0,0 +1,409 @@
+# FindVala.cmake
+# <https://github.com/nemequ/gnome-cmake>
+#
+# This file contains functions which can be used to integrate Vala
+# compilation with CMake.  It is intended as a replacement for Jakob
+# Westhoff's FindVala.cmake and UseVala.cmake.  It uses fast-vapis for
+# faster parallel compilation, and per-target directories for
+# generated sources to allow reusing source files across, even with
+# different options.
+#
+# License:
+#
+#   Copyright (c) 2016 Evan Nemerson <evan@nemerson.com>
+#
+#   Permission is hereby granted, free of charge, to any person
+#   obtaining a copy of this software and associated documentation
+#   files (the "Software"), to deal in the Software without
+#   restriction, including without limitation the rights to use, copy,
+#   modify, merge, publish, distribute, sublicense, and/or sell copies
+#   of the Software, and to permit persons to whom the Software is
+#   furnished to do so, subject to the following conditions:
+#
+#   The above copyright notice and this permission notice shall be
+#   included in all copies or substantial portions of the Software.
+#
+#   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+#   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+#   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+#   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+#   HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+#   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+#   DEALINGS IN THE SOFTWARE.
+
+set(VALAC_NAMES valac)
+
+set(_FIND_VALA_CURRENT_VERSION 98)
+while(_FIND_VALA_CURRENT_VERSION GREATER 0)
+  list(APPEND VALAC_NAME "valac-1.${_FIND_VALA_CURRENT_VERSION}")
+  math(EXPR _FIND_VALA_CURRENT_VERSION "${_FIND_VALA_CURRENT_VERSION} - 2")
+endwhile()
+set(_FIND_VALA_CURRENT_VERSION 98)
+while(_FIND_VALA_CURRENT_VERSION GREATER 0)
+  list(APPEND VALAC_NAME "valac-1.${_FIND_VALA_CURRENT_VERSION}")
+  math(EXPR _FIND_VALA_CURRENT_VERSION "${_FIND_VALA_CURRENT_VERSION} - 2")
+endwhile()
+unset(_FIND_VALA_CURRENT_VERSION)
+
+find_program(VALA_EXECUTABLE
+  NAMES ${VALAC_NAMES})
+mark_as_advanced(VALA_EXECUTABLE)
+
+unset(VALAC_NAMES)
+
+if(VALA_EXECUTABLE)
+  # Determine valac version
+  execute_process(COMMAND ${VALA_EXECUTABLE} "--version"
+    OUTPUT_VARIABLE VALA_VERSION)
+  string(REGEX REPLACE "^.*Vala ([0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+(\\-[0-9a-f]+)?)?).*$" "\\1" VALA_VERSION "${VALA_VERSION}")
+
+  add_executable(valac IMPORTED)
+  set_property(TARGET valac PROPERTY IMPORTED_LOCATION "${VALA_EXECUTABLE}")
+endif(VALA_EXECUTABLE)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Vala
+    REQUIRED_VARS VALA_EXECUTABLE
+    VERSION_VAR VALA_VERSION)
+
+function(_vala_mkdir_for_file file)
+  get_filename_component(dir "${file}" DIRECTORY)
+  file(MAKE_DIRECTORY "${dir}")
+endfunction()
+
+macro(_vala_parse_source_file_path source)
+  set (options)
+  set (oneValueArgs SOURCE TYPE OUTPUT_PATH OUTPUT_DIR GENERATED_SOURCE FAST_VAPI)
+  set (multiValueArgs)
+  cmake_parse_arguments(VALAPATH "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+  unset (options)
+  unset (oneValueArgs)
+  unset (multiValueArgs)
+
+  if(VALAPATH_SOURCE)
+    get_filename_component("${VALAPATH_SOURCE}" "${source}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
+  endif()
+
+  if(VALAPATH_TYPE)
+    string(REGEX MATCH "[^\\.]+$" "${VALAPATH_TYPE}" "${source}")
+    string(TOLOWER "${${VALAPATH_TYPE}}" "${VALAPATH_TYPE}")
+  endif()
+
+  if(VALAPATH_OUTPUT_PATH OR VALAPATH_GENERATED_SOURCE OR VALAPATH_OUTPUT_DIR OR VALAPATH_FAST_VAPI)
+    get_filename_component(srcfile "${source}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
+
+    string(LENGTH "${CMAKE_BINARY_DIR}" dirlen)
+    string(SUBSTRING "${srcfile}" 0 ${dirlen} tmp)
+    if("${CMAKE_BINARY_DIR}" STREQUAL "${tmp}")
+      string(SUBSTRING "${srcfile}" ${dirlen} -1 tmp)
+      set(outpath "build${tmp}")
+    else()
+      string(LENGTH "${CMAKE_SOURCE_DIR}" dirlen)
+      string(SUBSTRING "${srcfile}" 0 ${dirlen} tmp)
+      if("${CMAKE_SOURCE_DIR}" STREQUAL "${tmp}")
+        string(SUBSTRING "${srcfile}" ${dirlen} -1 tmp)
+        set(outpath "source${tmp}")
+      else ()
+        # TODO: this probably doesn't work correctly on Windows…
+        set(outpath "root${tmp}")
+      endif()
+    endif()
+
+    unset(tmp)
+    unset(dirlen)
+    unset(srcfile)
+  endif()
+
+  if(VALAPATH_OUTPUT_PATH)
+    set("${VALAPATH_OUTPUT_PATH}" "${outpath}")
+  endif()
+
+  if(VALAPATH_GENERATED_SOURCE)
+    string(REGEX REPLACE "\\.(vala|gs)$" ".c" "${VALAPATH_GENERATED_SOURCE}" "${outpath}")
+  endif()
+
+  if(VALAPATH_FAST_VAPI)
+    string(REGEX REPLACE "\\.(vala|gs)$" ".vapi" "${VALAPATH_FAST_VAPI}" "${outpath}")
+  endif()
+
+  if(VALAPATH_OUTPUT_DIR)
+    get_filename_component("${VALAPATH_OUTPUT_DIR}" "${outpath}" DIRECTORY)
+  endif()
+
+  unset(outpath)
+endmacro()
+
+# vala_precompile_target(
+#   TARGET
+#   GENERATED_SOURCES
+#   SOURCES…
+#   [VAPI vapi-name.vapi]
+#   [GIR name-version.gir]
+#   [HEADER name.h]
+#   [FLAGS â€¦]
+#   [PACKAGES â€¦]
+#   [DEPENDS â€¦])
+#
+# This function will use valac to generate C code.
+#
+# This function uses fast VAPIs to help improve parallelization and
+# incremental build times.  The problem with this is that CMake
+# doesn't allow file-level dependencies across directories; if you're
+# generating code in one directory (for example, a library) and would
+# like to use it in another directory and are building in parallel,
+# the build can fail.  To prevent this, this function will create a
+# ${TARGET}-vala top-level target (which *is* usable from other
+# directories).
+#
+# Options:
+#
+#   TARGET
+#     Target to create; it's generally best to make this similar to
+#     your executable or library target name (e.g., for a "foo"
+#     executable, "foo-vala" might be a good name), but not
+#     technically required.
+#   GENERATED_SOURCES
+#     Variable in which to store the list of generated sources (which
+#     you should pass to add_executable or add_library).
+#   SOURCES
+#     Vala sources to generate C from.  You should include *.vala,
+#     *.gs, and uninstalled *.vapi files here; you may also include
+#     C/C++ sources (they will simply be passed directly through to
+#     the GENERATED_SOURCES variable).
+#   VAPI name.vapi
+#     If you would like to have valac generate a VAPI (basically, if
+#     you are generating a library not an executable), pass the file
+#     name here.
+#   GIR name-version.gir
+#     If you would like to have valac generate a GIR, pass the file
+#     name here.
+#   HEADER name.h
+#     If you would like to have valac generate a C header, pass the
+#     file name here.
+#   FLAGS â€¦
+#     List of flags you wish to pass to valac.  They will be added to
+#     the flags in VALA_COMPILER_FLAGS and VALA_COMPILER_FLAGS_DEBUG
+#     (for Debug builds) or VALA_COMPILER_FLAGS_RELEASE (for Release
+#     builds).
+#   PACKAGES
+#     List of dependencies to pass to valac.
+#   DEPENDS
+#     Any additional dependencies you would like.
+macro(vala_precompile_target TARGET GENERATED_SOURCES)
+  set (options)
+  set (oneValueArgs VAPI GIR HEADER)
+  set (multiValueArgs FLAGS PACKAGES DEPENDS)
+  cmake_parse_arguments(VALAC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+  unset (options)
+  unset (oneValueArgs)
+  unset (multiValueArgs)
+
+  set(VALA_SOURCES)
+  set(VALA_VAPIS)
+  set(VALA_OUTPUT_SOURCES)
+
+  if(VALAC_VAPI)
+    list(APPEND non_source_out_files "${VALAC_VAPI}")
+    list(APPEND non_source_valac_args "--vapi" "${VALAC_VAPI}")
+  endif()
+
+  if(VALAC_GIR)
+    list(APPEND non_source_out_files "${VALAC_GIR}")
+    list(APPEND non_source_valac_args
+      "--gir" "${VALAC_GIR}"
+      "--library" "${TARGET}"
+      "--shared-library" "${CMAKE_SHARED_LIBRARY_PREFIX}${TARGET}${CMAKE_SHARED_LIBRARY_SUFFIX}")
+  endif()
+
+  if(VALAC_HEADER)
+    list(APPEND non_source_out_files "${VALAC_HEADER}")
+    list(APPEND non_source_valac_args --header "${VALAC_HEADER}")
+  endif()
+
+  # Split up the input files into three lists; one containing vala and
+  # genie sources, one containing VAPIs, and one containing C files
+  # (which may seem a bit silly, but it does open up the possibility
+  # of declaring your source file list once instead of having separate
+  # lists for Vala and C).
+  foreach(source ${VALAC_UNPARSED_ARGUMENTS})
+    _vala_parse_source_file_path("${source}"
+      SOURCE source_full
+      TYPE type)
+
+    if("vala" STREQUAL "${type}" OR "gs" STREQUAL "${type}")
+      list(APPEND VALA_SOURCES "${source_full}")
+    elseif("vapi" STREQUAL "${type}")
+      list(APPEND VALA_VAPIS "${source_full}")
+    elseif(
+        "c"   STREQUAL "${type}" OR
+        "h"   STREQUAL "${type}" OR
+        "cpp" STREQUAL "${type}" OR
+        "cxx" STREQUAL "${type}" OR
+        "hpp" STREQUAL "${type}")
+      list(APPEND VALA_OUTPUT_SOURCES "${source_full}")
+    endif()
+
+    unset(type)
+    unset(source_full)
+  endforeach()
+
+  # Set the common flags to pass to every valac invocation.
+  set(VALAFLAGS ${VALAC_FLAGS} ${VALA_VAPIS})
+  foreach(pkg ${VALAC_PACKAGES})
+    list(APPEND VALAFLAGS "--pkg" "${pkg}")
+  endforeach()
+  list(APPEND VALAFLAGS ${VALA_COMPILER_FLAGS})
+  if (CMAKE_BUILD_TYPE MATCHES "Debug")
+    list(APPEND VALAFLAGS ${VALA_COMPILER_FLAGS_DEBUG})
+  elseif(CMAKE_BUILD_TYPE MATCHES "Release")
+    list(APPEND VALAFLAGS ${VALA_COMPILER_FLAGS_RELEASE})
+  endif()
+
+  # Where to put the output
+  set(TARGET_DIR "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}")
+
+  set(FAST_VAPI_STAMPS)
+
+  # Create fast VAPI targets for each vala source
+  foreach(source ${VALA_SOURCES})
+    _vala_parse_source_file_path("${source}"
+      FAST_VAPI fast_vapi_path)
+
+    # We need somewhere to put the output…
+    _vala_mkdir_for_file("${TARGET_DIR}/${fast_vapi_path}")
+
+    # Create the target
+    add_custom_command(
+      OUTPUT "${TARGET_DIR}/${fast_vapi_path}.stamp"
+      BYPRODUCTS "${TARGET_DIR}/${fast_vapi_path}"
+      DEPENDS
+        "${source}"
+        ${VALA_VAPIS}
+        ${VALAC_DEPENDS}
+      COMMAND "${VALA_EXECUTABLE}"
+      ARGS
+        "${source}"
+        --fast-vapi "${TARGET_DIR}/${fast_vapi_path}"
+        ${VALAFLAGS}
+      COMMAND "${CMAKE_COMMAND}" ARGS -E touch "${TARGET_DIR}/${fast_vapi_path}.stamp"
+      COMMENT "Generating fast VAPI ${TARGET_DIR}/${fast_vapi_path}")
+
+    list(APPEND FAST_VAPI_STAMPS "${TARGET_DIR}/${fast_vapi_path}.stamp")
+
+    unset(fast_vapi_path)
+  endforeach()
+
+  # Create a ${TARGET_DIR}-fast-vapis target which depens on all the fast
+  # vapi stamps.  We can use this as a dependency to make sure all
+  # fast-vapis are up to date.
+  add_custom_command(
+    OUTPUT "${TARGET_DIR}/fast-vapis.stamp"
+    COMMAND "${CMAKE_COMMAND}" ARGS -E touch "${TARGET_DIR}/fast-vapis.stamp"
+    DEPENDS
+      ${FAST_VAPI_STAMPS}
+      ${VALAC_DEPENDS}
+    COMMENT "Generating fast VAPIs for ${TARGET}")
+
+  add_custom_target("${TARGET}-fast-vapis"
+    DEPENDS "${TARGET_DIR}/fast-vapis.stamp")
+
+  set(VALA_GENERATED_SOURCE_STAMPS)
+
+  # Add targets to generate C sources
+  foreach(source ${VALA_SOURCES})
+    _vala_parse_source_file_path("${source}"
+      OUTPUT_PATH output_path
+      OUTPUT_DIR output_dir
+      GENERATED_SOURCE generated_source)
+
+    set(use_fast_vapi_flags)
+    foreach(src ${VALA_SOURCES})
+      if(NOT "${src}" STREQUAL "${source}")
+        _vala_parse_source_file_path("${src}"
+          FAST_VAPI src_fast_vapi_path)
+
+        list(APPEND use_fast_vapi_flags --use-fast-vapi "${TARGET_DIR}/${src_fast_vapi_path}")
+
+        unset(src_fast_vapi_path)
+      endif()
+    endforeach()
+
+    add_custom_command(
+      OUTPUT "${TARGET_DIR}/${generated_source}.stamp"
+      BYPRODUCTS "${TARGET_DIR}/${generated_source}"
+      COMMAND "${VALA_EXECUTABLE}"
+      ARGS
+        -d "${TARGET_DIR}/${output_dir}"
+        -C
+        "${source}"
+        ${VALAFLAGS}
+        ${use_fast_vapi_flags}
+      COMMAND "${CMAKE_COMMAND}" ARGS -E touch "${TARGET_DIR}/${generated_source}.stamp"
+      DEPENDS
+        "${TARGET}-fast-vapis"
+        "${source}"
+        ${VALA_VAPIS}
+      COMMENT "Generating ${TARGET_DIR}/${generated_source}")
+    unset(use_fast_vapi_flags)
+
+    list(APPEND VALA_OUTPUT_SOURCES "${TARGET_DIR}/${generated_source}")
+    list(APPEND VALA_GENERATED_SOURCE_STAMPS "${TARGET_DIR}/${generated_source}.stamp")
+
+    unset(fast_vapi_path)
+    unset(output_dir)
+    unset(generated_source)
+  endforeach()
+
+  add_custom_command(
+    OUTPUT "${TARGET_DIR}/stamp"
+    COMMAND "${CMAKE_COMMAND}" ARGS -E touch "${TARGET_DIR}/stamp"
+    DEPENDS ${VALA_GENERATED_SOURCE_STAMPS}
+    COMMENT "Generating sources from Vala for ${TARGET}")
+
+  set("${GENERATED_SOURCES}" ${VALA_OUTPUT_SOURCES})
+
+  if(non_source_out_files)
+    set(use_fast_vapi_flags)
+    foreach(source ${VALA_SOURCES})
+      _vala_parse_source_file_path("${source}"
+        FAST_VAPI fast_vapi_path)
+
+      list(APPEND use_fast_vapi_flags --use-fast-vapi "${TARGET_DIR}/${fast_vapi_path}")
+
+      unset(fast_vapi_path)
+    endforeach()
+
+    add_custom_command(OUTPUT ${non_source_out_files}
+      COMMAND ${VALA_EXECUTABLE}
+      ARGS
+        -C
+        ${non_source_valac_args}
+        ${VALAFLAGS}
+        ${use_fast_vapi_flags}
+      DEPENDS
+        "${TARGET}-fast-vapis"
+        ${VALA_VAPIS})
+    unset(use_fast_vapi_flags)
+  endif()
+
+  # CMake doesn't allow file-level dependencies across directories, so
+  # we provide a target we can depend on from other directories.
+  add_custom_target("${TARGET}"
+    DEPENDS
+      "${TARGET_DIR}/stamp"
+      ${non_source_out_files}
+      ${VALAC_DEPENDS}
+      ${VALA_GENERATED_SOURCE_STAMPS})
+
+  unset(non_source_out_files)
+  unset(non_source_valac_args)
+
+  unset(VALA_GENERATED_SOURCE_STAMPS)
+  unset(FAST_VAPI_STAMPS)
+  unset(TARGET_DIR)
+  unset(VALAFLAGS)
+  unset(VALA_SOURCES)
+  unset(VALA_VAPIS)
+  unset(VALA_OUTPUT_SOURCES)
+endmacro()
\ No newline at end of file
diff --git a/cmake/FindValadoc.cmake b/cmake/FindValadoc.cmake
new file mode 100644 (file)
index 0000000..983b70b
--- /dev/null
@@ -0,0 +1,96 @@
+# CMake Valadoc support
+# Copyright (c) 2016 Evan Nemerson <evan@nemerson.com>
+#
+# Permission is hereby granted, free of charge, to any person
+# obtaining a copy of this software and associated documentation files
+# (the "Software"), to deal in the Software without restriction,
+# including without limitation the rights to use, copy, modify, merge,
+# publish, distribute, sublicense, and/or sell copies of the Software,
+# and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+find_program(VALADOC_EXECUTABLE
+  NAMES valadoc
+  DOC "Valadoc")
+
+if(VALADOC_EXECUTABLE)
+  execute_process(COMMAND ${VALADOC_EXECUTABLE} "--version" OUTPUT_VARIABLE VALADOC_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
+  string(SUBSTRING "${VALADOC_VERSION}" 8 -1 VALADOC_VERSION)
+endif()
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Valadoc
+  FOUND_VAR VALADOC_FOUND
+  REQUIRED_VARS VALADOC_EXECUTABLE
+  VERSION_VAR VALADOC_VERSION)
+
+# valadoc_generate(OUTPUT_DIR
+#   PACKAGE_NAME name
+#   [PACKAGE_VERSION version]
+#   [FLAGS flags…]
+#   [PACKAGES packages…]
+#   [DOCLET doclet]
+#   [ALL])
+#
+#   PACKAGE_NAME name
+#     VAPI name to generate documentation for.
+#   PACKAGE_VERSION version
+#     Version number of the package.
+#   FLAGS â€¦
+#     List of flags you wish to pass to valadoc.
+#   PACKAGES
+#     List of dependencies to pass to valac.
+#   DOCLET doclet-name
+#     Name of the doclet to use (default: html)
+function(valadoc_generate OUTPUT_DIR)
+  set (options)
+  set (oneValueArgs DOCLET PACKAGE_NAME PACKAGE_VERSION)
+  set (multiValueArgs SOURCES PACKAGES FLAGS DEFINITIONS CUSTOM_VAPIS)
+  cmake_parse_arguments(VALADOC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+  unset (options)
+  unset (oneValueArgs)
+  unset (multiValueArgs)
+
+  if("${VALADOC_DOCLET}" STREQUAL "")
+    list(APPEND VALADOC_FLAGS "--doclet=html")
+  else()
+    list(APPEND VALADOC_FLAGS "--doclet=${VALADOC_DOCLET}")
+  endif()
+
+  if(NOT "${VALADOC_PACKAGE_NAME}" STREQUAL "")
+    list(APPEND VALADOC_FLAGS "--package-name=${VALADOC_PACKAGE_NAME}")
+  endif()
+
+  if(NOT "${VALADOC_PACKAGE_VERSION}" STREQUAL "")
+    list(APPEND VALADOC_FLAGS "--package-version=${VALADOC_PACKAGE_VERSION}")
+  endif()
+
+  foreach(pkg ${VALADOC_PACKAGES})
+    list(APPEND VALADOC_FLAGS "--pkg=${pkg}")
+  endforeach(pkg)
+
+  add_custom_command(
+    OUTPUT "${OUTPUT_DIR}"
+    COMMAND "${VALADOC_EXECUTABLE}"
+    ARGS
+      --force
+      -o "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_DIR}"
+      ${VALADOC_FLAGS}
+      ${VALADOC_SOURCES}
+    DEPENDS
+      ${VALADOC_SOURCES}
+    COMMENT "Generating documentation with Valadoc"
+    WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
+endfunction()
\ No newline at end of file
diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..b1da0e1
--- /dev/null
+++ b/configure
@@ -0,0 +1,315 @@
+#!/bin/sh
+
+# Autotools-style (./configure) wrapper for CMake
+# <https://github.com/nemequ/configure-cmake>
+#
+#   *** IMPORTANT ***
+#
+#   You must include the GNUInstallDirs module (which comes with
+#   CMake) in your project.  Just put "include (GNUInstallDirs)" in
+#   you CMakeLists.txt and you should be good.
+#
+# This script was originally written for Squash
+# <https://quixdb.github.io/squash/> by Evan Nemerson
+# <evan@nemerson.com>, but has been spun off into a separate
+# repository.  Please feel free to copy it into your own repository,
+# though I would appreciate it if you would post improvements, bugs,
+# feature requests, etc. to the issue tracker at
+# <https://github.com/nemequ/configure-cmake/issues>.
+#
+# To the extent possible under law, the author(s) hereby waive all
+# copyright and related or neighboring rights to this work.  For
+# details, see <https://creativecommons.org/publicdomain/zero/1.0/>
+
+TOP_SRCDIR="$(dirname $0)"
+CMAKE_CMD="cmake ${TOP_SRCDIR}"
+
+BUILD_TYPE="Debug"
+PREFIX=/usr
+DATA_DIR=${PREFIX}/share
+LIBDIR=
+CMAKE_ARGS=
+
+if [ -e "${TOP_SRCDIR}/.configure-custom.sh" ]; then
+    . "${TOP_SRCDIR}/.configure-custom.sh"
+fi
+
+quote() {
+    echo "$1" | sed -e "s|'|'\\\\''|g; 1s/^/'/; \$s/\$/'/"
+}
+
+extract_var_string() {
+    VAR_NAME=$1
+    VAR_NAME=$(echo $1 | sed -e 's/[ \t]*$//')
+    if [ "x$2" != "x" ]; then
+        VAR_VALUE=$2
+    else
+        VAR_VALUE=yes
+    fi
+
+    if [ "x$3" != "x" ]; then
+        VAR_UC_NAME=$3
+    else
+        VAR_UC_NAME=$(echo "$1" | tr '[:lower:]' '[:upper:]' | tr -c '[:alnum:]' '_' | sed 's/_$//g')
+    fi
+}
+
+set_config_var() {
+    is_with=n
+    case "$1" in
+        "--enable-"*)
+            name="${1#--enable-}"
+            cfg="${ENABLE_VARS}"
+            ;;
+        "--disable-"*)
+            name="${1#--disable-}";
+            cfg="${DISABLE_VARS}";
+            ;;
+        "--with-"*)
+            # IFS="=" read -ra WITHARGS <<< "${1}"
+            name="${1#--with-}"
+            cfg="${WITH_VARS}"
+            is_with=y
+            ;;
+    esac
+
+    found=n
+    for varstring in $cfg; do
+        extract_var_string $(echo "${varstring}" | tr '|' ' ')
+        if [ "x$VAR_NAME" = "x$name" ]; then
+            found=y
+            break;
+        fi
+    done
+
+    if [ "$found" = "y" ]; then
+        if [ "x$is_with" = "xy" ]; then
+            CMAKE_ARGS="$CMAKE_ARGS -D${VAR_UC_NAME}=$(quote "$2")"
+        else
+            CMAKE_ARGS="$CMAKE_ARGS -D${VAR_UC_NAME}=$(quote "${VAR_VALUE}")"
+        fi
+    else
+        echo "Unknown parameter: ${1}"
+        exit 1
+    fi
+}
+
+prefix_to_offset() {
+    expr $(echo "${1}" | awk '{ print length }') + 1
+}
+
+print_help() {
+    cat <<EOF >&2
+  -h, --help              display this help and exit
+  --disable-debug         disable debugging mode
+  --pass-thru             pass remaining arguments through to CMake
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$PREFIX]
+  --bindir=DIR            user executables [PREFIX/bin]
+  --sbindir=DIR           system admin executables [PREFIX/sbin]
+  --libexecdir=DIR        program executables [PREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [PREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/PROJECT_NAME]
+EOF
+
+    first=y
+    for varstring in ${ENABLE_VARS}; do
+        if [ $first = 'y' ]; then
+            echo ""
+            first=n
+        fi
+        extract_var_string $(echo "${varstring}" | tr '|' ' ')
+        var_doc_name="ENABLE_${VAR_UC_NAME}_DOC"
+        eval "docstring=\$$var_doc_name"
+        if [ "x${docstring}" = "x" ]; then
+            printf "  --enable-%-14s enable %s support\n" "${VAR_NAME}" "$(echo -n "${VAR_NAME}" | tr '-' ' ')"
+        else
+            printf "  --enable-%-14s %s\n" "${VAR_NAME}" "$docstring"
+        fi
+    done
+
+    first=y
+    for varstring in ${DISABLE_VARS}; do
+        if [ $first = 'y' ]; then
+            echo ""
+            first=n
+        fi
+        extract_var_string $(echo "${varstring}" | tr '|' ' ')
+        var_doc_name="DISABLE_${VAR_UC_NAME}_DOC"
+        eval "docstring=\$$var_doc_name"
+        if [ "x${docstring}" = "x" ]; then
+            printf "  --disable-%-13s disable %s support\n" "${VAR_NAME}" "$(echo -n "${VAR_NAME}" | tr '-' ' ')"
+        else
+            printf "  --disable-%-13s %s\n" "${VAR_NAME}" "$docstring"
+        fi
+    done
+
+    first=y
+    for varstring in ${WITH_VARS}; do
+        if [ $first = 'y' ]; then
+            echo ""
+            first=n
+        fi
+        extract_var_string $(echo "${varstring}" | tr '|' ' ')
+        var_doc_name="WITH_${VAR_UC_NAME}_DOC"
+        eval "docstring=\$$var_doc_name"
+        paraminfo="${VAR_NAME}=${VAR_VALUE}"
+        if [ "x${docstring}" = "x" ]; then
+            printf "  --with-%-16s enable %s support\n" "$paraminfo" "$(echo -n "${VAR_NAME}" | tr '-' ' ')"
+        else
+            printf "  --with-%-16s %s\n" "$paraminfo" "$docstring"
+        fi
+    done
+
+    exit 0
+}
+
+while [ $# != 0 ]; do
+    case "$1" in
+        "--prefix="*)
+            PREFIX="${1#*=}";;
+        "--prefix")
+            PREFIX="${2}"; shift;;
+        "--bindir="*)
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_BINDIR=$(quote "${1#*=}")";;
+        "--bindir")
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_BINDIR=$(quote "$2")"; shift;;
+        "--sbindir="*)
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_SBINDIR=$(quote "${1#*=}")";;
+        "--sbindir")
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_SBINDIR=$(quote "$2")"; shift;;
+        "--libexecdir="*)
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_LIBEXECDIR=$(quote "${1#*=}")";;
+        "--libexecdir")
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_LIBEXECDIR=$(quote "$2")"; shift;;
+        "--sysconfdir="*)
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_SYSCONFDIR=$(quote "${1#*=}")";;
+        "--sysconfdir")
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_SYSCONFDIR=$(quote "$2")"; shift;;
+        "--sharedstatedir="*)
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_SHAREDSTATEDIR=$(quote "${1#*=}")";;
+        "--sharedstatedir")
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_SHAREDSTATEDIR=$(quote "$2")"; shift;;
+        "--localstatedir="*)
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_LOCALSTATEDIR=$(quote "${1#*=}")";;
+        "--localstatedir")
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_LOCALSTATEDIR=$(quote "$2")"; shift;;
+        "--libdir="*)
+            LIBDIR="${1#*=}";;
+        "--libdir")
+            LIBDIR="${2}"; shift;;
+        "--includedir="*)
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_INCLUDEDIR=$(quote "${1#*=}")";;
+        "--includedir")
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_INCLUDEDIR=$(quote "$2")"; shift;;
+        "--oldincludedir="*)
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_OLDINCLUDEDIR=$(quote "${1#*=}")";;
+        "--oldincludedir")
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_OLDINCLUDEDIR=$(quote "$2")"; shift;;
+        "--datarootdir="*)
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_DATAROOTDIR=$(quote "${1#*=}")";;
+        "--datarootdir")
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_DATAROOTDIR=$(quote "$2")"; shift;;
+        "--datadir="*)
+            DATA_DIR="$(quote "${1#*=}")"; shift;;
+        "--datadir")
+            DATA_DIR="$(quote "$2")"; shift;;
+        "--infodir="*)
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_INFODIR=$(quote "${1#*=}")";;
+        "--infodir")
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_INFODIR=$(quote "$2")"; shift;;
+        "--localedir="*)
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_LOCALEDIR=$(quote "${1#*=}")";;
+        "--localedir")
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_LOCALEDIR=$(quote "$2")"; shift;;
+        "--mandir="*)
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_MANDIR=$(quote "${1#*=}")";;
+        "--mandir")
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_MANDIR=$(quote "$2")"; shift;;
+        "--docdir="*)
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_DOCDIR=$(quote "${1#*=}")";;
+        "--docdir")
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_DOCDIR=$(quote "$2")"; shift;;
+
+        "CC="*)
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_C_COMPILER=$(quote "${1#*=}")";;
+        "CXX="*)
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_CXX_COMPILER=$(quote "${1#*=}")";;
+        "CFLAGS="*)
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_C_FLAGS=$(quote "${1#*=}")";;
+        "CXXFLAGS="*)
+            CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_CXX_FLAGS=$(quote "${1#*=}")";;
+        "LDFLAGS="*)
+            LDFLAGS="$LDFLAGS ${1#*=}";;
+
+        "--help")
+            print_help;;
+        "-h")
+            print_help;;
+
+        # This flag is the only one which may be a bit surprising to
+        # people.  Autotools always builds with debugging symbols enabled
+        # (AFAIK), but for cmake you have to do -DCMAKE_BUILD_TYPE=Debug.
+        # Unfortunately this can change other things as well, so although
+        # I realize there is no --disable-debug flag I thought it would be
+        # prudent to support one here.
+        "--disable-debug")
+            BUILD_TYPE="Release";;
+
+        "--pass-thru")
+            shift;
+            while [ $# != 0 ]; do
+                CMAKE_ARGS="$CMAKE_ARGS $(quote "${1}")";
+                shift;
+            done;;
+
+        "--enable-"*)
+            set_config_var "$1"
+            ;;
+
+        "--disable-"*)
+            set_config_var "$1"
+            ;;
+
+        "--with-"*)
+            name=$(echo "${1#--with-}" | awk '{split($1,v,"="); print v[1]}')
+            case "${1}" in
+                "--with-${name}="*)
+                    set_config_var "--with-${name}" "${1#--with-${name}=}";;
+                "--with-${name}")
+                    set_config_var "$1" "$2";
+                    shift;;
+            esac
+            ;;
+
+        *)
+            echo "$0: error: unrecognized option: \`$1'" >&2
+            echo "Try \`$0 --help' for more information" >&2
+            exit -1
+    esac;
+    shift
+done
+
+if [ "x${LIBDIR}" = "x" ]; then
+    LIBDIR="${PREFIX}/lib"
+fi
+
+# Unlike CFLAGS/CXXFLAGS/CC/CXX, LDFLAGS isn't handled by CMake, so we
+# need to parse it here.
+if [ "x${LDFLAGS}" != "x" ]; then
+    for varname in EXE MODULE SHARED STATIC; do
+        CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_${varname}_LINKER_FLAGS=$(quote "$LDFLAGS")"
+    done
+fi
+
+eval "cmake -Bbuild -H${TOP_SRCDIR} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_INSTALL_DATADIR=${DATA_DIR} -DCMAKE_INSTALL_LIBDIR=${LIBDIR} ${CMAKE_ARGS}"
diff --git a/configure.ac b/configure.ac
deleted file mode 100644 (file)
index e39a95f..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-
-dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ([2.68])
-
-AC_INIT([roojspacker], [5.0.0])
-
-AC_CONFIG_HEADERS([config.h])
-m4_ifdef([AC_CONFIG_MACRO_DIRS], [ 
-       AC_CONFIG_MACRO_DIRS([m4])
-])
-
-
-AM_INIT_AUTOMAKE([1.11 subdir-objects])
-AM_MAINTAINER_MODE([enable])
-
-
-
-AM_SILENT_RULES([yes])
-
-AC_PROG_CC
-
-AM_PROG_VALAC([0.16.0])
-
-LT_PREREQ([2.2.6])
-LT_INIT([disable-static])
-
-
-AC_CHECK_LIB([m],[cos])
-
-dnl GOBJECT_INTROSPECTION_CHECK([1.30.0])
-
-
-dnl we need to check these exist, then it will generate a compile string for them.
-
-PKG_CHECK_MODULES(ROOJSPACKER, [
-                glib-2.0 >= 2.24.0
-                gobject-2.0 >= 2.24.0
-                gee-0.8
-                gio-2.0  >= 2.24.0
-                gthread-2.0
-                
-])
-
-dnl -- some old servers do not have json-glib...
-
-PKG_CHECK_MODULES(JSON_GLIB, [json-glib-1.0],
-                               [json_glib_enabled=yes],
-                               [json_glib_enabled=no])
-
-if test $json_glib_enabled = yes; then
-               AC_DEFINE(HAVE_JSON_GLIB,1,[json-glib support])
-fi
-AM_CONDITIONAL(HAVE_JSON_GLIB, test "$json_glib_enabled" = "yes")
-
-
-AC_ARG_ENABLE([old_glib],
-[  --enable-old-glib    Enable old Glib support],
-[case "${enableval}" in
-  yes) old_glib=true ;;
-  no)  old_glib=false ;;
-  *) AC_MSG_ERROR([bad value ${enableval} for --enable-old-glib]) ;;
-esac],[old_glib=false])
-AM_CONDITIONAL([HAVE_OLD_GLIB], [test x$old_glib = xtrue])
-
-
-
-
-dnl  -- javascriptcoregtk-4.0  ** might add this later -- verify compilation.
-
-
-dnl PKG_CHECK_MODULES(JAVASCRIPTCOREGTK, [javascriptcoregtk-4.0],
-dnl                            [javascriptcoregtk_4_0_enabled=yes],
-dnl                            [javascriptcoregtk_4_0_enabled=no])
-dnl
-dnl if test $javascriptcoregtk_4_0_enabled = yes; then
-dnl            AC_DEFINE(HAVE_JAVASCRIPTCOREGTK4,1,[javascriptcoregtk 4.0 support])
-dnl else
-dnl            PKG_CHECK_MODULES(JAVASCRIPTCOREGTK, [javascriptcoregtk-3.0],
-dnl                            [javascriptcoregtk_3_0_enabled=yes] )
-dnl            AC_DEFINE(HAVE_JAVASCRIPTCOREGTK3,1,[javascriptcoregtk 3.0 support])
-dnl       
-dnl
-dnl fi
-dnl AM_CONDITIONAL(HAVE_JAVASCRIPTCOREGTK3, test "$javascriptcoregtk_3_0_enabled" = "yes")
-dnl AM_CONDITIONAL(HAVE_JAVASCRIPTCOREGTK4, test "$javascriptcoregtk_4_0_enabled" = "yes")
-
-AC_CONFIG_FILES([
-       Makefile
-       src/Makefile
-])
-
-AC_SUBST(JSON_GLIB_CFLAGS) 
-AC_SUBST(JSON_GLIB_LIBS) 
-AC_SUBST(ROOJSPACKER_CFLAGS)
-AC_SUBST(ROOJSPACKER_LIBS)
-
-
-AC_OUTPUT([roojspacker-1.2.pc])
diff --git a/roojspacker/.gitignore b/roojspacker/.gitignore
new file mode 100644 (file)
index 0000000..d1a2722
--- /dev/null
@@ -0,0 +1,28 @@
+# Automatically generated by CMake, do not modify.
+/.gitignore
+/libroojspacker-1.2.so*
+/libroojspacker-1.2.a
+/libroojspacker-1.2.so.1.2
+/libroojspacker-1.2.so.1.2.0
+/roojspacker-1.2.pc
+/config.vala
+/roojspacker-1.2-vala/source/roojspacker/Collapse.c
+/roojspacker-1.2-vala/source/roojspacker/CompressWhite.c
+/roojspacker-1.2-vala/source/roojspacker/Identifier.c
+/roojspacker-1.2-vala/source/roojspacker/Lang.c
+/roojspacker-1.2-vala/source/roojspacker/Packer.c
+/roojspacker-1.2-vala/source/roojspacker/ScopeParser.c
+/roojspacker-1.2-vala/source/roojspacker/Scope.c
+/roojspacker-1.2-vala/source/roojspacker/TextStream.c
+/roojspacker-1.2-vala/source/roojspacker/TokenReader.c
+/roojspacker-1.2-vala/source/roojspacker/TokenStream.c
+/roojspacker-1.2-vala/source/roojspacker/Token.c
+/roojspacker-1.2-vala/source/roojspacker/PackerRun.c
+/roojspacker-1.2-vala/source/roojspacker/Walker.c
+/roojspacker-1.2-vala/source/roojspacker/SymbolSet.c
+/roojspacker-1.2-vala/source/roojspacker/DocBuilder.c
+/roojspacker-1.2-vala/source/roojspacker/DocComment.c
+/roojspacker-1.2-vala/source/roojspacker/DocParser.c
+/roojspacker-1.2-vala/source/roojspacker/DocTag.c
+/roojspacker-1.2-vala/source/roojspacker/PrettyPrint.c
+/roojspacker-1.2-vala/source/roojspacker/Symbol.c
diff --git a/roojspacker/CMakeLists.txt b/roojspacker/CMakeLists.txt
new file mode 100644 (file)
index 0000000..d445140
--- /dev/null
@@ -0,0 +1,170 @@
+#
+#
+# Library Target: linked against executable and tests.
+
+# Generate a config.vala file, which can be used for version
+# information and feature detection.
+#configure_file(
+#    "${CMAKE_CURRENT_SOURCE_DIR}/config.vala.in"
+#    "${CMAKE_CURRENT_BINARY_DIR}/config.vala"
+#    @ONLY)
+
+# You can re-type these if you prefer; putting them in variables makes
+# it easier to reuse them, and helps explain what each command needs
+# to include.
+
+# The name of the C header, without the trailing ".h"
+set(ROOJSPACKER_HEADER ${PROJECT_NAME})
+
+# These are the Vala sources you want to build your library out of.
+set(ROOJSPACKER_VALA_SOURCES
+    Collapse.vala 
+    CompressWhite.vala 
+    Identifier.vala 
+    Lang.vala 
+    Packer.vala 
+    ScopeParser.vala 
+    Scope.vala 
+    TextStream.vala 
+    TokenReader.vala 
+    TokenStream.vala 
+    Token.vala 
+    PackerRun.vala 
+    Walker.vala 
+    SymbolSet.vala 
+    DocBuilder.vala 
+    DocComment.vala 
+    DocParser.vala 
+    DocTag.vala 
+    PrettyPrint.vala 
+    Symbol.vala
+)
+
+
+# Compile Vala -> C
+vala_precompile_target(
+    "${ROOJSPACKER_LIBRARY_NAME}-vala"
+    ROOJSPACKER_C_SOURCES
+    PACKAGES ${ROOJSPACKER_VALA_PACKAGES}
+    VAPI "${CMAKE_CURRENT_BINARY_DIR}/${ROOJSPACKER_PKG_NAME}.vapi"
+#    GIR "${ROOJSPACKER_GIR_NAME}.gir"
+    HEADER "${CMAKE_CURRENT_BINARY_DIR}/${ROOJSPACKER_PKG_NAME}.h"
+    ${ROOJSPACKER_VALA_SOURCES})
+
+# Compile the library.
+#
+# By default, we create and install a shared library.  If you don't
+# want to do that, you can change "SHARED" in the below function call
+# to "STATIC".
+add_library(${ROOJSPACKER_LIBRARY_NAME}
+    SHARED
+    ${ROOJSPACKER_C_SOURCES})
+
+# Make sure the Vala sources are compiled to C before attempting to
+# build the library.
+add_dependencies("${ROOJSPACKER_LIBRARY_NAME}" "${ROOJSPACKER_LIBRARY_NAME}-vala")
+
+# Generate a .gitignore
+file(WRITE  ".gitignore" "# Automatically generated by CMake, do not modify.\n")
+foreach(file
+    ".gitignore"
+    "${CMAKE_SHARED_LIBRARY_PREFIX}${ROOJSPACKER_LIBRARY_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}*"
+    "${CMAKE_STATIC_LIBRARY_PREFIX}${ROOJSPACKER_LIBRARY_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
+    "${CMAKE_SHARED_LIBRARY_PREFIX}${ROOJSPACKER_LIBRARY_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}.${ROOJSPACKER_VERSION_API}"
+    "${CMAKE_SHARED_LIBRARY_PREFIX}${ROOJSPACKER_LIBRARY_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}.${ROOJSPACKER_VERSION_API}.${ROOJSPACKER_VERSION_REVISION}"
+    "${ROOJSPACKER_PKG_NAME}.pc"
+    "config.vala")
+  file(APPEND ".gitignore" "/${file}\n")
+endforeach(file)
+foreach(file ${ROOJSPACKER_C_SOURCES})
+  string(REPLACE "${CMAKE_CURRENT_BINARY_DIR}/" "" file ${file})
+  file(APPEND ".gitignore" "/${file}\n")
+endforeach(file)
+
+# Define the gettext domain
+#set_property (TARGET ${ROOJSPACKER_LIBRARY_NAME}
+#    APPEND PROPERTY COMPILE_DEFINITIONS GETTEXT_PACKAGE="${GETTEXT_PACKAGE}")
+
+# If you don't want to build and install a shared library, comment out
+# (or remove) everything below this point.
+
+# Set the library's version information
+set_target_properties (${ROOJSPACKER_LIBRARY_NAME} PROPERTIES
+    SOVERSION "${ROOJSPACKER_SOVERSION_CURRENT}.${ROOJSPACKER_SOVERSION_REVISION}.${ROOJSPACKER_SOVERSION_AGE}"
+    VERSION   "${ROOJSPACKER_SOVERSION_CURRENT}.${ROOJSPACKER_SOVERSION_REVISION}")
+
+# GObject Introspection support
+#find_package(GObjectIntrospection REQUIRED)
+# Gir Repositories support
+#find_file(GIREPOSITORY_FILE GObject-2.0.gir /usr/share/gir-1.0 )
+#if(GIREPOSITORY_FILE)
+#else()
+#    message(FATAL_ERROR "Package libgirepository-dev not found.")
+#endif()
+
+# We already had valac write a GIR, now we need to compile it to a
+# typelib.
+#gobject_introspection_compile(
+#  "${CMAKE_CURRENT_BINARY_DIR}/${ROOJSPACKER_GIR_NAME}.typelib"
+#  "${CMAKE_CURRENT_BINARY_DIR}/${ROOJSPACKER_GIR_NAME}.gir")
+
+# Telling CMake you want to install a file doesn't actually get it to
+# *build* that file.  The workaround is to add a custom target which
+# is always built and depens on the file we want to install.
+#add_custom_target(typelib ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${ROOJSPACKER_GIR_NAME}.typelib")
+
+# Install our typelib
+#install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${ROOJSPACKER_GIR_NAME}.typelib"
+#    DESTINATION "${GI_TYPELIB_DIR}")
+
+# Install our GIR
+#install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${ROOJSPACKER_GIR_NAME}.gir"
+#    DESTINATION "${GI_REPOSITORY_DIR}")
+
+# Install our VAPI
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${ROOJSPACKER_PKG_NAME}.vapi
+    DESTINATION ${CMAKE_INSTALL_DATADIR}/vala/vapi)
+
+# Install the library
+install (TARGETS ${ROOJSPACKER_LIBRARY_NAME}
+    RUNTIME DESTINATION bin ${CMAKE_INSTALL_BINDIR}  # On Windows, the DLL goes in the same place as the executables
+    LIBRARY DESTINATION lib ${CMAKE_INSTALL_LIBDIR}  # This is where shared libraries (*.so on Linux, *.dynlib on OS X)
+    ARCHIVE DESTINATION lib ${CMAKE_INSTALL_LIBDIR}) # Finally, this is where static libraries (*.a) go
+
+# Install the C header
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${ROOJSPACKER_PKG_NAME}.h
+    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/)
+
+# Install our VAPI
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${ROOJSPACKER_PKG_NAME}.vapi
+    DESTINATION ${CMAKE_INSTALL_DATADIR}/vala/vapi)
+
+# Generate and install a pkg-config file
+configure_file (
+    "${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc.in"
+    "${CMAKE_CURRENT_BINARY_DIR}/${ROOJSPACKER_PKG_NAME}.pc"
+    @ONLY)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${ROOJSPACKER_PKG_NAME}.pc
+  DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+
+# Generate documentation
+find_package(Valadoc)
+if(${VALADOC_FOUND})
+    valadoc_generate(html
+        PACKAGE_NAME ${ROOJSPACKER_PKG_NAME}
+        PACKAGE_VERSION "${ROOJSPACKER_VERSION_MAJOR}.${ROOJSPACKER_VERSION_MINOR}.${ROOJSPACKER_VERSION_REVISION}"
+        SOURCES ${ROOJSPACKER_VALA_SOURCES}
+        PACKAGES ${ROOJSPACKER_VALA_PACKAGES})
+    valadoc_generate(devhelp
+        DOCLET devhelp
+        PACKAGE_NAME ${ROOJSPACKER_PKG_NAME}
+        PACKAGE_VERSION "${ROOJSPACKER_VERSION_MAJOR}.${ROOJSPACKER_VERSION_MINOR}.${ROOJSPACKER_VERSION_REVISION}"
+        SOURCES ${ROOJSPACKER_VALA_SOURCES}
+        PACKAGES ${ROOJSPACKER_VALA_PACKAGES})
+
+    install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/devhelp/${ROOJSPACKER_PKG_NAME}"
+        DESTINATION "${CMAKE_INSTALL_DATADIR}/devhelp/books")
+    add_custom_target(doc ALL
+        DEPENDS html devhelp)
+endif()
\ No newline at end of file
similarity index 100%
rename from src/jsdoc/Lang.vala
rename to roojspacker/Lang.vala
similarity index 100%
rename from src/jsdoc/Scope.vala
rename to roojspacker/Scope.vala
similarity index 100%
rename from src/jsdoc/Token.vala
rename to roojspacker/Token.vala
diff --git a/roojspacker/cmake_install.cmake b/roojspacker/cmake_install.cmake
new file mode 100644 (file)
index 0000000..2cd8df9
--- /dev/null
@@ -0,0 +1,132 @@
+# Install script for directory: /home/alan/gitlive/roojspacker/roojspacker
+
+# Set the install prefix
+if(NOT DEFINED CMAKE_INSTALL_PREFIX)
+  set(CMAKE_INSTALL_PREFIX "/usr/local")
+endif()
+string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
+
+# Set the install configuration name.
+if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
+  if(BUILD_TYPE)
+    string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
+           CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
+  else()
+    set(CMAKE_INSTALL_CONFIG_NAME "Debug")
+  endif()
+  message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
+endif()
+
+# Set the component getting installed.
+if(NOT CMAKE_INSTALL_COMPONENT)
+  if(COMPONENT)
+    message(STATUS "Install component: \"${COMPONENT}\"")
+    set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
+  else()
+    set(CMAKE_INSTALL_COMPONENT)
+  endif()
+endif()
+
+# Install shared libraries without execute permission?
+if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
+  set(CMAKE_INSTALL_SO_NO_EXE "1")
+endif()
+
+# Is this installation the result of a crosscompile?
+if(NOT DEFINED CMAKE_CROSSCOMPILING)
+  set(CMAKE_CROSSCOMPILING "FALSE")
+endif()
+
+if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
+  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
+   "/vala/vapi/roojspacker-1.2.vapi")
+  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
+    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
+  endif()
+  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
+    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
+  endif()
+file(INSTALL DESTINATION "/vala/vapi" TYPE FILE FILES "/home/alan/gitlive/roojspacker/roojspacker/roojspacker-1.2.vapi")
+endif()
+
+if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
+  foreach(file
+      "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libroojspacker-1.2.so.1.2"
+      "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libroojspacker-1.2.so.1.2.0"
+      )
+    if(EXISTS "${file}" AND
+       NOT IS_SYMLINK "${file}")
+      file(RPATH_CHECK
+           FILE "${file}"
+           RPATH "")
+    endif()
+  endforeach()
+  file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE SHARED_LIBRARY FILES
+    "/home/alan/gitlive/roojspacker/roojspacker/libroojspacker-1.2.so.1.2"
+    "/home/alan/gitlive/roojspacker/roojspacker/libroojspacker-1.2.so.1.2.0"
+    )
+  foreach(file
+      "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libroojspacker-1.2.so.1.2"
+      "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libroojspacker-1.2.so.1.2.0"
+      )
+    if(EXISTS "${file}" AND
+       NOT IS_SYMLINK "${file}")
+      if(CMAKE_INSTALL_DO_STRIP)
+        execute_process(COMMAND "/usr/bin/strip" "${file}")
+      endif()
+    endif()
+  endforeach()
+endif()
+
+if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
+  if(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libroojspacker-1.2.so" AND
+     NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libroojspacker-1.2.so")
+    file(RPATH_CHECK
+         FILE "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libroojspacker-1.2.so"
+         RPATH "")
+  endif()
+  file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE SHARED_LIBRARY FILES "/home/alan/gitlive/roojspacker/roojspacker/libroojspacker-1.2.so")
+  if(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libroojspacker-1.2.so" AND
+     NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libroojspacker-1.2.so")
+    if(CMAKE_INSTALL_DO_STRIP)
+      execute_process(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libroojspacker-1.2.so")
+    endif()
+  endif()
+endif()
+
+if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
+  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
+   "//roojspacker-1.2.h")
+  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
+    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
+  endif()
+  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
+    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
+  endif()
+file(INSTALL DESTINATION "/" TYPE FILE FILES "/home/alan/gitlive/roojspacker/roojspacker/roojspacker-1.2.h")
+endif()
+
+if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
+  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
+   "/vala/vapi/roojspacker-1.2.vapi")
+  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
+    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
+  endif()
+  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
+    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
+  endif()
+file(INSTALL DESTINATION "/vala/vapi" TYPE FILE FILES "/home/alan/gitlive/roojspacker/roojspacker/roojspacker-1.2.vapi")
+endif()
+
+if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
+  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
+   "/pkgconfig/roojspacker-1.2.pc")
+  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
+    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
+  endif()
+  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
+    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
+  endif()
+file(INSTALL DESTINATION "/pkgconfig" TYPE FILE FILES "/home/alan/gitlive/roojspacker/roojspacker/roojspacker-1.2.pc")
+endif()
+
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644 (file)
index cce32cd..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-
-# - not sure if needed....  
-
-AM_CPPFLAGS =  \
-    $(ROOJSPACKER_CFLAGS)  \
-    $(JSON_GBIB_CFLAGS)  \
-    -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
-    -DPACKAGE_DATA_DIR=\""$(datadir)"\" 
-
-
-bin_PROGRAMS = roojspacker
-lib_LTLIBRARIES = libroojspacker-1.2.la
-
-
-if HAVE_JSON_GLIB
-roojspacker_JSON_GLIB_FLAGS = -D HAVE_JSON_GLIB
-endif
-
-if HAVE_OLD_GLIB
-roojspacker_OLD_GLIB_FLAGS = -D HAVE_OLD_GLIB
-endif
-
-roojspacker_PKGS = \
-               --pkg glib-2.0  \
-               --pkg gobject-2.0  \
-               --pkg gee-0.8 \
-               --pkg posix \
-               --pkg gio-2.0
-
-if HAVE_JSON_GLIB
-  roojspacker_PKGS += --pkg json-glib-1.0
-endif
-
-
-libroojspacker_1_2_la_SOURCES = \
-               jsdoc/Collapse.vala \
-               jsdoc/CompressWhite.vala \
-               jsdoc/Identifier.vala \
-               jsdoc/Lang.vala \
-               jsdoc/Packer.vala \
-               jsdoc/ScopeParser.vala \
-               jsdoc/Scope.vala \
-               jsdoc/TextStream.vala \
-               jsdoc/TokenReader.vala \
-               jsdoc/TokenStream.vala \
-               jsdoc/Token.vala \
-               jsdoc/PackerRun.vala \
-               jsdoc/Walker.vala \
-               jsdoc/SymbolSet.vala \
-               jsdoc/DocBuilder.vala \
-               jsdoc/DocComment.vala \
-               jsdoc/DocParser.vala \
-               jsdoc/DocTag.vala \
-               jsdoc/PrettyPrint.vala \
-               jsdoc/Symbol.vala
-
-# not sure if -g is needed..???
-
-libroojspacker_1_2_la_VALAFLAGS = \
-    --library roojspacker-1.2 \
-    -H roojspacker-1.2.h \
-    --gir JSDOC-1.2.gir \
-    -X -shared -X -lm \
-    --thread \
-    --target-glib=2.32 \
-    --vapidir=$(srcdir)/vapi \
-    -g  \
-    $(roojspacker_PKGS) \
-     $(roojspacker_OLD_GLIB_FLAGS)  $(roojspacker_JSON_GLIB_FLAGS)
-
-libroojspacker_1_2_la_CFLAGS =    $(JSON_GLIB_CFLAGS) $(ROOJSPACKER_CFLAGS) 
-
-roojspacker_SOURCES =  main.vala
-roojspacker_LDADD = libroojspacker-1.2.la $(ROOJSPACKER_LIBS) $(JSON_GLIB_LIBS)
-roojspacker_VALAFLAGS =  --pkg roojspacker-1.2 --thread -X -lm --target-glib=2.32   \
-    --vapidir=$(srcdir)  --vapidir=$(srcdir)/vapi -g  $(roojspacker_PKGS) \
-     $(roojspacker_OLD_GLIB_FLAGS) $(roojspacker_JSON_GLIB_FLAGS)
-     
-roojspacker_CFLAGS =    $(JSON_GLIB_CFLAGS) $(ROOJSPACKER_CFLAGS) 
-    
-CLEANFILES = *.h *.c *.vapi *.stamp *.gir
-
-roojspackerincludedir = $(includedir)/roojspacker
-
-roojspackerinclude_HEADERS = \
-       roojspacker-1.2.h \
-       $(NULL)
-
-
-
-vapidir = $(datadir)/vala/vapi
-
-dist_vapi_DATA = \
-    roojspacker-1.2.vapi
-
-
-
-# girdir = $(datadir)/gir-1.1
-# gir_DATA =  JSDOC-1.1.gir
-    
-# typelibdir = $(libdir)/girepository-1.1
-# typelib_DATA = JSDOC-1.1.typelib
-
-# would be better to include INTROSPECTION_MAKEFILE - but I think it's problematic...
-    
-# JSDOC-1.1.typelib:
-#      g-ir-compiler \
-#         --includedir=$(srcdir) \
-#              --shared-library=libroojspacker-1.1.so \
-#              --output=$(typelib_DATA) \
-#              $(gir_DATA)
-    
-    
-
diff --git a/src/roojspacker-1.2.h b/src/roojspacker-1.2.h
deleted file mode 100644 (file)
index a4e394b..0000000
+++ /dev/null
@@ -1,901 +0,0 @@
-/* roojspacker-1.2.h generated by valac 0.36.6, the Vala compiler, do not modify */
-
-
-#ifndef __ROOJSPACKER_1_2_H__
-#define __ROOJSPACKER_1_2_H__
-
-#include <glib.h>
-#include <glib-object.h>
-#include <gee.h>
-#include <stdlib.h>
-#include <string.h>
-#include <gio/gio.h>
-#include <json-glib/json-glib.h>
-
-G_BEGIN_DECLS
-
-
-#define JSDOC_TYPE_TOKEN_STREAM (jsdoc_token_stream_get_type ())
-#define JSDOC_TOKEN_STREAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_TOKEN_STREAM, JSDOCTokenStream))
-#define JSDOC_TOKEN_STREAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_TOKEN_STREAM, JSDOCTokenStreamClass))
-#define JSDOC_IS_TOKEN_STREAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_TOKEN_STREAM))
-#define JSDOC_IS_TOKEN_STREAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_TOKEN_STREAM))
-#define JSDOC_TOKEN_STREAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_TOKEN_STREAM, JSDOCTokenStreamClass))
-
-typedef struct _JSDOCTokenStream JSDOCTokenStream;
-typedef struct _JSDOCTokenStreamClass JSDOCTokenStreamClass;
-typedef struct _JSDOCTokenStreamPrivate JSDOCTokenStreamPrivate;
-
-#define JSDOC_TYPE_TOKEN (jsdoc_token_get_type ())
-#define JSDOC_TOKEN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_TOKEN, JSDOCToken))
-#define JSDOC_TOKEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_TOKEN, JSDOCTokenClass))
-#define JSDOC_IS_TOKEN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_TOKEN))
-#define JSDOC_IS_TOKEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_TOKEN))
-#define JSDOC_TOKEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_TOKEN, JSDOCTokenClass))
-
-typedef struct _JSDOCToken JSDOCToken;
-typedef struct _JSDOCTokenClass JSDOCTokenClass;
-
-#define JSDOC_TYPE_COLLAPSE (jsdoc_collapse_get_type ())
-#define JSDOC_COLLAPSE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_COLLAPSE, JSDOCCollapse))
-#define JSDOC_COLLAPSE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_COLLAPSE, JSDOCCollapseClass))
-#define JSDOC_IS_COLLAPSE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_COLLAPSE))
-#define JSDOC_IS_COLLAPSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_COLLAPSE))
-#define JSDOC_COLLAPSE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_COLLAPSE, JSDOCCollapseClass))
-
-typedef struct _JSDOCCollapse JSDOCCollapse;
-typedef struct _JSDOCCollapseClass JSDOCCollapseClass;
-typedef struct _JSDOCCollapsePrivate JSDOCCollapsePrivate;
-
-#define JSDOC_TYPE_PACKER (jsdoc_packer_get_type ())
-#define JSDOC_PACKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_PACKER, JSDOCPacker))
-#define JSDOC_PACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_PACKER, JSDOCPackerClass))
-#define JSDOC_IS_PACKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_PACKER))
-#define JSDOC_IS_PACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_PACKER))
-#define JSDOC_PACKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_PACKER, JSDOCPackerClass))
-
-typedef struct _JSDOCPacker JSDOCPacker;
-typedef struct _JSDOCPackerClass JSDOCPackerClass;
-
-#define JSDOC_TYPE_IDENTIFIER (jsdoc_identifier_get_type ())
-#define JSDOC_IDENTIFIER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_IDENTIFIER, JSDOCIdentifier))
-#define JSDOC_IDENTIFIER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_IDENTIFIER, JSDOCIdentifierClass))
-#define JSDOC_IS_IDENTIFIER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_IDENTIFIER))
-#define JSDOC_IS_IDENTIFIER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_IDENTIFIER))
-#define JSDOC_IDENTIFIER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_IDENTIFIER, JSDOCIdentifierClass))
-
-typedef struct _JSDOCIdentifier JSDOCIdentifier;
-typedef struct _JSDOCIdentifierClass JSDOCIdentifierClass;
-typedef struct _JSDOCIdentifierPrivate JSDOCIdentifierPrivate;
-
-#define JSDOC_TYPE_SCOPE (jsdoc_scope_get_type ())
-#define JSDOC_SCOPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_SCOPE, JSDOCScope))
-#define JSDOC_SCOPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_SCOPE, JSDOCScopeClass))
-#define JSDOC_IS_SCOPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_SCOPE))
-#define JSDOC_IS_SCOPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_SCOPE))
-#define JSDOC_SCOPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_SCOPE, JSDOCScopeClass))
-
-typedef struct _JSDOCScope JSDOCScope;
-typedef struct _JSDOCScopeClass JSDOCScopeClass;
-
-#define JSDOC_TYPE_LANGCLASS (jsdoc_langclass_get_type ())
-#define JSDOC_LANGCLASS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_LANGCLASS, JSDOCLang_Class))
-#define JSDOC_LANGCLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_LANGCLASS, JSDOCLang_ClassClass))
-#define JSDOC_IS_LANGCLASS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_LANGCLASS))
-#define JSDOC_IS_LANGCLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_LANGCLASS))
-#define JSDOC_LANGCLASS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_LANGCLASS, JSDOCLang_ClassClass))
-
-typedef struct _JSDOCLang_Class JSDOCLang_Class;
-typedef struct _JSDOCLang_ClassClass JSDOCLang_ClassClass;
-typedef struct _JSDOCLang_ClassPrivate JSDOCLang_ClassPrivate;
-
-#define JSDOC_TYPE_TOKEN_NAME (jsdoc_token_name_get_type ())
-typedef struct _JSDOCPackerPrivate JSDOCPackerPrivate;
-
-#define JSDOC_TYPE_PACKER_RUN (jsdoc_packer_run_get_type ())
-#define JSDOC_PACKER_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_PACKER_RUN, JSDOCPackerRun))
-#define JSDOC_PACKER_RUN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_PACKER_RUN, JSDOCPackerRunClass))
-#define JSDOC_IS_PACKER_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_PACKER_RUN))
-#define JSDOC_IS_PACKER_RUN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_PACKER_RUN))
-#define JSDOC_PACKER_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_PACKER_RUN, JSDOCPackerRunClass))
-
-typedef struct _JSDOCPackerRun JSDOCPackerRun;
-typedef struct _JSDOCPackerRunClass JSDOCPackerRunClass;
-
-#define JSDOC_PACKER_TYPE_RESULT_TYPE (jsdoc_packer_result_type_get_type ())
-
-#define JSDOC_TYPE_SCOPE_PARSER_MODE (jsdoc_scope_parser_mode_get_type ())
-
-#define JSDOC_TYPE_SCOPE_PARSER (jsdoc_scope_parser_get_type ())
-#define JSDOC_SCOPE_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_SCOPE_PARSER, JSDOCScopeParser))
-#define JSDOC_SCOPE_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_SCOPE_PARSER, JSDOCScopeParserClass))
-#define JSDOC_IS_SCOPE_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_SCOPE_PARSER))
-#define JSDOC_IS_SCOPE_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_SCOPE_PARSER))
-#define JSDOC_SCOPE_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_SCOPE_PARSER, JSDOCScopeParserClass))
-
-typedef struct _JSDOCScopeParser JSDOCScopeParser;
-typedef struct _JSDOCScopeParserClass JSDOCScopeParserClass;
-typedef struct _JSDOCScopeParserPrivate JSDOCScopeParserPrivate;
-typedef struct _JSDOCScopePrivate JSDOCScopePrivate;
-
-#define JSDOC_TYPE_TEXT_STREAM_CHAR (jsdoc_text_stream_char_get_type ())
-#define JSDOC_TEXT_STREAM_CHAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_TEXT_STREAM_CHAR, JSDOCTextStreamChar))
-#define JSDOC_TEXT_STREAM_CHAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_TEXT_STREAM_CHAR, JSDOCTextStreamCharClass))
-#define JSDOC_IS_TEXT_STREAM_CHAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_TEXT_STREAM_CHAR))
-#define JSDOC_IS_TEXT_STREAM_CHAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_TEXT_STREAM_CHAR))
-#define JSDOC_TEXT_STREAM_CHAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_TEXT_STREAM_CHAR, JSDOCTextStreamCharClass))
-
-typedef struct _JSDOCTextStreamChar JSDOCTextStreamChar;
-typedef struct _JSDOCTextStreamCharClass JSDOCTextStreamCharClass;
-typedef struct _JSDOCTextStreamCharPrivate JSDOCTextStreamCharPrivate;
-
-#define JSDOC_TYPE_TEXT_STREAM (jsdoc_text_stream_get_type ())
-#define JSDOC_TEXT_STREAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_TEXT_STREAM, JSDOCTextStream))
-#define JSDOC_TEXT_STREAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_TEXT_STREAM, JSDOCTextStreamClass))
-#define JSDOC_IS_TEXT_STREAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_TEXT_STREAM))
-#define JSDOC_IS_TEXT_STREAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_TEXT_STREAM))
-#define JSDOC_TEXT_STREAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_TEXT_STREAM, JSDOCTextStreamClass))
-
-typedef struct _JSDOCTextStream JSDOCTextStream;
-typedef struct _JSDOCTextStreamClass JSDOCTextStreamClass;
-typedef struct _JSDOCTextStreamPrivate JSDOCTextStreamPrivate;
-
-#define JSDOC_TYPE_TOKEN_ARRAY (jsdoc_token_array_get_type ())
-#define JSDOC_TOKEN_ARRAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_TOKEN_ARRAY, JSDOCTokenArray))
-#define JSDOC_TOKEN_ARRAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_TOKEN_ARRAY, JSDOCTokenArrayClass))
-#define JSDOC_IS_TOKEN_ARRAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_TOKEN_ARRAY))
-#define JSDOC_IS_TOKEN_ARRAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_TOKEN_ARRAY))
-#define JSDOC_TOKEN_ARRAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_TOKEN_ARRAY, JSDOCTokenArrayClass))
-
-typedef struct _JSDOCTokenArray JSDOCTokenArray;
-typedef struct _JSDOCTokenArrayClass JSDOCTokenArrayClass;
-typedef struct _JSDOCTokenArrayPrivate JSDOCTokenArrayPrivate;
-
-#define JSDOC_TYPE_TOKEN_READER (jsdoc_token_reader_get_type ())
-#define JSDOC_TOKEN_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_TOKEN_READER, JSDOCTokenReader))
-#define JSDOC_TOKEN_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_TOKEN_READER, JSDOCTokenReaderClass))
-#define JSDOC_IS_TOKEN_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_TOKEN_READER))
-#define JSDOC_IS_TOKEN_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_TOKEN_READER))
-#define JSDOC_TOKEN_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_TOKEN_READER, JSDOCTokenReaderClass))
-
-typedef struct _JSDOCTokenReader JSDOCTokenReader;
-typedef struct _JSDOCTokenReaderClass JSDOCTokenReaderClass;
-typedef struct _JSDOCTokenReaderPrivate JSDOCTokenReaderPrivate;
-
-#define JSDOC_TYPE_TOKEN_TYPE (jsdoc_token_type_get_type ())
-
-#define JSDOC_TYPE_TOKEN_KEY_MAP (jsdoc_token_key_map_get_type ())
-#define JSDOC_TOKEN_KEY_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_TOKEN_KEY_MAP, JSDOCTokenKeyMap))
-#define JSDOC_TOKEN_KEY_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_TOKEN_KEY_MAP, JSDOCTokenKeyMapClass))
-#define JSDOC_IS_TOKEN_KEY_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_TOKEN_KEY_MAP))
-#define JSDOC_IS_TOKEN_KEY_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_TOKEN_KEY_MAP))
-#define JSDOC_TOKEN_KEY_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_TOKEN_KEY_MAP, JSDOCTokenKeyMapClass))
-
-typedef struct _JSDOCTokenKeyMap JSDOCTokenKeyMap;
-typedef struct _JSDOCTokenKeyMapClass JSDOCTokenKeyMapClass;
-typedef struct _JSDOCTokenKeyMapPrivate JSDOCTokenKeyMapPrivate;
-typedef struct _JSDOCTokenPrivate JSDOCTokenPrivate;
-typedef struct _JSDOCPackerRunPrivate JSDOCPackerRunPrivate;
-
-#define JSDOC_TYPE_WALKER (jsdoc_walker_get_type ())
-#define JSDOC_WALKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_WALKER, JSDOCWalker))
-#define JSDOC_WALKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_WALKER, JSDOCWalkerClass))
-#define JSDOC_IS_WALKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_WALKER))
-#define JSDOC_IS_WALKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_WALKER))
-#define JSDOC_WALKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_WALKER, JSDOCWalkerClass))
-
-typedef struct _JSDOCWalker JSDOCWalker;
-typedef struct _JSDOCWalkerClass JSDOCWalkerClass;
-typedef struct _JSDOCWalkerPrivate JSDOCWalkerPrivate;
-
-#define JSDOC_TYPE_SYMBOL_SET (jsdoc_symbol_set_get_type ())
-#define JSDOC_SYMBOL_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_SYMBOL_SET, JSDOCSymbolSet))
-#define JSDOC_SYMBOL_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_SYMBOL_SET, JSDOCSymbolSetClass))
-#define JSDOC_IS_SYMBOL_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_SYMBOL_SET))
-#define JSDOC_IS_SYMBOL_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_SYMBOL_SET))
-#define JSDOC_SYMBOL_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_SYMBOL_SET, JSDOCSymbolSetClass))
-
-typedef struct _JSDOCSymbolSet JSDOCSymbolSet;
-typedef struct _JSDOCSymbolSetClass JSDOCSymbolSetClass;
-typedef struct _JSDOCSymbolSetPrivate JSDOCSymbolSetPrivate;
-
-#define JSDOC_TYPE_SYMBOL (jsdoc_symbol_get_type ())
-#define JSDOC_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_SYMBOL, JSDOCSymbol))
-#define JSDOC_SYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_SYMBOL, JSDOCSymbolClass))
-#define JSDOC_IS_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_SYMBOL))
-#define JSDOC_IS_SYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_SYMBOL))
-#define JSDOC_SYMBOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_SYMBOL, JSDOCSymbolClass))
-
-typedef struct _JSDOCSymbol JSDOCSymbol;
-typedef struct _JSDOCSymbolClass JSDOCSymbolClass;
-
-#define JSDOC_TYPE_DOC_COMMENT (jsdoc_doc_comment_get_type ())
-#define JSDOC_DOC_COMMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_DOC_COMMENT, JSDOCDocComment))
-#define JSDOC_DOC_COMMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_DOC_COMMENT, JSDOCDocCommentClass))
-#define JSDOC_IS_DOC_COMMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_DOC_COMMENT))
-#define JSDOC_IS_DOC_COMMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_DOC_COMMENT))
-#define JSDOC_DOC_COMMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_DOC_COMMENT, JSDOCDocCommentClass))
-
-typedef struct _JSDOCDocComment JSDOCDocComment;
-typedef struct _JSDOCDocCommentClass JSDOCDocCommentClass;
-typedef struct _JSDOCDocCommentPrivate JSDOCDocCommentPrivate;
-
-#define JSDOC_TYPE_DOC_TAG (jsdoc_doc_tag_get_type ())
-#define JSDOC_DOC_TAG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_DOC_TAG, JSDOCDocTag))
-#define JSDOC_DOC_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_DOC_TAG, JSDOCDocTagClass))
-#define JSDOC_IS_DOC_TAG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_DOC_TAG))
-#define JSDOC_IS_DOC_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_DOC_TAG))
-#define JSDOC_DOC_TAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_DOC_TAG, JSDOCDocTagClass))
-
-typedef struct _JSDOCDocTag JSDOCDocTag;
-typedef struct _JSDOCDocTagClass JSDOCDocTagClass;
-
-#define JSDOC_TYPE_DOC_TAG_TITLE (jsdoc_doc_tag_title_get_type ())
-
-#define JSDOC_TYPE_DOC_PARSER (jsdoc_doc_parser_get_type ())
-#define JSDOC_DOC_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSDOC_TYPE_DOC_PARSER, JSDOCDocParser))
-#define JSDOC_DOC_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), JSDOC_TYPE_DOC_PARSER, JSDOCDocParserClass))
-#define JSDOC_IS_DOC_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSDOC_TYPE_DOC_PARSER))
-#define JSDOC_IS_DOC_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), JSDOC_TYPE_DOC_PARSER))
-#define JSDOC_DOC_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), JSDOC_TYPE_DOC_PARSER, JSDOCDocParserClass))
-
-typedef struct _JSDOCDocParser JSDOCDocParser;
-typedef struct _JSDOCDocParserClass JSDOCDocParserClass;
-typedef struct _JSDOCDocParserPrivate JSDOCDocParserPrivate;
-typedef struct _JSDOCDocTagPrivate JSDOCDocTagPrivate;
-typedef struct _JSDOCSymbolPrivate JSDOCSymbolPrivate;
-
-struct _JSDOCTokenStream {
-       GObject parent_instance;
-       JSDOCTokenStreamPrivate * priv;
-       GeeArrayList* tokens;
-       gint cursor;
-};
-
-struct _JSDOCTokenStreamClass {
-       GObjectClass parent_class;
-};
-
-struct _JSDOCCollapse {
-       JSDOCTokenStream parent_instance;
-       JSDOCCollapsePrivate * priv;
-};
-
-struct _JSDOCCollapseClass {
-       JSDOCTokenStreamClass parent_class;
-};
-
-typedef enum  {
-       JSDOC_COMPRESS_WHITE_ERROR_BRACE
-} JSDOCCompressWhiteError;
-#define JSDOC_COMPRESS_WHITE_ERROR jsdoc_compress_white_error_quark ()
-struct _JSDOCIdentifier {
-       GObject parent_instance;
-       JSDOCIdentifierPrivate * priv;
-       gchar* name;
-       gint refcount;
-       gchar* mungedValue;
-       JSDOCScope* scope;
-       gboolean toMunge;
-};
-
-struct _JSDOCIdentifierClass {
-       GObjectClass parent_class;
-};
-
-typedef enum  {
-       JSDOC_LANG_ERROR_ArgumentError
-} JSDOCLangError;
-#define JSDOC_LANG_ERROR jsdoc_lang_error_quark ()
-struct _JSDOCLang_Class {
-       GObject parent_instance;
-       JSDOCLang_ClassPrivate * priv;
-};
-
-struct _JSDOCLang_ClassClass {
-       GObjectClass parent_class;
-};
-
-typedef enum  {
-       JSDOC_TOKEN_NAME_UNKNOWN_TOKEN,
-       JSDOC_TOKEN_NAME_BREAK,
-       JSDOC_TOKEN_NAME_CASE,
-       JSDOC_TOKEN_NAME_CATCH,
-       JSDOC_TOKEN_NAME_CONST,
-       JSDOC_TOKEN_NAME_CONTINUE,
-       JSDOC_TOKEN_NAME_DEFAULT,
-       JSDOC_TOKEN_NAME_DELETE,
-       JSDOC_TOKEN_NAME_DO,
-       JSDOC_TOKEN_NAME_ELSE,
-       JSDOC_TOKEN_NAME_FALSE,
-       JSDOC_TOKEN_NAME_FINALLY,
-       JSDOC_TOKEN_NAME_FOR,
-       JSDOC_TOKEN_NAME_FUNCTION,
-       JSDOC_TOKEN_NAME_IF,
-       JSDOC_TOKEN_NAME_IN,
-       JSDOC_TOKEN_NAME_INSTANCEOF,
-       JSDOC_TOKEN_NAME_NEW,
-       JSDOC_TOKEN_NAME_NULL,
-       JSDOC_TOKEN_NAME_RETURN,
-       JSDOC_TOKEN_NAME_SWITCH,
-       JSDOC_TOKEN_NAME_THIS,
-       JSDOC_TOKEN_NAME_THROW,
-       JSDOC_TOKEN_NAME_TRUE,
-       JSDOC_TOKEN_NAME_TRY,
-       JSDOC_TOKEN_NAME_TYPEOF,
-       JSDOC_TOKEN_NAME_VOID,
-       JSDOC_TOKEN_NAME_WHILE,
-       JSDOC_TOKEN_NAME_WITH,
-       JSDOC_TOKEN_NAME_VAR,
-       JSDOC_TOKEN_NAME_EVAL,
-       JSDOC_TOKEN_NAME_NAME,
-       JSDOC_TOKEN_NAME_MULTI_LINE_COMM,
-       JSDOC_TOKEN_NAME_JSDOC,
-       JSDOC_TOKEN_NAME_SINGLE_LINE_COMM,
-       JSDOC_TOKEN_NAME_SEMICOLON,
-       JSDOC_TOKEN_NAME_COMMA,
-       JSDOC_TOKEN_NAME_HOOK,
-       JSDOC_TOKEN_NAME_COLON,
-       JSDOC_TOKEN_NAME_OR,
-       JSDOC_TOKEN_NAME_AND,
-       JSDOC_TOKEN_NAME_BITWISE_OR,
-       JSDOC_TOKEN_NAME_BITWISE_XOR,
-       JSDOC_TOKEN_NAME_BITWISE_AND,
-       JSDOC_TOKEN_NAME_STRICT_EQ,
-       JSDOC_TOKEN_NAME_EQ,
-       JSDOC_TOKEN_NAME_ASSIGN,
-       JSDOC_TOKEN_NAME_STRICT_NE,
-       JSDOC_TOKEN_NAME_NE,
-       JSDOC_TOKEN_NAME_LSH,
-       JSDOC_TOKEN_NAME_LE,
-       JSDOC_TOKEN_NAME_LT,
-       JSDOC_TOKEN_NAME_URSH,
-       JSDOC_TOKEN_NAME_RSH,
-       JSDOC_TOKEN_NAME_GE,
-       JSDOC_TOKEN_NAME_GT,
-       JSDOC_TOKEN_NAME_INCREMENT,
-       JSDOC_TOKEN_NAME_DECREMENT,
-       JSDOC_TOKEN_NAME_PLUS,
-       JSDOC_TOKEN_NAME_MINUS,
-       JSDOC_TOKEN_NAME_MUL,
-       JSDOC_TOKEN_NAME_DIV,
-       JSDOC_TOKEN_NAME_MOD,
-       JSDOC_TOKEN_NAME_NOT,
-       JSDOC_TOKEN_NAME_BITWISE_NOT,
-       JSDOC_TOKEN_NAME_DOT,
-       JSDOC_TOKEN_NAME_LEFT_BRACE,
-       JSDOC_TOKEN_NAME_RIGHT_BRACE,
-       JSDOC_TOKEN_NAME_LEFT_CURLY,
-       JSDOC_TOKEN_NAME_RIGHT_CURLY,
-       JSDOC_TOKEN_NAME_LEFT_PAREN,
-       JSDOC_TOKEN_NAME_RIGHT_PAREN,
-       JSDOC_TOKEN_NAME_SPACE,
-       JSDOC_TOKEN_NAME_NEWLINE,
-       JSDOC_TOKEN_NAME_DOUBLE_QUOTE,
-       JSDOC_TOKEN_NAME_SINGLE_QUOTE,
-       JSDOC_TOKEN_NAME_OCTAL,
-       JSDOC_TOKEN_NAME_DECIMAL,
-       JSDOC_TOKEN_NAME_HEX_DEC,
-       JSDOC_TOKEN_NAME_REGX,
-       JSDOC_TOKEN_NAME_START_OF_STREAM,
-       JSDOC_TOKEN_NAME_END_OF_STREAM,
-       JSDOC_TOKEN_NAME_UNKNOWN
-} JSDOCTokenName;
-
-typedef enum  {
-       JSDOC_PACKER_ERROR_ArgumentError
-} JSDOCPackerError;
-#define JSDOC_PACKER_ERROR jsdoc_packer_error_quark ()
-struct _JSDOCPacker {
-       GObject parent_instance;
-       JSDOCPackerPrivate * priv;
-       GeeArrayList* files;
-       gchar* activeFile;
-       gchar* outstr;
-       JSDOCPackerRun* config;
-       JsonObject* result;
-};
-
-struct _JSDOCPackerClass {
-       GObjectClass parent_class;
-};
-
-typedef enum  {
-       JSDOC_PACKER_RESULT_TYPE_err,
-       JSDOC_PACKER_RESULT_TYPE_warn
-} JSDOCPackerResultType;
-
-typedef enum  {
-       JSDOC_SCOPE_PARSER_MODE_BUILDING_SYMBOL_TREE,
-       JSDOC_SCOPE_PARSER_MODE_PASS2_SYMBOL_TREE
-} JSDOCScopeParserMode;
-
-struct _JSDOCScopeParser {
-       GObject parent_instance;
-       JSDOCScopeParserPrivate * priv;
-};
-
-struct _JSDOCScopeParserClass {
-       GObjectClass parent_class;
-};
-
-struct _JSDOCScope {
-       GObject parent_instance;
-       JSDOCScopePrivate * priv;
-       JSDOCScope* parent;
-       GeeArrayList* subScopes;
-       gchar* ident;
-};
-
-struct _JSDOCScopeClass {
-       GObjectClass parent_class;
-};
-
-struct _JSDOCTextStreamChar {
-       GObject parent_instance;
-       JSDOCTextStreamCharPrivate * priv;
-       gchar c;
-       gboolean eof;
-};
-
-struct _JSDOCTextStreamCharClass {
-       GObjectClass parent_class;
-};
-
-struct _JSDOCTextStream {
-       GObject parent_instance;
-       JSDOCTextStreamPrivate * priv;
-};
-
-struct _JSDOCTextStreamClass {
-       GObjectClass parent_class;
-};
-
-struct _JSDOCTokenArray {
-       GObject parent_instance;
-       JSDOCTokenArrayPrivate * priv;
-       GeeArrayList* tokens;
-};
-
-struct _JSDOCTokenArrayClass {
-       GObjectClass parent_class;
-};
-
-typedef enum  {
-       JSDOC_TOKENREADER_ERROR_ArgumentError,
-       JSDOC_TOKENREADER_ERROR_SyntaxError
-} JSDOCTokenReader_Error;
-#define JSDOC_TOKENREADER_ERROR jsdoc_tokenreader_error_quark ()
-struct _JSDOCTokenReader {
-       GObject parent_instance;
-       JSDOCTokenReaderPrivate * priv;
-       gboolean collapseWhite;
-       gboolean keepDocs;
-       gboolean keepWhite;
-       gboolean keepComments;
-       gboolean sepIdents;
-       gchar* filename;
-       gboolean ignoreBadGrammer;
-};
-
-struct _JSDOCTokenReaderClass {
-       GObjectClass parent_class;
-};
-
-typedef enum  {
-       JSDOC_TOKEN_STREAM_ERROR_ArgumentError
-} JSDOCTokenStreamError;
-#define JSDOC_TOKEN_STREAM_ERROR jsdoc_token_stream_error_quark ()
-typedef enum  {
-       JSDOC_TOKEN_TYPE_TOKN,
-       JSDOC_TOKEN_TYPE_KEYW,
-       JSDOC_TOKEN_TYPE_NAME,
-       JSDOC_TOKEN_TYPE_COMM,
-       JSDOC_TOKEN_TYPE_PUNC,
-       JSDOC_TOKEN_TYPE_WHIT,
-       JSDOC_TOKEN_TYPE_STRN,
-       JSDOC_TOKEN_TYPE_NUMB,
-       JSDOC_TOKEN_TYPE_REGX,
-       JSDOC_TOKEN_TYPE_VOID
-} JSDOCTokenType;
-
-struct _JSDOCTokenKeyMap {
-       GObject parent_instance;
-       JSDOCTokenKeyMapPrivate * priv;
-       JSDOCToken* key;
-       GeeArrayList* vals;
-};
-
-struct _JSDOCTokenKeyMapClass {
-       GObjectClass parent_class;
-};
-
-struct _JSDOCToken {
-       GObject parent_instance;
-       JSDOCTokenPrivate * priv;
-       gint id;
-       gchar* data;
-       JSDOCTokenType type;
-       JSDOCTokenName name;
-       gint line;
-       gchar* prefix;
-       gchar* outData;
-       JSDOCIdentifier* identifier;
-       GeeArrayList* items;
-       GeeHashMap* props;
-       GeeArrayList* keyseq;
-};
-
-struct _JSDOCTokenClass {
-       GObjectClass parent_class;
-};
-
-struct _JSDOCPackerRun {
-       GApplication parent_instance;
-       JSDOCPackerRunPrivate * priv;
-       gchar* opt_target;
-       gchar* opt_debug_target;
-       gchar* opt_real_basedir;
-       gchar* opt_doc_target;
-       gchar* opt_doc_template_dir;
-       gboolean opt_doc_include_private;
-       gboolean opt_debug;
-       gboolean opt_skip_scope;
-       gboolean opt_keep_whitespace;
-       gboolean opt_dump_tokens;
-       gboolean opt_clean_cache;
-       gchar* opt_doc_ext;
-};
-
-struct _JSDOCPackerRunClass {
-       GApplicationClass parent_class;
-};
-
-struct _JSDOCWalker {
-       GObject parent_instance;
-       JSDOCWalkerPrivate * priv;
-};
-
-struct _JSDOCWalkerClass {
-       GObjectClass parent_class;
-};
-
-struct _JSDOCSymbolSet {
-       GObject parent_instance;
-       JSDOCSymbolSetPrivate * priv;
-};
-
-struct _JSDOCSymbolSetClass {
-       GObjectClass parent_class;
-};
-
-struct _JSDOCDocComment {
-       GObject parent_instance;
-       JSDOCDocCommentPrivate * priv;
-       gboolean isUserComment;
-       gboolean hasTags;
-       gchar* src;
-       GeeArrayList* tags;
-};
-
-struct _JSDOCDocCommentClass {
-       GObjectClass parent_class;
-};
-
-typedef enum  {
-       JSDOC_DOC_TAG_TITLE_NO_VALUE,
-       JSDOC_DOC_TAG_TITLE_PARAM,
-       JSDOC_DOC_TAG_TITLE_PROPERTY,
-       JSDOC_DOC_TAG_TITLE_CFG,
-       JSDOC_DOC_TAG_TITLE_EXAMPLE,
-       JSDOC_DOC_TAG_TITLE_SINGLETON,
-       JSDOC_DOC_TAG_TITLE_AUTHOR,
-       JSDOC_DOC_TAG_TITLE_METHOD,
-       JSDOC_DOC_TAG_TITLE_DESC,
-       JSDOC_DOC_TAG_TITLE_OVERVIEW,
-       JSDOC_DOC_TAG_TITLE_SINCE,
-       JSDOC_DOC_TAG_TITLE_CONSTANT,
-       JSDOC_DOC_TAG_TITLE_VERSION,
-       JSDOC_DOC_TAG_TITLE_DEPRECATED,
-       JSDOC_DOC_TAG_TITLE_SEE,
-       JSDOC_DOC_TAG_TITLE_CLASS,
-       JSDOC_DOC_TAG_TITLE_NAMESPACE,
-       JSDOC_DOC_TAG_TITLE_CONSTRUCTOR,
-       JSDOC_DOC_TAG_TITLE_STATIC,
-       JSDOC_DOC_TAG_TITLE_INNER,
-       JSDOC_DOC_TAG_TITLE_FIELD,
-       JSDOC_DOC_TAG_TITLE_FUNCTION,
-       JSDOC_DOC_TAG_TITLE_EVENT,
-       JSDOC_DOC_TAG_TITLE_NAME,
-       JSDOC_DOC_TAG_TITLE_RETURN,
-       JSDOC_DOC_TAG_TITLE_THROWS,
-       JSDOC_DOC_TAG_TITLE_REQUIRES,
-       JSDOC_DOC_TAG_TITLE_TYPE,
-       JSDOC_DOC_TAG_TITLE_PRIVATE,
-       JSDOC_DOC_TAG_TITLE_IGNORE,
-       JSDOC_DOC_TAG_TITLE_ARGUMENTS,
-       JSDOC_DOC_TAG_TITLE_EXTENDS,
-       JSDOC_DOC_TAG_TITLE_DEFAULT,
-       JSDOC_DOC_TAG_TITLE_MEMBEROF,
-       JSDOC_DOC_TAG_TITLE_PUBLIC,
-       JSDOC_DOC_TAG_TITLE_SCOPE,
-       JSDOC_DOC_TAG_TITLE_SCOPEALIAS
-} JSDOCDocTagTitle;
-
-struct _JSDOCDocParser {
-       GObject parent_instance;
-       JSDOCDocParserPrivate * priv;
-};
-
-struct _JSDOCDocParserClass {
-       GObjectClass parent_class;
-};
-
-struct _JSDOCDocTag {
-       GObject parent_instance;
-       JSDOCDocTagPrivate * priv;
-       JSDOCDocTagTitle title;
-       gchar* type;
-       gchar* name;
-       gboolean isOptional;
-       gchar* defaultValue;
-       gchar* desc;
-       GeeArrayList* optvalues;
-       gchar* memberOf;
-};
-
-struct _JSDOCDocTagClass {
-       GObjectClass parent_class;
-};
-
-struct _JSDOCSymbol {
-       GObject parent_instance;
-       JSDOCSymbolPrivate * priv;
-       GeeArrayList* augments;
-       GeeArrayList* methods;
-       GeeArrayList* properties;
-       GeeArrayList* returns;
-       GeeArrayList* childClasses;
-       GeeArrayList* inheritsFrom;
-       GeeHashMap* cfgs;
-       JSDOCDocComment* comment;
-       gchar* alias;
-       gchar* desc;
-       gchar* isa;
-       gboolean isEvent;
-       gboolean isConstant;
-       gboolean isIgnored;
-       gboolean isInner;
-       gboolean isNamespace;
-       gboolean isPrivate;
-       gboolean isStatic;
-       gchar* memberOf;
-};
-
-struct _JSDOCSymbolClass {
-       GObjectClass parent_class;
-};
-
-
-GType jsdoc_token_stream_get_type (void) G_GNUC_CONST;
-GType jsdoc_token_get_type (void) G_GNUC_CONST;
-GType jsdoc_collapse_get_type (void) G_GNUC_CONST;
-GType jsdoc_packer_get_type (void) G_GNUC_CONST;
-JSDOCCollapse* jsdoc_collapse_new (GeeArrayList* tokens, JSDOCPacker* pk, const gchar* filename);
-JSDOCCollapse* jsdoc_collapse_construct (GType object_type, GeeArrayList* tokens, JSDOCPacker* pk, const gchar* filename);
-GQuark jsdoc_compress_white_error_quark (void);
-gchar* jsdoc_CompressWhite (JSDOCTokenStream* ts, JSDOCPacker* packer, gboolean keepWhite);
-GType jsdoc_identifier_get_type (void) G_GNUC_CONST;
-GType jsdoc_scope_get_type (void) G_GNUC_CONST;
-JSDOCIdentifier* jsdoc_identifier_new (const gchar* name, JSDOCScope* scope);
-JSDOCIdentifier* jsdoc_identifier_construct (GType object_type, const gchar* name, JSDOCScope* scope);
-GQuark jsdoc_lang_error_quark (void);
-GType jsdoc_langclass_get_type (void) G_GNUC_CONST;
-extern JSDOCLang_Class* jsdoc_Lang;
-JSDOCLang_Class* jsdoc_langclass_new (void);
-JSDOCLang_Class* jsdoc_langclass_construct (GType object_type);
-gboolean jsdoc_langclass_isBuiltin (JSDOCLang_Class* self, const gchar* name);
-gchar* jsdoc_langclass_whitespace (JSDOCLang_Class* self, const gchar* ch);
-gchar* jsdoc_langclass_newline (JSDOCLang_Class* self, const gchar* ch);
-GType jsdoc_token_name_get_type (void) G_GNUC_CONST;
-JSDOCTokenName jsdoc_langclass_keyword (JSDOCLang_Class* self, const gchar* word, GError** error);
-JSDOCTokenName* jsdoc_langclass_matching (JSDOCLang_Class* self, JSDOCTokenName name, GError** error);
-gboolean jsdoc_langclass_isKeyword (JSDOCLang_Class* self, const gchar* word);
-JSDOCTokenName jsdoc_langclass_puncFirstString (JSDOCLang_Class* self, gchar ch);
-JSDOCTokenName jsdoc_langclass_puncString (JSDOCLang_Class* self, const gchar* ch);
-gboolean jsdoc_langclass_isNumber (JSDOCLang_Class* self, const gchar* str);
-gboolean jsdoc_langclass_isHexDec (JSDOCLang_Class* self, const gchar* str);
-gboolean jsdoc_langclass_isWordString (JSDOCLang_Class* self, const gchar* str);
-gboolean jsdoc_langclass_isWordChar (JSDOCLang_Class* self, gchar c);
-gboolean jsdoc_langclass_isSpace (JSDOCLang_Class* self, const gchar* str);
-gboolean jsdoc_langclass_isSpaceC (JSDOCLang_Class* self, gchar str);
-gboolean jsdoc_langclass_isNewline (JSDOCLang_Class* self, const gchar* str);
-gboolean jsdoc_langclass_isNewlineC (JSDOCLang_Class* self, gchar str);
-gboolean jsdoc_langclass_isBoolean (JSDOCLang_Class* self, const gchar* str);
-GQuark jsdoc_packer_error_quark (void);
-GType jsdoc_packer_run_get_type (void) G_GNUC_CONST;
-GType jsdoc_packer_result_type_get_type (void) G_GNUC_CONST;
-gchar* jsdoc_packer_result_type_to_string (JSDOCPackerResultType self);
-JSDOCPacker* jsdoc_packer_new (JSDOCPackerRun* config);
-JSDOCPacker* jsdoc_packer_construct (GType object_type, JSDOCPackerRun* config);
-void jsdoc_packer_logError (JSDOCPacker* self, JSDOCPackerResultType type, const gchar* filename, gint line, const gchar* message);
-gboolean jsdoc_packer_hasErrors (JSDOCPacker* self, const gchar* fn);
-void jsdoc_packer_dumpErrors (JSDOCPacker* self, JSDOCPackerResultType type);
-void jsdoc_packer_loadSourceIndexes (JSDOCPacker* self, GeeArrayList* indexes);
-void jsdoc_packer_loadFiles (JSDOCPacker* self, gchar** fs, int fs_length1);
-void jsdoc_packer_loadFile (JSDOCPacker* self, const gchar* f);
-gchar* jsdoc_packer_pack (JSDOCPacker* self, const gchar* target, const gchar* targetDebug, GError** error);
-void jsdoc_packer_loadSourceIndex (JSDOCPacker* self, const gchar* in_srcfile);
-gchar* jsdoc_packer_packFile (JSDOCPacker* self, const gchar* str, const gchar* fn, const gchar* minfile);
-gchar* jsdoc_packer_md5 (JSDOCPacker* self, const gchar* str);
-GType jsdoc_scope_parser_mode_get_type (void) G_GNUC_CONST;
-GType jsdoc_scope_parser_get_type (void) G_GNUC_CONST;
-JSDOCScopeParser* jsdoc_scope_parser_new (JSDOCTokenStream* ts, JSDOCPacker* packer, const gchar* filename);
-JSDOCScopeParser* jsdoc_scope_parser_construct (GType object_type, JSDOCTokenStream* ts, JSDOCPacker* packer, const gchar* filename);
-void jsdoc_scope_parser_buildSymbolTree (JSDOCScopeParser* self);
-void jsdoc_scope_parser_mungeSymboltree (JSDOCScopeParser* self);
-void jsdoc_scope_parser_printWarnings (JSDOCScopeParser* self);
-extern gint jsdoc_Scope_gid;
-extern GeeArrayList* jsdoc_scope_builtin;
-extern GeeArrayList* jsdoc_scope_skips;
-extern gchar** jsdoc_scope_ones;
-extern gint jsdoc_scope_ones_length1;
-extern gchar** jsdoc_scope_twos;
-extern gint jsdoc_scope_twos_length1;
-JSDOCScope* jsdoc_scope_new (gint braceN, JSDOCScope* parent, gint startTokN, const gchar* lastIdent, JSDOCToken* token);
-JSDOCScope* jsdoc_scope_construct (GType object_type, gint braceN, JSDOCScope* parent, gint startTokN, const gchar* lastIdent, JSDOCToken* token);
-void jsdoc_scope_dump (JSDOCScope* self, const gchar* indent);
-JSDOCIdentifier* jsdoc_scope_declareIdentifier (JSDOCScope* self, const gchar* symbol, JSDOCToken* token);
-JSDOCIdentifier* jsdoc_scope_getIdentifier (JSDOCScope* self, const gchar* symbol, JSDOCToken* token);
-void jsdoc_scope_addHint (JSDOCScope* self, const gchar* varName, const gchar* varType);
-void jsdoc_scope_preventMunging (JSDOCScope* self);
-gchar** jsdoc_scope_getUsedSymbols (JSDOCScope* self, int* result_length1);
-void jsdoc_scope_addToParentScope (JSDOCScope* self, const gchar* ident);
-gboolean jsdoc_scope_isProtectedVar (JSDOCScope* self, const gchar* ident);
-void jsdoc_scope_munge (JSDOCScope* self);
-GType jsdoc_text_stream_char_get_type (void) G_GNUC_CONST;
-JSDOCTextStreamChar* jsdoc_text_stream_char_new (gchar val, gboolean eof);
-JSDOCTextStreamChar* jsdoc_text_stream_char_construct (GType object_type, gchar val, gboolean eof);
-GType jsdoc_text_stream_get_type (void) G_GNUC_CONST;
-JSDOCTextStream* jsdoc_text_stream_new (const gchar* text);
-JSDOCTextStream* jsdoc_text_stream_construct (GType object_type, const gchar* text);
-gchar* jsdoc_text_stream_lookS (JSDOCTextStream* self, gint n);
-gchar jsdoc_text_stream_lookC (JSDOCTextStream* self, gint n);
-gboolean jsdoc_text_stream_lookEOF (JSDOCTextStream* self, gint n);
-gchar* jsdoc_text_stream_nextS (JSDOCTextStream* self, gint n);
-gchar jsdoc_text_stream_nextC (JSDOCTextStream* self);
-GType jsdoc_token_array_get_type (void) G_GNUC_CONST;
-GType jsdoc_token_reader_get_type (void) G_GNUC_CONST;
-JSDOCTokenArray* jsdoc_token_array_new (JSDOCPacker* packer, JSDOCTokenReader* reader);
-JSDOCTokenArray* jsdoc_token_array_construct (GType object_type, JSDOCPacker* packer, JSDOCTokenReader* reader);
-JSDOCToken* jsdoc_token_array_last (JSDOCTokenArray* self);
-JSDOCToken* jsdoc_token_array_lastSym (JSDOCTokenArray* self);
-void jsdoc_token_array_push (JSDOCTokenArray* self, JSDOCToken* t);
-JSDOCToken* jsdoc_token_array_pop (JSDOCTokenArray* self);
-JSDOCToken* jsdoc_token_array_get (JSDOCTokenArray* self, gint i);
-void jsdoc_token_array_dump (JSDOCTokenArray* self);
-gint jsdoc_token_array_get_length (JSDOCTokenArray* self);
-GQuark jsdoc_tokenreader_error_quark (void);
-JSDOCTokenReader* jsdoc_token_reader_new (JSDOCPacker* packer);
-JSDOCTokenReader* jsdoc_token_reader_construct (GType object_type, JSDOCPacker* packer);
-JSDOCTokenArray* jsdoc_token_reader_tokenize (JSDOCTokenReader* self, JSDOCTextStream* stream);
-gint jsdoc_token_reader_findPuncToken (JSDOCTokenReader* self, JSDOCTokenArray* tokens, const gchar* data, gint n);
-JSDOCToken* jsdoc_token_reader_lastSym (JSDOCTokenReader* self, JSDOCTokenArray* tokens, gint n);
-gboolean jsdoc_token_reader_read_word (JSDOCTokenReader* self, JSDOCTextStream* stream, JSDOCTokenArray* tokens);
-gboolean jsdoc_token_reader_read_punc (JSDOCTokenReader* self, JSDOCTextStream* stream, JSDOCTokenArray* tokens);
-gboolean jsdoc_token_reader_read_space (JSDOCTokenReader* self, JSDOCTextStream* stream, JSDOCTokenArray* tokens);
-gboolean jsdoc_token_reader_read_newline (JSDOCTokenReader* self, JSDOCTextStream* stream, JSDOCTokenArray* tokens);
-gboolean jsdoc_token_reader_read_mlcomment (JSDOCTokenReader* self, JSDOCTextStream* stream, JSDOCTokenArray* tokens);
-gboolean jsdoc_token_reader_read_slcomment (JSDOCTokenReader* self, JSDOCTextStream* stream, JSDOCTokenArray* tokens);
-gboolean jsdoc_token_reader_read_dbquote (JSDOCTokenReader* self, JSDOCTextStream* stream, JSDOCTokenArray* tokens);
-gboolean jsdoc_token_reader_read_snquote (JSDOCTokenReader* self, JSDOCTextStream* stream, JSDOCTokenArray* tokens);
-gboolean jsdoc_token_reader_read_numb (JSDOCTokenReader* self, JSDOCTextStream* stream, JSDOCTokenArray* tokens);
-gboolean jsdoc_token_reader_read_hex (JSDOCTokenReader* self, JSDOCTextStream* stream, JSDOCTokenArray* tokens);
-gboolean jsdoc_token_reader_read_regx (JSDOCTokenReader* self, JSDOCTextStream* stream, JSDOCTokenArray* tokens);
-GQuark jsdoc_token_stream_error_quark (void);
-JSDOCTokenStream* jsdoc_token_stream_new (GeeArrayList* tokens);
-JSDOCTokenStream* jsdoc_token_stream_construct (GType object_type, GeeArrayList* tokens);
-GeeArrayList* jsdoc_token_stream_toArray (JSDOCTokenStream* self);
-void jsdoc_token_stream_rewind (JSDOCTokenStream* self);
-JSDOCToken* jsdoc_token_stream_look (JSDOCTokenStream* self, gint n, gboolean considerWhitespace);
-JSDOCToken* jsdoc_token_stream_lookAny (JSDOCTokenStream* self, gint n);
-gint jsdoc_token_stream_lookFor (JSDOCTokenStream* self, const gchar* data);
-JSDOCToken* jsdoc_token_stream_lookTok (JSDOCTokenStream* self, gint n);
-JSDOCToken* jsdoc_token_stream_next (JSDOCTokenStream* self);
-GeeArrayList* jsdoc_token_stream_nextM (JSDOCTokenStream* self, gint howMany, GError** error);
-JSDOCToken* jsdoc_token_stream_nextTok (JSDOCTokenStream* self);
-JSDOCToken* jsdoc_token_stream_nextNonSpace (JSDOCTokenStream* self);
-GeeArrayList* jsdoc_token_stream_balance (JSDOCTokenStream* self, JSDOCTokenName in_start, GError** error);
-JSDOCToken* jsdoc_token_stream_getMatchingTokenEnd (JSDOCTokenStream* self, JSDOCTokenName end);
-JSDOCToken* jsdoc_token_stream_getMatchingToken (JSDOCTokenStream* self, JSDOCTokenName start, gint depth);
-GeeArrayList* jsdoc_token_stream_remaining (JSDOCTokenStream* self);
-void jsdoc_token_stream_printRange (JSDOCTokenStream* self, gint start, gint end);
-void jsdoc_token_stream_dump (JSDOCTokenStream* self, gint start, gint end);
-void jsdoc_token_stream_dumpAll (JSDOCTokenStream* self, const gchar* indent);
-void jsdoc_token_stream_dumpAllFlat (JSDOCTokenStream* self);
-GType jsdoc_token_type_get_type (void) G_GNUC_CONST;
-GType jsdoc_token_key_map_get_type (void) G_GNUC_CONST;
-JSDOCTokenKeyMap* jsdoc_token_key_map_new (void);
-JSDOCTokenKeyMap* jsdoc_token_key_map_construct (GType object_type);
-JSDOCToken* jsdoc_token_new (const gchar* data, JSDOCTokenType type, JSDOCTokenName name, gint line);
-JSDOCToken* jsdoc_token_construct (GType object_type, const gchar* data, JSDOCTokenType type, JSDOCTokenName name, gint line);
-gchar* jsdoc_token_asString (JSDOCToken* self);
-void jsdoc_token_dump (JSDOCToken* self, const gchar* indent);
-gchar* jsdoc_token_toRaw (JSDOCToken* self, gint lvl);
-gboolean jsdoc_token_isName (JSDOCToken* self, JSDOCTokenName what);
-gboolean jsdoc_token_isType (JSDOCToken* self, JSDOCTokenType what);
-JSDOCPackerRun* jsdoc_packer_run_singleton (void);
-JSDOCPackerRun* jsdoc_packer_run_new (void);
-JSDOCPackerRun* jsdoc_packer_run_construct (GType object_type);
-void jsdoc_packer_run_parseArgs (JSDOCPackerRun* self, gchar** args, int args_length1);
-void jsdoc_packer_run_runPack (JSDOCPackerRun* self);
-GType jsdoc_walker_get_type (void) G_GNUC_CONST;
-JSDOCWalker* jsdoc_walker_new (JSDOCTokenStream* ts);
-JSDOCWalker* jsdoc_walker_construct (GType object_type, JSDOCTokenStream* ts);
-void jsdoc_walker_buildSymbolTree (JSDOCWalker* self);
-GType jsdoc_symbol_set_get_type (void) G_GNUC_CONST;
-JSDOCSymbolSet* jsdoc_symbol_set_new (void);
-JSDOCSymbolSet* jsdoc_symbol_set_construct (GType object_type);
-GeeArrayList* jsdoc_symbol_set_keys (JSDOCSymbolSet* self);
-GType jsdoc_symbol_get_type (void) G_GNUC_CONST;
-GeeArrayList* jsdoc_symbol_set_values (JSDOCSymbolSet* self);
-gboolean jsdoc_symbol_set_hasSymbol (JSDOCSymbolSet* self, const gchar* alias);
-void jsdoc_symbol_set_addSymbol (JSDOCSymbolSet* self, JSDOCSymbol* symbol);
-JSDOCSymbol* jsdoc_symbol_set_getSymbol (JSDOCSymbolSet* self, const gchar* alias);
-void jsdoc_symbol_set_deleteSymbol (JSDOCSymbolSet* self, const gchar* alias);
-gchar* jsdoc_symbol_set_renameSymbol (JSDOCSymbolSet* self, const gchar* oldName, const gchar* newName);
-void jsdoc_symbol_set_relate (JSDOCSymbolSet* self);
-gboolean jsdoc_symbol_set_isBuiltin (const gchar* name);
-GeeHashMap* jsdoc_symbol_set_get__index (JSDOCSymbolSet* self);
-GType jsdoc_doc_comment_get_type (void) G_GNUC_CONST;
-GType jsdoc_doc_tag_get_type (void) G_GNUC_CONST;
-extern gchar* jsdoc_doc_comment_shared;
-JSDOCDocComment* jsdoc_doc_comment_new (const gchar* comment);
-JSDOCDocComment* jsdoc_doc_comment_construct (GType object_type, const gchar* comment);
-gchar* jsdoc_doc_comment_unwrapComment (const gchar* comment);
-GType jsdoc_doc_tag_title_get_type (void) G_GNUC_CONST;
-GeeArrayList* jsdoc_doc_comment_getTag (JSDOCDocComment* self, JSDOCDocTagTitle tagTitle);
-gchar* jsdoc_doc_comment_getTagAsString (JSDOCDocComment* self, JSDOCDocTagTitle tagTitle);
-GType jsdoc_doc_parser_get_type (void) G_GNUC_CONST;
-extern gchar* jsdoc_doc_parser_currentSourceFile;
-JSDOCSymbolSet* jsdoc_doc_parser_symbols (void);
-void jsdoc_doc_parser_parse (JSDOCTokenStream* ts, const gchar* srcFile);
-void jsdoc_doc_parser_addSymbol (JSDOCSymbol* symbol);
-JSDOCSymbol* jsdoc_doc_parser_addBuiltin (const gchar* name);
-void jsdoc_doc_parser_finish (void);
-JSDOCDocParser* jsdoc_doc_parser_new (void);
-JSDOCDocParser* jsdoc_doc_parser_construct (GType object_type);
-gchar* jsdoc_doc_tag_asString (JSDOCDocTag* self);
-JSDOCDocTag* jsdoc_doc_tag_new (const gchar* in_src);
-JSDOCDocTag* jsdoc_doc_tag_construct (GType object_type, const gchar* in_src);
-JsonArray* jsdoc_doc_tag_optvalue_as_json_array (JSDOCDocTag* self);
-extern gboolean jsdoc_symbol_regex_init;
-extern gchar* jsdoc_symbol_srcFile;
-gchar* jsdoc_symbol_asString (JSDOCSymbol* self);
-void jsdoc_symbol_initArrays (JSDOCSymbol* self);
-JSDOCSymbol* jsdoc_symbol_new_new_builtin (const gchar* name);
-JSDOCSymbol* jsdoc_symbol_construct_new_builtin (GType object_type, const gchar* name);
-JSDOCSymbol* jsdoc_symbol_new_new_populate_with_args (const gchar* name, GeeArrayList* params, const gchar* isa, JSDOCDocComment* comment);
-JSDOCSymbol* jsdoc_symbol_construct_new_populate_with_args (GType object_type, const gchar* name, GeeArrayList* params, const gchar* isa, JSDOCDocComment* comment);
-gboolean jsdoc_symbol_is (JSDOCSymbol* self, const gchar* what);
-gboolean jsdoc_symbol_isaClass (JSDOCSymbol* self);
-gboolean jsdoc_symbol_isBuiltin (JSDOCSymbol* self);
-void jsdoc_symbol_inherit (JSDOCSymbol* self, JSDOCSymbol* symbol);
-void jsdoc_symbol_addMember (JSDOCSymbol* self, JSDOCSymbol* symbol);
-void jsdoc_symbol_addDocTag (JSDOCSymbol* self, JSDOCDocTag* docTag);
-void jsdoc_symbol_addConfig (JSDOCSymbol* self, JSDOCDocTag* docTag);
-GeeArrayList* jsdoc_symbol_configToArray (JSDOCSymbol* self);
-gchar* jsdoc_symbol_makeFuncSkel (JSDOCSymbol* self);
-gchar* jsdoc_symbol_makeMethodSkel (JSDOCSymbol* self);
-JsonArray* jsdoc_symbol_paramsToJson (JSDOCSymbol* self);
-JsonArray* jsdoc_symbol_returnsToJson (JSDOCSymbol* self);
-JSDOCSymbol* jsdoc_symbol_new (void);
-JSDOCSymbol* jsdoc_symbol_construct (GType object_type);
-void jsdoc_symbol_set_private_name (JSDOCSymbol* self, const gchar* value);
-const gchar* jsdoc_symbol_get_name (JSDOCSymbol* self);
-GeeArrayList* jsdoc_symbol_get_params (JSDOCSymbol* self);
-
-
-G_END_DECLS
-
-#endif
diff --git a/src/roojspacker-1.2.vapi b/src/roojspacker-1.2.vapi
deleted file mode 100644 (file)
index 89ef44a..0000000
+++ /dev/null
@@ -1,480 +0,0 @@
-/* roojspacker-1.2.vapi generated by valac 0.36.6, do not modify. */
-
-namespace JSDOC {
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class Collapse : JSDOC.TokenStream {
-               public Collapse (Gee.ArrayList<JSDOC.Token> tokens, JSDOC.Packer pk, string filename);
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class DocComment : GLib.Object {
-               public bool hasTags;
-               public bool isUserComment;
-               public static string shared;
-               public string src;
-               public Gee.ArrayList<JSDOC.DocTag> tags;
-               public DocComment (string comment = "");
-               public Gee.ArrayList<JSDOC.DocTag> getTag (JSDOC.DocTagTitle tagTitle);
-               public string getTagAsString (JSDOC.DocTagTitle tagTitle);
-               public static string unwrapComment (string comment);
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class DocParser : GLib.Object {
-               public static string currentSourceFile;
-               public DocParser ();
-               public static JSDOC.Symbol addBuiltin (string name);
-               public static void addSymbol (JSDOC.Symbol symbol);
-               public static void finish ();
-               public static void parse (JSDOC.TokenStream ts, string srcFile);
-               public static JSDOC.SymbolSet symbols ();
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class DocTag : GLib.Object {
-               public string defaultValue;
-               public string desc;
-               public bool isOptional;
-               public string memberOf;
-               public string name;
-               public Gee.ArrayList<string> optvalues;
-               public JSDOC.DocTagTitle title;
-               public string type;
-               public DocTag (string in_src);
-               public string asString ();
-               public Json.Array optvalue_as_json_array ();
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class Identifier : GLib.Object {
-               public string mungedValue;
-               public string name;
-               public int refcount;
-               public JSDOC.Scope scope;
-               public bool toMunge;
-               public Identifier (string name, JSDOC.Scope scope);
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class Lang_Class : GLib.Object {
-               public Lang_Class ();
-               public bool isBoolean (string str);
-               public bool isBuiltin (string name);
-               public bool isHexDec (string str);
-               public bool isKeyword (string word);
-               public bool isNewline (string str);
-               public bool isNewlineC (char str);
-               public bool isNumber (string str);
-               public bool isSpace (string str);
-               public bool isSpaceC (char str);
-               public bool isWordChar (char c);
-               public bool isWordString (string str);
-               public JSDOC.TokenName keyword (string word) throws JSDOC.LangError;
-               public JSDOC.TokenName? matching (JSDOC.TokenName name) throws JSDOC.LangError;
-               public string newline (string ch);
-               public JSDOC.TokenName puncFirstString (char ch);
-               public JSDOC.TokenName puncString (string ch);
-               public string whitespace (string ch);
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class Packer : GLib.Object {
-               public enum ResultType {
-                       err,
-                       warn;
-                       public string to_string ();
-               }
-               public string activeFile;
-               public JSDOC.PackerRun config;
-               public Gee.ArrayList<string> files;
-               public string outstr;
-               public Json.Object result;
-               public Packer (JSDOC.PackerRun config);
-               public void dumpErrors (JSDOC.Packer.ResultType type);
-               public bool hasErrors (string fn);
-               public void loadFile (string f);
-               public void loadFiles (string[] fs);
-               public void loadSourceIndex (string in_srcfile);
-               public void loadSourceIndexes (Gee.ArrayList<string> indexes);
-               public void logError (JSDOC.Packer.ResultType type, string filename, int line, string message);
-               public string md5 (string str);
-               public string pack (string target, string targetDebug = "") throws JSDOC.PackerError;
-               public string packFile (string str, string fn, string minfile);
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class PackerRun : GLib.Application {
-               public bool opt_clean_cache;
-               public bool opt_debug;
-               public string opt_debug_target;
-               public string opt_doc_ext;
-               public bool opt_doc_include_private;
-               public string opt_doc_target;
-               public string opt_doc_template_dir;
-               public bool opt_dump_tokens;
-               public bool opt_keep_whitespace;
-               public string opt_real_basedir;
-               public bool opt_skip_scope;
-               public string opt_target;
-               public PackerRun ();
-               public void parseArgs (string[] args);
-               public void runPack ();
-               public static JSDOC.PackerRun singleton ();
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class Scope : GLib.Object {
-               public static Gee.ArrayList<string> builtin;
-               public string ident;
-               public static string[] ones;
-               public JSDOC.Scope parent;
-               public static Gee.ArrayList<string> skips;
-               public Gee.ArrayList<JSDOC.Scope> subScopes;
-               public static string[] twos;
-               public Scope (int braceN, JSDOC.Scope? parent, int startTokN, string lastIdent, JSDOC.Token? token);
-               public void addHint (string varName, string varType);
-               public void addToParentScope (string ident);
-               public JSDOC.Identifier declareIdentifier (string symbol, JSDOC.Token token);
-               public void dump (string indent = "");
-               public JSDOC.Identifier? getIdentifier (string symbol, JSDOC.Token token);
-               public string[] getUsedSymbols ();
-               public bool isProtectedVar (string ident);
-               public void munge ();
-               public void preventMunging ();
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class ScopeParser : GLib.Object {
-               public ScopeParser (JSDOC.TokenStream ts, JSDOC.Packer packer, string filename);
-               public void buildSymbolTree ();
-               public void mungeSymboltree ();
-               public void printWarnings ();
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class Symbol : GLib.Object {
-               public string alias;
-               public Gee.ArrayList<string> augments;
-               public Gee.HashMap<string,JSDOC.DocTag> cfgs;
-               public Gee.ArrayList<string> childClasses;
-               public JSDOC.DocComment comment;
-               public string desc;
-               public Gee.ArrayList<string> inheritsFrom;
-               public bool isConstant;
-               public bool isEvent;
-               public bool isIgnored;
-               public bool isInner;
-               public bool isNamespace;
-               public bool isPrivate;
-               public bool isStatic;
-               public string isa;
-               public string memberOf;
-               public Gee.ArrayList<JSDOC.Symbol> methods;
-               public Gee.ArrayList<JSDOC.Symbol> properties;
-               public static bool regex_init;
-               public Gee.ArrayList<JSDOC.DocTag> returns;
-               public static string srcFile;
-               public Symbol ();
-               public void addConfig (JSDOC.DocTag docTag);
-               public void addDocTag (JSDOC.DocTag docTag);
-               public void addMember (JSDOC.Symbol symbol);
-               public string asString ();
-               public Gee.ArrayList<JSDOC.DocTag> configToArray ();
-               public void inherit (JSDOC.Symbol symbol);
-               public void initArrays ();
-               public bool @is (string what);
-               public bool isBuiltin ();
-               public bool isaClass ();
-               public string makeFuncSkel ();
-               public string makeMethodSkel ();
-               public Symbol.new_builtin (string name);
-               public Symbol.new_populate_with_args (string name, Gee.ArrayList<string> @params, string isa, JSDOC.DocComment comment);
-               public Json.Array paramsToJson ();
-               public Json.Array returnsToJson ();
-               public string name { get; }
-               public Gee.ArrayList<JSDOC.DocTag> @params { get; }
-               public string private_name { set; }
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class SymbolSet : GLib.Object {
-               public SymbolSet ();
-               public void addSymbol (JSDOC.Symbol symbol);
-               public void deleteSymbol (string alias);
-               public JSDOC.Symbol? getSymbol (string alias);
-               public bool hasSymbol (string alias);
-               public static bool isBuiltin (string name);
-               public Gee.ArrayList<string> keys ();
-               public void relate ();
-               public string renameSymbol (string oldName, string newName);
-               public Gee.ArrayList<JSDOC.Symbol> values ();
-               public Gee.HashMap<string,JSDOC.Symbol> _index { get; }
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class TextStream : GLib.Object {
-               public TextStream (string text = "");
-               public char lookC (int n = 0);
-               public bool lookEOF (int n = 0);
-               public string lookS (int n = 0);
-               public char nextC ();
-               public string nextS (int n = 1);
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class TextStreamChar : GLib.Object {
-               public char c;
-               public bool eof;
-               public TextStreamChar (char val, bool eof = false);
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class Token : GLib.Object {
-               public string data;
-               public int id;
-               public JSDOC.Identifier identifier;
-               public Gee.ArrayList<Gee.ArrayList<JSDOC.Token>> items;
-               public Gee.ArrayList<string> keyseq;
-               public int line;
-               public JSDOC.TokenName name;
-               public string outData;
-               public string prefix;
-               public Gee.HashMap<string,JSDOC.TokenKeyMap> props;
-               public JSDOC.TokenType type;
-               public Token (string data, JSDOC.TokenType type, JSDOC.TokenName name, int line = -1);
-               public string asString ();
-               public void dump (string indent);
-               public bool isName (JSDOC.TokenName what);
-               public bool isType (JSDOC.TokenType what);
-               public string toRaw (int lvl = 0);
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class TokenArray : GLib.Object {
-               public Gee.ArrayList<JSDOC.Token> tokens;
-               public TokenArray (JSDOC.Packer? packer, JSDOC.TokenReader reader);
-               public void dump ();
-               public new JSDOC.Token @get (int i);
-               public JSDOC.Token? last ();
-               public JSDOC.Token? lastSym ();
-               public JSDOC.Token? pop ();
-               public void push (JSDOC.Token t);
-               public int length { get; }
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class TokenKeyMap : GLib.Object {
-               public JSDOC.Token key;
-               public Gee.ArrayList<JSDOC.Token> vals;
-               public TokenKeyMap ();
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class TokenReader : GLib.Object {
-               public bool collapseWhite;
-               public string filename;
-               public bool ignoreBadGrammer;
-               public bool keepComments;
-               public bool keepDocs;
-               public bool keepWhite;
-               public bool sepIdents;
-               public TokenReader (JSDOC.Packer? packer);
-               public int findPuncToken (JSDOC.TokenArray tokens, string data, int n);
-               public JSDOC.Token? lastSym (JSDOC.TokenArray tokens, int n);
-               public bool read_dbquote (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
-               public bool read_hex (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
-               public bool read_mlcomment (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
-               public bool read_newline (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
-               public bool read_numb (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
-               public bool read_punc (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
-               public bool read_regx (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
-               public bool read_slcomment (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
-               public bool read_snquote (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
-               public bool read_space (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
-               public bool read_word (JSDOC.TextStream stream, JSDOC.TokenArray tokens);
-               public JSDOC.TokenArray tokenize (JSDOC.TextStream stream);
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class TokenStream : GLib.Object {
-               public int cursor;
-               protected Gee.ArrayList<JSDOC.Token> tokens;
-               public TokenStream (Gee.ArrayList<JSDOC.Token> tokens);
-               public Gee.ArrayList<JSDOC.Token> balance (JSDOC.TokenName in_start) throws JSDOC.TokenStreamError;
-               public void dump (int start, int end);
-               public void dumpAll (string indent);
-               public void dumpAllFlat ();
-               public JSDOC.Token? getMatchingToken (JSDOC.TokenName start, int depth = 0);
-               public JSDOC.Token? getMatchingTokenEnd (JSDOC.TokenName end);
-               public JSDOC.Token? look (int n, bool considerWhitespace);
-               public JSDOC.Token lookAny (int n);
-               public int lookFor (string data);
-               public JSDOC.Token lookTok (int n);
-               public JSDOC.Token? next ();
-               public Gee.ArrayList<JSDOC.Token>? nextM (int howMany) throws JSDOC.TokenStreamError;
-               public JSDOC.Token? nextNonSpace ();
-               public JSDOC.Token? nextTok ();
-               public void printRange (int start, int end);
-               public Gee.ArrayList<JSDOC.Token> remaining ();
-               public void rewind ();
-               public Gee.ArrayList<JSDOC.Token> toArray ();
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public class Walker : GLib.Object {
-               public Walker (JSDOC.TokenStream ts);
-               public void buildSymbolTree ();
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public enum DocTagTitle {
-               NO_VALUE,
-               PARAM,
-               PROPERTY,
-               CFG,
-               EXAMPLE,
-               SINGLETON,
-               AUTHOR,
-               METHOD,
-               DESC,
-               OVERVIEW,
-               SINCE,
-               CONSTANT,
-               VERSION,
-               DEPRECATED,
-               SEE,
-               CLASS,
-               NAMESPACE,
-               CONSTRUCTOR,
-               STATIC,
-               INNER,
-               FIELD,
-               FUNCTION,
-               EVENT,
-               NAME,
-               RETURN,
-               THROWS,
-               REQUIRES,
-               TYPE,
-               PRIVATE,
-               IGNORE,
-               ARGUMENTS,
-               EXTENDS,
-               DEFAULT,
-               MEMBEROF,
-               PUBLIC,
-               SCOPE,
-               SCOPEALIAS
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public enum ScopeParserMode {
-               BUILDING_SYMBOL_TREE,
-               PASS2_SYMBOL_TREE
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public enum TokenName {
-               UNKNOWN_TOKEN,
-               BREAK,
-               CASE,
-               CATCH,
-               CONST,
-               CONTINUE,
-               DEFAULT,
-               DELETE,
-               DO,
-               ELSE,
-               FALSE,
-               FINALLY,
-               FOR,
-               FUNCTION,
-               IF,
-               IN,
-               INSTANCEOF,
-               NEW,
-               NULL,
-               RETURN,
-               SWITCH,
-               THIS,
-               THROW,
-               TRUE,
-               TRY,
-               TYPEOF,
-               VOID,
-               WHILE,
-               WITH,
-               VAR,
-               EVAL,
-               NAME,
-               MULTI_LINE_COMM,
-               JSDOC,
-               SINGLE_LINE_COMM,
-               SEMICOLON,
-               COMMA,
-               HOOK,
-               COLON,
-               OR,
-               AND,
-               BITWISE_OR,
-               BITWISE_XOR,
-               BITWISE_AND,
-               STRICT_EQ,
-               EQ,
-               ASSIGN,
-               STRICT_NE,
-               NE,
-               LSH,
-               LE,
-               LT,
-               URSH,
-               RSH,
-               GE,
-               GT,
-               INCREMENT,
-               DECREMENT,
-               PLUS,
-               MINUS,
-               MUL,
-               DIV,
-               MOD,
-               NOT,
-               BITWISE_NOT,
-               DOT,
-               LEFT_BRACE,
-               RIGHT_BRACE,
-               LEFT_CURLY,
-               RIGHT_CURLY,
-               LEFT_PAREN,
-               RIGHT_PAREN,
-               SPACE,
-               NEWLINE,
-               DOUBLE_QUOTE,
-               SINGLE_QUOTE,
-               OCTAL,
-               DECIMAL,
-               HEX_DEC,
-               REGX,
-               START_OF_STREAM,
-               END_OF_STREAM,
-               UNKNOWN
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public enum TokenType {
-               TOKN,
-               KEYW,
-               NAME,
-               COMM,
-               PUNC,
-               WHIT,
-               STRN,
-               NUMB,
-               REGX,
-               VOID
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public errordomain CompressWhiteError {
-               BRACE
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public errordomain LangError {
-               ArgumentError
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public errordomain PackerError {
-               ArgumentError
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public errordomain TokenReader_Error {
-               ArgumentError,
-               SyntaxError
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public errordomain TokenStreamError {
-               ArgumentError
-       }
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public static JSDOC.Lang_Class Lang;
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public static int Scope_gid;
-       [CCode (cheader_filename = "roojspacker-1.2.h")]
-       public static string CompressWhite (JSDOC.TokenStream ts, JSDOC.Packer packer, bool keepWhite);
-}