[mame] 01/03: Merge tag 'upstream/0.186'

Cesare Falco cesarefalco-guest at moszumanska.debian.org
Sun Jun 4 13:42:27 UTC 2017


This is an automated email from the git hooks/post-receive script.

cesarefalco-guest pushed a commit to branch master
in repository mame.

commit 842703007407fd1bde16f339d6fc45b4dede2cf3
Author: Cesare Falco <c.falco at ubuntu.com>
Date:   Sun Jun 4 08:30:44 2017 +0200

    Merge tag 'upstream/0.186'
---
 .gitignore                                   |    4 +
 debian/changelog                             |  810 +++++++++++++++
 debian/clean                                 |   17 +
 debian/compat                                |    1 +
 debian/control                               |   98 ++
 debian/copyright                             | 1053 +++++++++++++++++++
 debian/install/hicolor/128x128/apps/mame.png |  Bin 0 -> 11184 bytes
 debian/install/hicolor/16x16/apps/mame.png   |  Bin 0 -> 692 bytes
 debian/install/hicolor/22x22/apps/mame.png   |  Bin 0 -> 1016 bytes
 debian/install/hicolor/24x24/apps/mame.png   |  Bin 0 -> 1067 bytes
 debian/install/hicolor/32x32/apps/mame.png   |  Bin 0 -> 1393 bytes
 debian/install/hicolor/48x48/apps/mame.png   |  Bin 0 -> 2293 bytes
 debian/install/hicolor/72x72/apps/mame.png   |  Bin 0 -> 3937 bytes
 debian/install/mame.desktop                  |   19 +
 debian/mame-data.dirs                        |    1 +
 debian/mame-data.install                     |    9 +
 debian/mame-data.lintian-overrides           |    1 +
 debian/mame-doc.doc-base                     |    9 +
 debian/mame-doc.docs                         |    1 +
 debian/mame-doc.links                        |    2 +
 debian/mame-get-roms.sh                      |   45 +
 debian/mame-tools.install                    |    8 +
 debian/mame-tools.manpages                   |    8 +
 debian/mame.README.Debian                    |   85 ++
 debian/mame.dirs                             |    9 +
 debian/mame.examples                         |    3 +
 debian/mame.ini                              |   41 +
 debian/mame.install                          |   11 +
 debian/mame.lintian-overrides                |    3 +
 debian/mame.manpages                         |    1 +
 debian/missing-sources/modernizr.js          | 1393 ++++++++++++++++++++++++++
 debian/patches/avoid_linenoise.patch         |   79 ++
 debian/patches/genie_freebsd_target.patch    | 1038 +++++++++++++++++++
 debian/patches/hurd.patch                    |  127 +++
 debian/patches/kfreebsd_dirent.h_path.patch  |   11 +
 debian/patches/m68000_archopts.patch         |   17 +
 debian/patches/series                        |    6 +
 debian/patches/sphinx_mathjax_location.patch |   19 +
 debian/rules                                 |  281 ++++++
 debian/source/format                         |    1 +
 debian/source/include-binaries               |    7 +
 debian/source/lintian-overrides              |   11 +
 debian/watch                                 |    2 +
 43 files changed, 5231 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..219fce2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/*
+!.gitignore
+!/debian/
+/debian/.pc
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..cf4df64
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,810 @@
+mame (0.185-1) experimental; urgency=medium
+
+  * New upstream release.
+  * Disable genie_freebsd_target.patch, as it gets in the way and kFreeBSD
+    builds are broken in other ways.
+  * Refresh patches.
+
+ -- Jordi Mallach <jordi at debian.org>  Wed, 26 Apr 2017 12:11:22 +0200
+
+mame (0.184-1) experimental; urgency=medium
+
+  * New upstream release.
+
+ -- Jordi Mallach <jordi at debian.org>  Fri, 07 Apr 2017 01:43:05 +0200
+
+mame (0.183-1) experimental; urgency=medium
+
+  * New upstream release.
+  * Drop transitional mess and mess-data packages.
+  * Extend mame-data's description slightly.
+
+ -- Jordi Mallach <jordi at debian.org>  Tue, 07 Mar 2017 21:37:54 +0100
+
+mame (0.182-1) unstable; urgency=medium
+
+  * New upstream release.
+  * Add kfreebsd_dirent.h_path.patch to fix dirent.h include path for
+    kFreeBSD builds (thanks Steven Chamberlain; closes: #852507).
+  * Drop ConvertUTF.* from the tarball as it is under the Unicode
+    non-free license.
+  * Add avoid_linenoise.patch: define NO_USE_LINENOISE and guard uses of
+    linenoise code with it, to avoid the need to compile 3rdparty/linenoise.
+
+ -- Jordi Mallach <jordi at debian.org>  Thu, 26 Jan 2017 01:56:43 +0100
+
+mame (0.181-1) unstable; urgency=medium
+
+  * New upstream release.
+  * Bump debhelper compat to v10.
+  * Refresh patches.
+
+ -- Jordi Mallach <jordi at debian.org>  Wed, 28 Dec 2016 13:01:35 +0100
+
+mame (0.180-1) unstable; urgency=medium
+
+  * New upstream release
+  [ Cesare Falco ]
+  * Refresh patches.
+
+  [ Jordi Mallach ]
+  * Switch back to GCC6 for arm64, as the compiler regression is now fixed.
+
+ -- Jordi Mallach <jordi at debian.org>  Wed, 14 Dec 2016 12:37:35 +0100
+
+mame (0.179-2) unstable; urgency=medium
+
+  * Add -fPIC to arm64 ARCHOPTS to workaround yet another build issue.
+  * Add m68000_archopts.patch: Add $(ARCHOPTS) to compiler invocation in the
+    standalone m68000 makefile.
+
+ -- Jordi Mallach <jordi at debian.org>  Fri, 04 Nov 2016 11:15:21 +0100
+
+mame (0.179-1) unstable; urgency=medium
+
+  * New upstream release.
+  * hurd.patch: use the correct include for pthread_safe().
+  * Build-Depend on and set CC/CXX to gcc-5/g++-5 on arm64, to workaround
+    a GCC 6 bug that causes MAME to FTBFS (closes: #840468).
+  * Demote libjs-sphinxdoc and libjs-mathjax to Suggests, as the docs are
+    still readable without those installed.
+  * Remove testkeys and add floptool to mame-tools' description.
+
+ -- Jordi Mallach <jordi at debian.org>  Thu, 27 Oct 2016 10:30:19 +0200
+
+mame (0.178-1) unstable; urgency=medium
+
+  * New upstream release.
+  * Add Build-Depends-Indep on python3-sphinx.
+  * Build the singlehtml flavour of docs.
+  * Add a new binary package mame-doc and move all the (generated) docs
+    to this package.
+  * Let mame suggest mame-doc.
+  * Exclude the install of jquery.js and underscore.js, and instead
+    depend and symlink to the packaged versions.
+  * Add sphinx_mathjax_location.patch: point at the local filesystem
+    path of the mathjax javascript, to avoid a privacy breach when opening
+    the docs in a browser.
+  * Add Depends on libjs-sphinxdoc and libjs-mathjax.
+  * Register the html docs with doc-base.
+  * Remove obsolete reference to MESS in mame-tools' description.
+  * Add missing patch headers.
+
+ -- Jordi Mallach <jordi at debian.org>  Thu, 29 Sep 2016 02:40:06 +0200
+
+mame (0.177-1) unstable; urgency=medium
+
+  * New upstream release.
+  * Drop x32.patch, merged upstream.
+  * Adapt packaging to massive upstream docs rewrite.
+  * Install whatsnew.txt as upstream changelog.
+  * Enable all hardening options.
+  * Add the non-minified version of modernizr.js to d/missing-sources,
+    taken from the modernizr-2.6.2+ds1-1 Debian source package.
+
+ -- Jordi Mallach <jordi at debian.org>  Tue, 27 Sep 2016 18:15:28 +0200
+
+mame (0.176-3) unstable; urgency=medium
+
+  * Drop Build-Depends on subversion, nothing uses it these days, and it
+    was actually only necessary for get-orig-source target.
+  * Add x32.patch: fix incorrect detection of 64 bit architecture in
+    rapidjson, adding a check for __x86_64__ && __ILP32__, to fix a
+    build error on x32.
+
+ -- Jordi Mallach <jordi at debian.org>  Thu, 18 Aug 2016 18:13:13 +0200
+
+mame (0.176-2) unstable; urgency=medium
+
+  * Brown paper bag time: fix perms for /etc/mame contents in
+    override_dh_fixperms-arch, to fix arch:all builds.
+
+ -- Jordi Mallach <jordi at debian.org>  Thu, 28 Jul 2016 08:45:37 +0200
+
+mame (0.176-1) unstable; urgency=medium
+
+  [ Jordi Mallach ]
+  * New upstream release.
+    - Includes Steven Chamberlain's kfreebsd fixes for several build errors
+      on kfreebsd-*. Many thanks! (closes: #830974)
+    - Includes fixes for ppc64el builds (closes: #825483).
+  * Install bgfx, language, plugins and uismall.bdf files in mame-data.
+    Thanks to Vas Crabb for pointing this out.
+  * Add a override_dh_auto_test that just runs "mame -valid" after the build.
+    For now, make it non-fatal.
+  * Add some additional docs to the mame binary.
+  * Use system libuv.
+  * Install default plugin.ini and ui.ini files as examples.
+  * Add an empty override_dh_auto_build-indep rule, so arch-independent
+    don't actually build the whole thing. Also rename dh_auto_test to
+    their -arch variants.
+  * Add libutil-freebsd-dev to Build-Depends for kfreebsd-any.
+  * Add hurd.patch with some fixes to the build on hurd-i386 systems.
+  * Add a makefile hack to allow building on a "gnu" platform with genie.
+  * Drop remove-m64_flag_for_mips64el_alpha.patch, merged upstream.
+  * Make mame build verbosely by default, without entangling it to DH_VERBOSE.
+  * Remove generated doxygen docs for a 3rdparty module from source (lintian).
+  * Prune more generated binaries from the source tarball (lintian).
+  * Remove unused lintian overrides.
+
+  [ Cesare Falco ]
+  * Improved get-orig-source target
+  * Updated mame.ini files to most recent *path entries
+  * Install samples and additional .ini files as well
+
+ -- Jordi Mallach <jordi at debian.org>  Thu, 28 Jul 2016 07:28:07 +0200
+
+mame (0.175-1) unstable; urgency=medium
+
+  * New upstream release.
+  * Rename and extend mips64el patch to attempt to fix alpha's similar
+    build failure.
+  * Build with included portmidi on kfreebsd-* architectures, as system
+    libportmidi-dev is not available on these.
+  * Add -ldl to LDFLAGS on kFreeBSD to fix an early build failure.
+  * Make GENIEOS=freebsd so the actual genie binary is called.
+
+ -- Jordi Mallach <jordi at debian.org>  Tue, 05 Jul 2016 18:14:40 +0200
+
+mame (0.174-1) unstable; urgency=medium
+
+  [ Cesare Falco ]
+  * New upstream release (LP: #1590678) (LP: #1562705)
+  * Removed patches now included upstream
+  * debian/rules:
+    - x32 has 32bit pointers, split amd64 rule
+    - reduce memory required by ld on all archs (Ubuntu)
+    - remove -g gcc switch when no DEBUG required
+
+  [ Jordi Mallach ]
+  * debian/rules: don't set PTR64 on mips64el.
+  * Add removing-m64_flag_for_mips64el.patch: avoid using -m64 on mips64el
+    to fix a FTBFS. Thanks to Daniel Knezevic for the patch (closes: #827798).
+
+ -- Jordi Mallach <jordi at debian.org>  Mon, 04 Jul 2016 16:05:33 +0200
+
+mame (0.173-6) unstable; urgency=medium
+
+  * Brown paper bag release.
+  * Revert x32 change in -5 that broke amd64 build.
+  * Substitute all uses of DEB_HOST_ARCH with DEB_BUILD_ARCH.
+
+ -- Jordi Mallach <jordi at debian.org>  Sat, 21 May 2016 02:43:43 +0200
+
+mame (0.173-5) unstable; urgency=medium
+
+  * Fix syntax error in arch_ppc_fixes.patch. Hopefully fixes ppc64el build.
+  * Try to fix x32 by defining PTR64 as in amd64.
+
+ -- Jordi Mallach <jordi at debian.org>  Mon, 16 May 2016 11:49:00 +0200
+
+mame (0.173-4) unstable; urgency=medium
+
+  * Define arch bits for alpha, ppc64 and mips64el.
+  * Add arch_ppc_fixes.patch: cherrypick from git to fix compilation on
+    Little Endian PPC targets.
+
+ -- Jordi Mallach <jordi at debian.org>  Sun, 15 May 2016 00:16:30 +0200
+
+mame (0.173-3) experimental; urgency=medium
+
+  * Define DEB_HOST_ARCH_BITS and, if the build is for a 32 bit arch,
+    - pass -g0 as CFLAGS.
+    - pass -Wl,--no-keep-memory to the linker.
+    Hopefully this fixes the build on 32 bit architectures.
+
+ -- Jordi Mallach <jordi at debian.org>  Sat, 14 May 2016 00:06:00 +0200
+
+mame (0.173-2) experimental; urgency=medium
+
+  * Add ftbfs_v60_m_fetch_xor.patch: cherrypick from git to fix a compile
+    error on several Debian architectures.
+  * Define PTR64 and BIGENDIAN for sparc64.
+
+ -- Jordi Mallach <jordi at debian.org>  Fri, 13 May 2016 00:15:16 +0200
+
+mame (0.173-1) unstable; urgency=medium
+
+  [ Cesare Falco ]
+  * debian/rules
+    - Remove dh_override_autoclean, use external debian/clean file instead
+    - Update get-orig-source to better fit upstream repository structure
+    - Now full build log can be requested by setting DH_VERBOSE
+    - Enable build optimizations, they increase performance greatly
+    - Some arch-specific tuning
+  * Removed refs to jquery library, no longer needed
+
+  [ Jordi Mallach ]
+  * New upstream release.
+    - Shows MAME's program name in lowercase in help output (closes: #747859)
+  * Drop date_timestamp.patch, fixed upstream.
+  * Add an additional source lintian override.
+  * Bump Standards-Version to 3.9.8.
+  * Define QT_HOME to /usr/lib/<triplet>/qt5/ and drop qt5_build.patch.
+    Thanks again to Sune Vuorela.
+  * Update copyright file for new sources.
+  * Don't install testkeys, as it no longer exists.
+  * Don't try to cleanup rapidjson non-free bits that are now gone upstream.
+  * Install manpages from new source location.
+  * Don't chmod data dirs unconditionally, use `find -type f` instead to
+    avoid installing dirs with wrong perms.
+  * Remove new binaries and cruft from upstream sources.
+
+ -- Jordi Mallach <jordi at debian.org>  Mon, 02 May 2016 14:20:14 +0200
+
+mame (0.172-1) unstable; urgency=medium
+
+  * New upstream release (closes: #794119).
+    - MAME is now licensed under the GPL-2
+  * Move to main section (closes: #816831).
+  * Massive update of debian/copyright to adapt to licensing changes.
+  * Add License paragraphs for all minor variants of BSD and custom licenses.
+  * Update MESS references in mame-tools' description.
+  * Update Build-Depends:
+    - libportaudio-dev → portaudio19-dev
+    - libqt4-dev → qtbase5-dev
+  * Build against system sqlite3. Define USE_SYSTEM_LIB_SQLITE3=1 and
+    add libsqlite3-dev to B-Ds.
+  * Build against system lua5.3. Define USE_SYSTEM_LIB_LUA passing Debian's
+    Lua5.3 path to the build system, and add liblua5.3-dev to B-Ds
+    (lua-zlib and lua-filesystem still unsupported).
+  * Add date_timestamp.patch: remove date of build, which is pointless and
+    makes the binary non-reproducible.
+  * Make the build verbose and remove obsolete define SDL_LIBVER.
+  * Don't try to install web/* data in mame-data, it no longer exists.
+  * Avoid installing LICENSE files for CC0-1.0.
+  * Add some extra info to mame-tools' short description.
+  * Use secure URLs for Vcs-* fields, and point to cgit instead of gitweb.
+  * Remove mame.menu and install/mame.xpm.
+  * Update Standards-Version to 3.9.7, no changes needed.
+  * Add qt5_build.patch: add -qt5 parametres to all calls of moc and qmake.
+    Patch by Sune Vuorela, thanks!
+  * Remove non-free bits of rapidjson and all generated binaries and files
+    from the orig tarball at get-orig-source rule to appease lintian.
+  * Update debian/mame.ini with some upstream changes to config.
+  * Add lintian overrides for all source issues on 3rdparty modules we don't
+    compile.
+  * Add another source lintian override for a false positive on rapidjson's
+    "The Software shall be used for Good, not Evil" clause.
+
+ -- Jordi Mallach <jordi at debian.org>  Thu, 14 Apr 2016 22:26:53 +0200
+
+mame (0.164-1) unstable; urgency=medium
+
+  * New upstream release
+  * Accomodate to massive upstream make process refactoring:
+    - debian/patches:
+      + Dropped gnu-fixes patch
+    - debian/rules: Reworked makefile variables overrides
+  * After upstream merge of MESS into MAME:
+    - removed mess package
+    - renamed mess-data package to mame-data
+
+ -- Cesare Falco <c.falco at ubuntu.com>  Thu, 28 May 2015 05:49:01 +0200
+
+mame (0.160-1) unstable; urgency=medium
+
+  * New upstream release
+  * debian/patches:
+    - removed man pages updates, contributed upstream
+    - updated gnu-fixes to new source layout
+
+ -- Cesare Falco <c.falco at ubuntu.com>  Fri, 27 Mar 2015 16:03:45 +0100
+
+mame (0.159-1) unstable; urgency=medium
+
+  * New upstream release
+  * debian/patches:
+    - removed tools linkage fix
+    - added man pages updates
+
+ -- Cesare Falco <c.falco at ubuntu.com>  Fri, 27 Feb 2015 08:29:26 +0100
+
+mame (0.158-1) unstable; urgency=medium
+
+  * New upstream release
+  * Fix permissions in mess-data resource files
+  * debian/patches: fix tools linkage against system libraries
+
+ -- Cesare Falco <c.falco at ubuntu.com>  Thu, 05 Feb 2015 09:31:58 +0100
+
+mame (0.157-1) unstable; urgency=medium
+
+  * New upstream release
+  * debian/patches: removed manpages updates, contributed upstream
+
+ -- Cesare Falco <c.falco at ubuntu.com>  Fri, 02 Jan 2015 16:53:49 +0100
+
+mame (0.156-1) unstable; urgency=medium
+
+  * New upstream release
+  * Updated man pages patch
+  * Switch to SDL 2.0 on upstream recommendation
+  * Improved mame.ini consistency by simlinking
+    /usr/share/games/mess/* directories in /usr/share/games/mame/
+
+ -- Cesare Falco <c.falco at ubuntu.com>  Mon, 08 Dec 2014 22:14:47 +0100
+
+mame (0.155-1) unstable; urgency=medium
+
+  * New upstream release
+  * Removed old patches accepted upstream
+  * New patch: fix typos and bump version in manpages
+  * Use system jQuery lib instead of embedded one
+  * Improved menu entries:
+    + Added Keywords= entry in desktop files
+    + Reworked and translated text into italian in desktop files
+    + Added icons and menu file for Mess
+  * Updated get-orig-source, upstream repo moved to Github
+  * Reworked ctrlr dir, including cfg files now distributed upstream
+
+ -- Cesare Falco <c.falco at ubuntu.com>  Mon, 27 Oct 2014 08:25:54 +0100
+
+mame (0.154-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Change dependency to libjpeg-dev. Closes: #765822
+
+ -- Andreas Barth <aba at ayous.org>  Wed, 22 Oct 2014 21:54:14 +0000
+
+mame (0.154-3) unstable; urgency=medium
+
+  [ Cesare Falco ]
+  * Build embedded libportmidi for kfreebsd and hurd archs
+    (libportmidi-dev not available)
+  * Removed lintian warnings:
+    + Fixed License: headers in debian/copyright:
+      - Added some short names
+      - Removed unused paragraph CC-BY-3.0
+    + Improved hardening:
+      - Use dpkg-buildflags in debian/rules
+      - Bump to level 9 in debian/compat
+  * Make specific build options override general ones
+
+  [ Jordi Mallach ]
+  * Switch to libjpeg-dev Build-Dep for the libjpeg-turbo transition
+    (closes: #708716).
+
+ -- Jordi Mallach <jordi at debian.org>  Mon, 20 Oct 2014 11:30:12 +0200
+
+mame (0.154-2) unstable; urgency=medium
+
+  * debian/rules: Reworked arch specific variables (FTBFS arm64 ppc64el)
+
+ -- Cesare Falco <c.falco at ubuntu.com>  Sat, 30 Aug 2014 10:43:04 +0200
+
+mame (0.154-1) UNRELEASED; urgency=medium
+
+  * New upstream release
+  * debian/control:
+    + Bump debhelper version
+    + Added dep on libsqlite3
+  * debian/patches: updated manpages
+
+ -- Cesare Falco <c.falco at ubuntu.com>  Tue, 12 Aug 2014 20:34:04 +0200
+
+mame (0.153-1) UNRELEASED; urgency=low
+
+  * New upstream release
+  * mame-tools: added floptool utility
+  * debian/patches: updated manpages
+
+ -- Cesare Falco <c.falco at ubuntu.com>  Mon, 14 Apr 2014 22:46:19 +0200
+
+mame (0.152-1) UNRELEASED; urgency=low
+
+  * New upstream release
+  * debian/control:
+    + Bump debhelper version
+    + Remove dep on gcc 4.6 (use distro default)
+    + Make dep on QT stricter, 4.7 or more (upstream recommendation)
+    + Add dep on subversion, used by get-orig-source
+  * debian/rules:
+    + get-orig-source: retrieve source from svn (upstream recommendation)
+
+ -- Cesare Falco <c.falco at ubuntu.com>  Tue, 11 Feb 2014 00:05:14 +0100
+
+mame (0.151-1) UNRELEASED; urgency=low
+
+  * New upstream release
+  * debian/patches:
+    - removed manpages updates, accepted upstream
+    - removed hack to set document root, now read from ini files
+
+ -- Cesare Falco <c.falco at ubuntu.com>  Tue, 05 Nov 2013 22:12:38 +0100
+
+mame (0.150-1) UNRELEASED; urgency=low
+
+  * New upstream release
+  * debian/patches:
+    + updated gnu fixes
+    + updated man pages
+    + new: set the internal webserver document root
+
+ -- Cesare Falco <c.falco at ubuntu.com>  Sun, 23 Sep 2013 15:35:55 +0200
+
+mame (0.149-1) UNRELEASED; urgency=low
+
+  * New upstream release
+  * debian/control: updated deps according to new debugger based on QT
+  * debian/patches:
+    + updated gnu fixes
+    + removed check for gcc 4.6 fix, accepted upstream
+    + reworked manpages after forwarding previous patch upstream
+  * debian/rules: removed erase-upstream target
+  * mess-data: updated keymap files location
+
+ -- Cesare Falco <c.falco at ubuntu.com>  Wed, 12 Jun 2013 09:54:12 +0200
+
+mame (0.148-1) experimental; urgency=low
+
+  [ Cesare Falco ]
+  * New upstream release
+  * debian/patches:
+    + Reworked updates to man pages, removed those previously accepted upstream
+    + Fix check for gcc 4.6 in makefile
+  * debian/watch
+    + Download mamexxxs.exe, smaller than mamexxxs.zip
+  * debian/rules:
+    + Unset BUILD_MIDILIB flag to allow linking system Portmidi library
+    + Removed trailing CR stripping, not needed any more by gcc/g++/patch
+    + Reworked get-orig-source for main mame tarball
+  * Removed mess-related man pages, accepted upstream
+  * Split mame-extra stuff into a separate source package
+  * Rearranged distribution of documentation in binary packages
+
+  [ Jordi Mallach ]
+  * Add get-orig-source to PHONY.
+  * Use default compression for the debian tar.
+
+ -- Jordi Mallach <jordi at debian.org>  Thu, 28 Mar 2013 23:51:51 -0500
+
+mame (0.147-2) experimental; urgency=low
+
+  [ Jordi Mallach ]
+  * Fix mame-extra's description.
+  * Add necessary Breaks/Replaces for the nplayers.ini move to mame-extra.
+
+  [ Emmanuel Kasper ]
+  * Removing -mtune=generic build options: optimizing gain is minimal
+    and segfault on i386 may occured if we use it
+
+ -- Jordi Mallach <jordi at debian.org>  Tue, 08 Jan 2013 00:40:39 +0100
+
+mame (0.147-1) experimental; urgency=low
+
+  [ Cesare Falco ]
+  * New upstream release
+  * Updated quilt patches
+  * Removed all transitional packages related to xmame and sdlmame
+  * Mess source imported in Mame project; packages merged accordingly
+  * mame.ini:
+    - pointed hash- and ctrlrpath entries to mess-data directories
+  * mess.ini:
+    - added uimodekey entry (default doesn't work)
+  * New mame-extra packages for additional files:
+    - nplayers.ini (moved from mame)
+    - history.dat (new)
+  * debian/copyright:
+    - added history file
+    - various fixes
+  * debian/rules:
+    - Removed duplicate NOWERROR make variable in debian/rules
+    - Changelogs removed upstream
+    - Added targets for Mess and tools
+    - get-orig-source:
+      + retrieve .exe, significantly smaller than .zip
+      + added rules for history file
+  * debian/watch: added history file
+
+  [ Jon Dowland ]
+  * Remove deprecated dm-upload-allowed from the control file.
+
+  [ Emmanuel Kasper ]
+  * Remove Felix and Ludo from Uploaders, following request in private mail.
+  * Bump Standards-Version to 3.9.4
+
+  [ Jordi Mallach ]
+  * Avoid using xz -9, both for generated tarballs and binaries; gains us
+    little and is a big burden for some buidds.
+
+ -- Jordi Mallach <jordi at debian.org>  Mon, 07 Jan 2013 16:35:27 +0100
+
+mame (0.146-5) unstable; urgency=low
+
+  [ Cesare Falco ]
+  * Replace -march with -mtune=generic gcc flag for compatibility issues
+    with older CPUs (LP: #1063993)
+
+  [ Emmanuel Kasper ]
+  * Add support for parallel building using DEB_BUILD_OPTIONS
+  * Reorganize default paths:
+       $HOME/.mame for ini file and output files
+       $HOME/mame for data search paths
+
+ -- Emmanuel Kasper <emmanuel at libera.cc>  Tue, 13 Nov 2012 22:54:27 +0100
+
+mame (0.146-4) unstable; urgency=low
+
+  * Removes danglink symlink after xmame-sdl,xmame-x,xmame-svga update.
+    closes: bug#687654, #689718
+
+ -- Emmanuel Kasper <emmanuel at libera.cc>  Tue, 09 Oct 2012 19:45:03 +0200
+
+mame (0.146-3) experimental; urgency=low
+
+  * Add preinst script for xmame-x,xmame-sdl,xmame-svga as a fix for #687654
+
+ -- Emmanuel Kasper <emmanuel at libera.cc>  Mon, 08 Oct 2012 15:27:37 +0200
+
+mame (0.146-2) unstable; urgency=low
+
+  [ Cesare Falco ] 
+  * mame.ini: start mame in full screen until issue solved in Ubuntu, see:
+    https://bugs.launchpad.net/ubuntu/+source/mame/+bug/994508
+  * Man page updated to 0.146
+  
+  [ Emmanuel Kasper ]
+  * Default gcc optimize flag switched to -O2 (-O3 segfaults on arm and i386)
+
+ -- Emmanuel Kasper <emmanuel at libera.cc>  Thu, 19 Jul 2012 22:15:16 +0200
+
+mame (0.146-1) unstable; urgency=low
+
+  [ Emmanuel Kasper ]
+  * New upstream release
+  * Drop patch to fix man pages section and patches to link with flac 
+    and jpeg system lib: all this has been pushed upstream by Cesare Falco
+  * Add DM-Upload-Allowed: yes field.
+
+  [ Jordi Mallach ]
+  * Create a "gnu" TARGETOS stanza that defines NO_AFFINITY_NP.
+  * Stop setting TARGETOS to "unix" in d/rules. It should be autodetected,
+    and set to the appropriate value.
+  * mame_manpage_section.patch: Change mame's manpage section to 6 (games),
+    in the TH declaration.
+
+ -- Jordi Mallach <jordi at debian.org>  Tue, 05 Jun 2012 20:02:23 +0200
+
+mame (0.145-1) unstable; urgency=low
+
+  [ Emmanuel Kasper ]
+  * New upstream release (closes: #663429)
+  * New patch: makefile switch to link system flac library
+  * Remove "all" from build target as we build the tools in mess package
+  * Yet another batch of syntax errors in DEP5 copyright file corrected
+
+  [ Cesare Falco ]
+  * Improve backward compatibility in Ubuntu:
+    * Added /usr/local/* paths in mame.ini
+    * Some cleanup and refactoring in control
+  * Make lintian happier:
+    * Included BSD licence in copyright
+    * Fixed Section: header in control
+  * New patch: makefile switch to link system jpeg library
+  * Packaged nplayers as a supplemental tarball
+  * Removed references to mess
+    * Swept out any remaining debris in debian/*
+    * Don't compile tools, as mame-tools is now build by mess
+
+  [ Jordi Mallach ]
+  * gnu_fixes.patch: Add a check for __GNU__ to fix builds on the Hurd.
+  * Point to the 1.0 machine-readable copyright format spec.
+  * Make get-orig-source target drop tarballs in the current directory,
+    as policy mandates.
+  * Bump Standards-Version to 3.9.3.
+  * Remove leading slashes from mame.dirs.
+  * Add back Section field for transitional packages, but switch to oldlibs
+    (as opposed to metapackages), which apparently is what everyone is doing
+    due to lintian.
+
+ -- Jordi Mallach <jordi at debian.org>  Sat, 12 May 2012 11:01:21 +0200
+
+mame (0.144-1) unstable; urgency=low
+
+  [ Jordi Mallach ]
+  * Fix syntax errors in DEP5 copyright file (lintian).
+  * Use a versioned copyright Format specification field.
+  * Update Vcs-* URLs.
+  * Move transitional packages to the new metapackages section, and make
+    them priority extra.
+  * Remove references to GNU/Linux and MESS sources from copyright.
+  * Add build variables for s390x.
+  * Use .xz tarballs as it cuts 4MB for the upstream sources.
+  * Add nplayers.ini as a patch. Update copyright file to add CC-BY-SA-3.0.
+
+  [ Emmanuel Kasper ]
+  * New upstream release. Closes: #651538.
+  * Add Free Desktop compliant png icons of various sizes taken from
+    the hydroxygen iconset
+  * Mess is now built from a new source package, to avoid possible source
+    incompatibilities between mame and the mess overlay.
+  * Mame-tools are not built from the mame source package anymore, but
+    from the mess source package
+
+ -- Jordi Mallach <jordi at debian.org>  Mon, 19 Dec 2011 22:56:27 +0100
+
+mame (0.143-3) unstable; urgency=low
+
+  * Avoid ignoring "make clean" errors.
+  * There is no need to override dh_builddeb: debian/source/options
+    already does it for us.
+  * Add necessary Breaks for sdlmame and sdlmame-tools to ensure smooth
+    upgrades from Ubuntu and other unofficial repositories (closes: #635858).
+
+ -- Jordi Mallach <jordi at debian.org>  Thu, 04 Aug 2011 17:35:44 +0200
+
+mame (0.143-2) unstable; urgency=low
+
+  * Fix builds on MIPS, adding -Umips to ARCHOPTS (Emmanuel Kasper).
+  * Make xmess-sdl and xmess-x Architecture: all.
+  * Make mess-data's short description unique.
+
+ -- Jordi Mallach <jordi at debian.org>  Mon, 18 Jul 2011 00:50:07 +0200
+
+mame (0.143-1) unstable; urgency=low
+
+  [ Emmanuel Kasper ]
+  * New upstream release
+  * Start by default in windowed mode
+  * Add missing resources directories to match our default mess.ini
+
+  [ Félix Arreola Rodríguez ]
+  * Remove kfreebsd-build.patch (fixed upstream)
+
+ -- Jordi Mallach <jordi at debian.org>  Wed, 13 Jul 2011 23:45:22 +0200
+
+mame (0.142-2) unstable; urgency=low
+
+  [ Jordi Mallach ]
+  * Add the necessary variables to fix s390 and sparc builds (they are big
+    endian and have no targetted DRC implementation).
+  * Add variables for mips and ia64.
+  * Modify get-orig-source to also fetch MESS sources and build a new
+    dpkg source component tarball.
+  * Add a new mess binary package and transitional packages for xmess-*
+    (closes: #507932). 
+  * Setup the source dir to enable building mess even if its source is in
+    a mess subdir, by creating necessary symlinks and directory renames
+    before the build, and restoring everything on clean.
+  * Rework debian/rules as needed to make mess fit in.
+  * Create a minimal mess.ini (identical to mame.ini).
+  * Add castool and imgtool to mame-tools.
+  * Improve desktop file and translate it to Catalan.
+
+  [ Cesare Falco ]
+  * Initial merge from Ubuntu package.
+  * Some imports from corresponding debian/ files from Ubuntu package:
+    - control: sdlmame/sdlmame-tools transitional packages
+      (upgrading from Ubuntu 10.04 LTS still needs them)
+    - rules:
+      + override dh_installchangelogs instead of dh_auto_install
+      + override_dh_install, exclude keymaps for OSX
+      + renamed clean to override_dh_auto_clean, moved up
+      + strip CR from source files
+    - watch: added URL for MESS
+    - mame-tools: removed unidasm, tool intended for development only
+    - manpages for mess, castool and imgtool
+
+  [ Emmanuel Kasper ]
+  * Remove executable bit set by windows on all mess hash files 
+  * Fix clean rule on a clean tree.
+  * Add copyright information for MESS sources.
+  * Remove symlinking of megatech.xml.
+  * Add README.Debian for the mess binary package.
+  * Create a mess-data package for mess architecture independent files
+
+ -- Jordi Mallach <jordi at debian.org>  Thu, 12 May 2011 16:37:27 +0200
+
+mame (0.142-1) unstable; urgency=low
+
+  [ Emmanuel Kasper ]
+  * New upstream release
+  * Set NOWERROR=1 to allow compiling with gcc-4.6
+  * Remove fix_powerpc_build.patch, as upstream has taken it in this release
+  * Add gnome-video-arcade front end as a suggested package
+
+  [ Félix Arreola Rodríguez ]
+  * Add kfreebsd-build.patch to quilt series, to fix build on kfreebsd
+
+  [ Jordi Mallach ]
+  * Remove unneeded and bogus addition of --with-quilt to the dh invocation.
+  * Add Cesare Falco (long time Ubuntu maintainer) to Uploaders, and wrap
+    them into multiple lines.
+
+ -- Jordi Mallach <jordi at debian.org>  Wed, 11 May 2011 21:06:50 +0200
+
+mame (0.141-3) unstable; urgency=low
+
+  [ Emmanuel Kasper ]
+  * Add make variables to build on GNU/kFreeBSD
+
+  [ Jordi Mallach ]
+  * Add fix_powerpc_build.patch: Fix an incorrectly declared ifdef that
+    made big-endian builds fail.
+  * Set NOASM=1 globally, and unset for the targets that are known to have
+    a native ASM implementation (x86 and ppc). Builds for most other
+    Debian architectures will fail due to memory alignment issues, though.
+  * Add a minimal mame.ini, only showing the default paths options and
+    other important options like "video" or "multithreading", and install
+    it as a proper conffile.
+  * Remove mame.postinst and mame.prerm, to stop generating a mame.ini
+    file on postinst, which was never being updated on upgrades.
+  * If the generated mame.ini in 0.141-1 or 0.141-2 is not modified,
+    remove mame.ini to avoid a dpkg conffile prompt.
+  * Autogenerate a mame.ini using mame -createconfig after the build is
+    done, and install it as an example.
+  * Change all uses of Conflicts to Breaks.
+  * Bump debhelper compat version to 8.
+  * Bump Standards-Version to 3.9.2 (no changes needed).
+  * Use bzip2 for the debian tar.
+  * Upload to unstable.
+
+ -- Jordi Mallach <jordi at debian.org>  Fri, 22 Apr 2011 18:33:44 +0200
+
+mame (0.141-2) experimental; urgency=low
+
+  [ Emmanuel Kasper ]
+  * Update VCS address to point to Alioth
+  * Improve handling of upgrade in case of existing /etc/mame/mame.ini
+  * Documentation improvements
+  * Remove mame-regrep, mame-split, mame-src2html and mame-srcclean from
+    mame-tools as suggested by upstream
+  * Link with --as-needed LDFLAGS
+  * Debian Games Team as package maintainer
+
+  [ Jordi Mallach ]
+  * Minor cleanups in maintainer scripts.
+
+ -- Jordi Mallach <jordi at debian.org>  Sun, 03 Apr 2011 20:36:43 +0200
+
+mame (0.141-1) experimental; urgency=low
+
+  [ Emmanuel Kasper ]
+  * New upstream release
+
+  [ Jordi Mallach ]
+  * Add DEP-3 header to rename-tools patch.
+  * Override dh_auto_install to explicitly install whatsnew.txt as an
+    upstream changelog.
+  * Add missing escaping of minus signs in several manpages.
+  * Upload to experimental, as this package should replace xmame.
+  * Add myself to Uploaders.
+
+ -- Jordi Mallach <jordi at debian.org>  Wed, 12 Jan 2011 21:29:51 +0100
+
+mame (0.140-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Emmanuel Kasper <emmanuel at libera.cc>  Thu, 25 Nov 2010 07:41:21 +0100
+
+mame (0.139-1) unstable; urgency=low
+
+  * Built from sdlmame 0.135 package and inspired from xmame 0.106 package.
+    Closes: #424905.
+  * This package replaces sdlmame as "there are no longer separate programs
+    called SDLMAME or SDLMESS. Instead, the SDL capability is included in MAME
+    and MESS" - http://rbelmont.mameworld.info/?page_id=163
+
+ -- Ludovic Lechapt <ludomatic at gmail.com>  Mon, 06 Sep 2010 23:44:19 +1100
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..14bbccd
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,17 @@
+.mame_version
+castool
+chdman
+floptool
+imgtool
+jedutil
+ldresample
+ldverify
+nltool
+pngcmp
+regrep
+romcmp
+split
+src2html
+srcclean
+unidasm
+default.mame.ini
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..b6e70ea
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,98 @@
+Source: mame
+Section: games
+Priority: optional
+Maintainer: Debian Games Team <pkg-games-devel at lists.alioth.debian.org>
+Uploaders: Cesare Falco <c.falco at ubuntu.com>,
+ Emmanuel Kasper <emmanuel at libera.cc>,
+ Jordi Mallach <jordi at debian.org>
+Build-Depends: debhelper (>= 10),
+ dpkg-dev (>= 1.17),
+ libexpat1-dev,
+ libflac-dev,
+ libfontconfig1-dev,
+ libjpeg-dev,
+ liblua5.3-dev,
+ libportmidi-dev [linux-any],
+ libsdl2-ttf-dev,
+ libsdl2-dev,
+ libsqlite3-dev,
+ libutil-freebsd-dev [kfreebsd-any],
+ libuv1-dev,
+ libxinerama-dev,
+ portaudio19-dev,
+ python-dev,
+ qtbase5-dev,
+ zlib1g-dev
+Build-Depends-Indep: python3-sphinx
+Standards-Version: 3.9.8
+Vcs-Git: https://anonscm.debian.org/git/pkg-games/mame.git
+Vcs-Browser: https://anonscm.debian.org/cgit/pkg-games/mame.git
+Homepage: http://mamedev.org/
+XS-Autobuild: yes
+
+Package: mame
+Architecture: any
+Depends: ${misc:Depends},
+ ${shlibs:Depends},
+ mame-data (= ${source:Version})
+Replaces: mess (<< 0.162)
+Breaks: mess (<< 0.162)
+Suggests: gnome-video-arcade,
+ mame-doc,
+ mame-extra,
+ mame-tools
+Description: Multiple Arcade Machine Emulator (MAME)
+ MAME is a hardware emulator: it faithfully reproduces the behavior of many
+ arcade machines (it is not a simulation). This program is not a game but can
+ directly, through ROM images, run the complete system of these old arcade
+ machines. These ROMs are subject to copyright and it is in most of the cases
+ illegal to use them if you do not own the arcade machine.
+ .
+ This package provides the MAME binary and configuration files.
+
+Package: mame-data
+Architecture: all
+Depends: ${misc:Depends}
+Replaces: mess-data (<< 0.162)
+Breaks: mess-data (<< 0.162)
+Description: Multiple Arcade Machine Emulator (MAME) -- data files
+ MAME is a hardware emulator: it faithfully reproduces the behavior of many
+ arcade machines (it is not a simulation). This program is not a game but can
+ directly, through ROM images, run the complete system of these old arcade
+ machines. These ROMs are subject to copyright and it is in most of the cases
+ illegal to use them if you do not own the arcade machine.
+ .
+ This package provides MAME hash files, keymaps, artwork, language files,
+ shaders, plugins and audio samples.
+
+Package: mame-tools
+Section: utils
+Architecture: any
+Depends: ${misc:Depends},
+ ${shlibs:Depends}
+Recommends: mame (= ${source:Version})
+Description: Tools for MAME
+ MAME is a hardware emulator: it faithfully reproduces the behavior of many
+ arcade machines (it is not a simulation).
+ .
+ This package provides tools to be used with MAME. It currently contains:
+  castool -- generic cassette manipulation tool for MAME
+  chdman -- MAME Compressed Hunks of Data CHD manager
+  floptool -- Generic floppy image manipulation tool for MESS
+  imgtool -- generic image manipulation tool for MAME
+  jedutil -- binary to/from JEDEC file converter
+  ldresample -- Laserdisc audio synchronizer and resampler
+  ldverify -- Laserdisc AVI/CHD verifier
+  romcmp -- ROM comparison utility program
+
+Package: mame-doc
+Section: doc
+Architecture: all
+Depends: ${misc:Depends}
+Suggests: libjs-sphinxdoc, libjs-mathjax
+Enhances: mame
+Description: Documentation for MAME
+ MAME is a hardware emulator: it faithfully reproduces the behavior of many
+ arcade machines (it is not a simulation).
+ .
+ This is sphinx-generated full documentation for the MAME system.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..f8066d5
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,1053 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: MAME
+Source: http://mamedev.org/
+ The mame icons are part of the hydroxygen icon set, downloaded from 
+ http://deviantdark.deviantart.com/art/hydroxygen-iconset-100826865
+
+Files: debian/*
+Copyright: Mamedeb team <mame at packages.debian.org>
+License: GPL-2+
+
+Files: debian/install/hicolor/*
+Copyright: deviantdark [www.deviantdark.com]
+License: GPL-3+
+
+Files: *
+Copyright:
+ Aaron Giles
+ Alex Pasadyn
+ Alex Wulms
+ Antoine Mine
+ Brad Martin
+ Bryan McPhail
+ Chris Kirmse
+ Dag Lem
+ Dreamer Nom
+ Eric Smith
+ Ernesto Corvi
+ Fabio Priuli
+ Frank Palazzolo
+ F. Ulivi
+ Grazvydas Ignotas
+ hap
+ Igor
+ Jarek Burczynski
+ Jason Eckhardt
+ John Butler
+ John Weidman
+ Jonas Quinn
+ Jonathan Gevaryahu
+ Joseph Zbiciak
+ Juergen Buchmueller
+ J. Wallace
+ Karl Stenerud
+ Kris Bleakley
+ Lancer
+ MAME32/MAMEUI team
+ Mariusz Wojcieszek
+ Michael Soderstrom
+ Miodrag Milanovic
+ Mirko Buffoni
+ Nach
+ Nicola Salmoria
+ Olivier Galibert
+ Peter J.C.Clare
+ Peter Trauner
+ Raphael Nabet
+ Ron Fries
+ R. Belmont
+ Sean Young
+ smf
+ Steve Baines
+ Steve Ellenoff
+ Sven Gothel
+ Tatsuyuki Satoh
+ The AGEMAME Development Team
+ The MAME team
+ The MESS team
+ Tim Lindner
+ Tony La Porta
+ XelaSoft
+ z80 gaiden
+ Zsolt Vasvari
+License: BSD-3-clause
+
+Files: src/lib/util/md5.*
+Copyright: Colin Plumb
+License: public-domain
+
+Files: src/lib/util/sha1.*
+Copyright: Peter Gutmann
+ Andrew Kuchling
+ Niels Moeller
+ Charles MacDonald
+License: LGPL-2.1+
+
+Files: nl_examples/*
+Copyright: Couriersud
+License: GPL-2+
+
+Files: src/devices/machine/pdc.*
+ src/devices/machine/ins8154.*
+ src/devices/machine/netlist.*
+ src/devices/machine/cr511b.*
+ src/devices/machine/cs4031.*
+ src/devices/machine/gayle.*
+ src/devices/machine/e05a03.*
+ src/devices/machine/dmac.*
+ src/devices/machine/autoconfig.*
+ src/devices/machine/74145.*
+ src/devices/cpu/i8089/i8089*.*
+ src/devices/cpu/patinhofeio/patinho_feio*.*
+ src/devices/bus/snes/rom*.*
+ src/devices/bus/snes/spc7110.*
+ src/devices/bus/epson_sio/*
+ src/devices/bus/amiga/zorro/*
+ src/devices/bus/cgenie/*
+ src/devices/bus/centronics/epson*.*
+ src/devices/bus/bml3/*
+ src/devices/bus/vtech/*
+ src/devices/bus/svi3x8/*
+ src/devices/bus/nasbus/*
+ src/devices/bus/ti99_peb/*
+ src/devices/bus/ti99x/*
+ src/devices/bus/apricot/*
+ src/devices/bus/vtech/*
+ src/devices/video/mos6566.*
+ src/devices/video/i82730.*
+ src/devices/video/dl1416.*
+ src/devices/video/tea1002.*
+ src/devices/video/ef9345.*
+ src/devices/video/m50458.*
+ src/devices/sound/ymdeltat.*
+ src/devices/sound/ym2151.*
+ src/devices/sound/ym2413.*
+ src/devices/sound/fm2612.*
+ src/devices/sound/ymf262.*
+ src/devices/sound/fm.*
+ src/devices/sound/fmopl.*
+ src/devices/sound/msm5232.*
+ src/devices/sound/sidw8580.*
+ src/devices/sound/nes_apu.*
+ src/devices/sound/nes_defs.*
+ src/devices/sound/tiaintf.*
+ src/devices/sound/tiasound.*
+ src/tools/imgtool/formats/vt_dsk.*
+ src/tools/imgtool/modules/vzdos.*
+ src/tools/imgtool/modules/bml3.*
+ src/tools/imgtool/modules/amiga.*
+ src/lib/formats/guab_dsk.*
+ src/lib/formats/vdk_dsk.*
+ src/lib/formats/hector_minidisc.*
+ src/lib/formats/cd90_640_dsk.*
+ src/lib/formats/jvc_dsk.*
+ src/lib/formats/zx81_p.*
+ src/lib/formats/apridisk.*
+ src/lib/formats/2d_dsk.*
+ src/lib/formats/trs80_dsk.*
+ src/lib/formats/svi_dsk.*
+ src/lib/formats/cgenie_dsk.*
+ src/lib/formats/nascom_dsk.*
+ src/lib/formats/bbc_dsk.*
+ src/lib/formats/vector06_dsk.*
+ src/lib/formats/rx50_dsk.*
+ src/lib/formats/pk8020_dsk.*
+ src/lib/formats/vt_cas.*
+ src/lib/formats/2d_dsk.*
+ src/lib/netlist/*
+ src/mame/machine/cx4fn.inc
+ src/mame/machine/cx4data.inc
+ src/mame/machine/snescx4.*
+ src/mame/machine/bigevglf.*
+ src/mame/machine/decocass.*
+ src/mame/machine/decocass_tape.*
+ src/mame/machine/kay_kbd.*
+ src/mame/machine/kc_keyb.*
+ src/mame/machine/aim65.*
+ src/mame/machine/atarifdc.*
+ src/mame/machine/mz700.*
+ src/mame/machine/atari.*
+ src/mame/machine/cx4oam.*
+ src/mame/machine/apricotkb_hle.*
+ src/mame/machine/opwolf.*
+ src/mame/machine/samcoupe.*
+ src/mame/machine/amstrad.*
+ src/mame/machine/spec_snqk.*
+ src/mame/machine/pc1251.*
+ src/mame/machine/pc1350.*
+ src/mame/machine/pc1401.*
+ src/mame/machine/pc1403.*
+ src/mame/machine/lynx.*
+ src/mame/machine/nb1414m4.*
+ src/mame/machine/concept.*
+ src/mame/machine/vtech2.*
+ src/mame/machine/nc.*
+ src/mame/machine/zx.*
+ src/mame/machine/kc.*
+ src/mame/machine/einstein.*
+ src/mame/machine/archimds.*
+ src/mame/machine/3do.*
+ src/mame/machine/amigakbd.*
+ src/mame/machine/lisa.*
+ src/mame/machine/microtan.*
+ src/mame/machine/sorcerer.*
+ src/mame/{drivers,includes,video}/zapcomputer.*
+ src/mame/{drivers,includes,video}/tutor.*
+ src/mame/{drivers,includes,video}/ace.*
+ src/mame/{drivers,includes,video}/wallc.*
+ src/mame/{drivers,includes,video}/ssystem3.*
+ src/mame/{drivers,includes,video}/mk1.*
+ src/mame/{drivers,includes,video}/mk2.*
+ src/mame/{drivers,includes,video}/mekd2.*
+ src/mame/{drivers,includes,video}/px4.*
+ src/mame/{drivers,includes,video}/cgenie.*
+ src/mame/{drivers,includes,video}/bigevglf.*
+ src/mame/{drivers,includes,video}/decocass.*
+ src/mame/{drivers,includes,video}/z88.*
+ src/mame/{drivers,includes,video}/unixpc.*
+ src/mame/{drivers,includes,video}/r9751.*
+ src/mame/{drivers,includes,video}/aim65.*
+ src/mame/{drivers,includes,video}/mz700.*
+ src/mame/{drivers,includes,video}/daruma.*
+ src/mame/{drivers,includes,video}/rainbow.*
+ src/mame/{drivers,includes,video}/dambustr.*
+ src/mame/{drivers,includes,video}/madalien.*
+ src/mame/{audio,drivers,includes,video}/meadows.*
+ src/mame/{drivers,includes,video}/40love.*
+ src/mame/{drivers,includes,video}/kim1.*
+ src/mame/{drivers,includes,video}/opwolf.*
+ src/mame/{drivers,includes,video}/wacky_gator.*
+ src/mame/{drivers,includes,video}/samcoupe.*
+ src/mame/{drivers,includes,video}/amstrad.*
+ src/mame/{drivers,includes,video}/lazercmd.*
+ src/mame/{drivers,includes,video}/sym1.*
+ src/mame/{drivers,includes,video}/apricot.*
+ src/mame/{drivers,includes,video}/shougi.*
+ src/mame/{drivers,includes,video}/barata.*
+ src/mame/{drivers,includes,video}/apexc.*
+ src/mame/{drivers,includes,video}/minicom.*
+ src/mame/{drivers,includes,video}/mmagic.*
+ src/mame/{drivers,includes,video}/nascom1.*
+ src/mame/{drivers,includes,video}/spectrum.*
+ src/mame/{drivers,includes,video}/pdp1.*
+ src/mame/{drivers,includes,video}/alto2.*
+ src/mame/{drivers,includes,video}/pasogo.*
+ src/mame/{drivers,includes,video}/ti990_10.*
+ src/mame/{drivers,includes,video}/rastan.*
+ src/mame/{drivers,includes,video}/gameking.*
+ src/mame/{drivers,includes,video}/canon_s80.*
+ src/mame/{drivers,includes,video}/pcd.*
+ src/mame/{drivers,includes,video}/marywu.*
+ src/mame/{drivers,includes,video}/nl_breakout.*
+ src/mame/{drivers,includes,video}/supertnk.*
+ src/mame/{drivers,includes,video}/msisaac.*
+ src/mame/{drivers,includes,video}/bml3.*
+ src/mame/{drivers,includes,video}/ti99_2.*
+ src/mame/{drivers,includes,video}/rambo.*
+ src/mame/{audio,drivers,includes,video}/lynx.*
+ src/mame/{drivers,includes,video}/pcw.*
+ src/mame/{drivers,includes,video}/pcw16.*
+ src/mame/{drivers,includes,video}/taito_b.*
+ src/mame/{drivers,includes,video}/spaceg.*
+ src/mame/{drivers,includes,video}/hprot1.*
+ src/mame/{drivers,includes,video}/concept.*
+ src/mame/{drivers,includes,video}/timex.*
+ src/mame/{drivers,includes,video}/vtech2.*
+ src/mame/{drivers,includes,video}/gmaster.*
+ src/mame/{drivers,includes,video}/changela.*
+ src/mame/{drivers,includes,video}/nc.*
+ src/mame/{drivers,includes,video}/argox.*
+ src/mame/{drivers,includes,video}/zx.*
+ src/mame/{audio,drivers,includes,video}/gamate.*
+ src/mame/{drivers,includes,video}/tubep.*
+ src/mame/{drivers,includes,video}/kc.*
+ src/mame/{drivers,includes,video}/einstein.*
+ src/mame/{drivers,includes,video}/svi318.*
+ src/mame/{drivers,includes,video}/tx0.*
+ src/mame/{drivers,includes,video}/px8.*
+ src/mame/{drivers,includes,video}/patinho_feio.*
+ src/mame/{drivers,includes,video}/pong.*
+ src/mame/{drivers,includes,video}/ti630.*
+ src/mame/{drivers,includes,video}/svision.*
+ src/mame/{drivers,includes,video}/spec128.*
+ src/mame/{drivers,includes,video}/exelv.*
+ src/mame/{drivers,includes,video}/i7000.*
+ src/mame/{drivers,includes,video}/tecnbras.*
+ src/mame/{drivers,includes,video}/vc4000.*
+ src/mame/{drivers,includes,video}/darius.*
+ src/mame/{drivers,includes,video}/tankbust.*
+ src/mame/{drivers,includes,video}/sbowling.*
+ src/mame/{audio,drivers,includes,video}/channelf.*
+ src/mame/{drivers,includes,video}/comquest.*
+ src/mame/{drivers,includes,video}/nl_pongd.*
+ src/mame/{drivers,includes,video}/ct486.*
+ src/mame/{drivers,includes,video}/atari400.*
+ src/mame/{drivers,includes,video}/vtech1.*
+ src/mame/{drivers,includes,video}/aim65_40.*
+ src/mame/{drivers,includes,video}/replicator.*
+ src/mame/{drivers,includes,video}/icatel.*
+ src/mame/{drivers,includes,video}/tm990189.*
+ src/mame/{drivers,includes,video}/rc759.*
+ src/mame/{drivers,includes,video}/specpls3.*
+ src/mame/{drivers,includes,video}/avigo.*
+ src/mame/{drivers,includes,video}/nl_pong.*
+ src/mame/{drivers,includes,video}/lisa.*
+ src/mame/{drivers,includes,video}/banctec.*
+ src/mame/{drivers,includes,video}/mazerbla.*
+ src/mame/{drivers,includes,video}/microtan.*
+ src/mame/{drivers,includes,video}/sorcerer.*
+ src/mame/{drivers,includes,video}/amiga.*
+ src/mame/{audio,drivers,includes,video}/arcadia.*
+ src/mame/{drivers,includes,video}/pocketc.*
+ src/mame/{drivers,includes,video}/pve500.*
+ src/mame/{drivers,includes,video}/antic.*
+ src/mame/{drivers,includes,video}/gtia.*
+ src/mame/{drivers,includes,video}/911_key.*
+ src/mame/{drivers,includes,video}/911_vdt.*
+ src/mame/{drivers,includes,video}/733_asr.*
+ src/mame/{drivers,includes,video}/pc1350.*
+ src/mame/{drivers,includes,video}/pc1401.*
+ src/mame/{drivers,includes,video}/pc1403.*
+ src/mame/audio/pleiads.*
+ src/mame/audio/svis_snd.*
+ src/mame/audio/vc4000snd.*
+ src/mame/audio/geebee.*
+ src/mame/audio/vc4000snd.*
+ src/mame/audio/warpwarp.*
+Copyright: Barry Rodewald
+ Brandon Munger
+ Brett Wyer
+ Buchmueller
+ byuu
+ Carl
+ Christian Bauer
+ Couriersud
+ Curt Coder
+ Dag Lem
+ Dan Boris
+ David Viens
+ DICE Team
+ Dirk Best
+ Fabio Priuli
+ Felipe Sanches
+ Hiromitsu Shioya
+ Jarek Burczynski
+ Jonathan Edwards
+ Juergen Buchmueller
+ Karl-Ludwig Deisenhofer
+ Kevin Thacker
+ Krzysztof Strzecha
+ Lee Hammerton
+ Matthew Conte
+ Nach
+ Nigel Barnes
+ Norbert Kehrer
+ Olivier Galibert
+ Peter Trauner
+ Phill Harvey-Smith
+ Robbbert
+ Ron Fries
+ Sandro Ronco
+ Tatsuyuki Satoh
+ Vas Crabb
+ Wilbert Pol
+License: GPL-2+
+
+Files: src/devices/machine/tc009xlvc.*
+ src/devices/machine/smpc.*
+ src/devices/machine/aakart.*
+ src/devices/machine/stvcd.cpp
+ src/devices/video/stvvdp1.cpp
+ src/devices/machine/k053252.*
+ src/devices/machine/saturn.cpp
+ src/devices/cpu/v810/v810.*
+ src/devices/cpu/v810/v810dasm.*
+ src/devices/imagedev/mfmhd.*
+ src/devices/video/mb90082.*
+ src/devices/video/mb_vcu.*
+ src/devices/video/m50458.*
+ src/devices/video/stvvdp2.*
+ src/devices/sound/l7a1045_l6028_dsp_a.*
+ src/lib/formats/mfm_hd.*
+ src/lib/formats/ti99_dsk.*
+ src/mame/machine/seicop.*
+ src/mame/machine/hng64_net.*
+ src/mame/machine/raiden2cop.*
+ src/mame/machine/nycaptor.*
+ src/mame/machine/dc.*
+ src/mame/machine/x1.*
+ src/mame/machine/dccons.*
+ src/mame/machine/naomi.*
+ src/mame/{drivers,includes,video}/dominob.*
+ src/mame/{drivers,includes,video}/meijinsn.*
+ src/mame/{drivers,includes,video}/ksayakyu.*
+ src/mame/{drivers,includes,video}/koikoi.*
+ src/mame/{drivers,includes,video}/ti99_8.*
+ src/mame/{drivers,includes,video}/eolith.*
+ src/mame/{drivers,includes,video}/pturn.*
+ src/mame/{drivers,includes,video}/a310.*
+ src/mame/{drivers,includes,video}/nss.*
+ src/mame/{drivers,includes,video}/freekick.*
+ src/mame/{drivers,includes,video}/skyarmy.*
+ src/mame/{drivers,includes,video}/smc777.*
+ src/mame/{drivers,includes,video}/suprgolf.*
+ src/mame/{drivers,includes,video}/sfkick.*
+ src/mame/{drivers,includes,video}/tcl.*
+ src/mame/{drivers,includes,video}/ssingles.*
+ src/mame/{drivers,includes,video}/taitojc.*
+ src/mame/{drivers,includes,video}/ssfindo.*
+ src/mame/{drivers,includes,video}/snesb.*
+ src/mame/{drivers,includes,video}/nycaptor.*
+ src/mame/{drivers,includes,video}/ladyfrog.*
+ src/mame/{drivers,includes,video}/ti990_4.*
+ src/mame/{drivers,includes,video}/pachifev.*
+ src/mame/{drivers,includes,video}/rbmk.*
+ src/mame/{drivers,includes,video}/4enraya.*
+ src/mame/{drivers,includes,video}/mustache.*
+ src/mame/{drivers,includes,video}/lazercmd.*
+ src/mame/{audio,drivers,includes,video}/hng64.*
+ src/mame/{drivers,includes,video}/geneve.*
+ src/mame/{drivers,includes,video}/x1twin.*
+ src/mame/{drivers,includes,video}/taitoair.*
+ src/mame/{drivers,includes,video}/jalmah.*
+ src/mame/{drivers,includes,video}/pipeline.*
+ src/mame/{drivers,includes,video}/neptunp2.*
+ src/mame/{drivers,includes,video}/adp.*
+ src/mame/{drivers,includes,video}/speglsht.*
+ src/mame/{drivers,includes,video}/stv.*
+ src/mame/{drivers,includes,video}/gunpey.*
+ src/mame/{drivers,includes,video}/supracan.*
+ src/mame/{drivers,includes,video}/cybertnk.*
+ src/mame/{drivers,includes,video}/cardline.*
+ src/mame/{drivers,includes,video}/casloopy.*
+ src/mame/{drivers,includes,video}/koftball.*
+ src/mame/{drivers,includes,video}/csplayh5.*
+ src/mame/{drivers,includes,video}/dynadice.*
+ src/mame/{drivers,includes,video}/laserbas.*
+ src/mame/{drivers,includes,video}/sothello.*
+ src/mame/{drivers,includes,video}/quizo.*
+ src/mame/{drivers,includes,video}/cshooter.*
+ src/mame/{drivers,includes,video}/c65.*
+ src/mame/{drivers,includes,video}/dorachan.*
+ src/mame/{drivers,includes,video}/tattack.*
+ src/mame/{drivers,includes,video}/attckufo.*
+ src/mame/{drivers,includes,video}/chanbara.*
+ src/mame/{drivers,includes,video}/sliver.*
+ src/mame/{drivers,includes,video}/ssrj.*
+ src/mame/{drivers,includes,video}/3do.*
+ src/mame/{drivers,includes,video}/vega.*
+ src/mame/{drivers,includes,video}/ti99_4x.*
+ src/mame/{drivers,includes,video}/ddealer.*
+ src/mame/{drivers,includes,video}/mephisto.*
+ src/mame/{drivers,includes,video}/taito_o.*
+ src/mame/{drivers,includes,video}/coolridr.*
+ src/mame/{drivers,includes,video}/homerun.*
+ src/mame/{drivers,includes,video}/meyc8080.*
+ src/mame/{drivers,includes,video}/vboy.*
+ src/mame/{drivers,includes,video}/x1.*
+ src/mame/{drivers,includes,video}/mmodular.*
+ src/mame/{drivers,includes,video}/othello.*
+ src/mame/{drivers,includes,video}/apricotp.*
+ src/mame/{drivers,includes,video}/dccons.*
+ src/mame/{drivers,includes,video}/fcombat.*
+ src/mame/{drivers,includes,video}/bmcbowl.*
+ src/mame/{drivers,includes,video}/hvyunit.*
+ src/mame/{drivers,includes,video}/srmp5.*
+ src/mame/{drivers,includes,video}/naomi.*
+ src/mame/{drivers,includes,video}/raiden2.*
+ src/mame/{drivers,includes,video}/pitnrun.*
+ src/mame/{drivers,includes,video}/witch.*
+ src/mame/{drivers,includes,video}/sg1000a.*
+ src/mame/{drivers,includes,video}/rltennis.*
+ src/mame/{drivers,includes,video}/harriet.*
+ src/mame/{drivers,includes,video}/simple_st0016.*
+ src/mame/{drivers,includes,video}/ti99_4p.*
+ src/mame/{drivers,includes,video}/seibu_crtc.*
+ src/mame/{drivers,includes,video}/crt.*
+ src/mame/{drivers,includes,video}/tmc0430.*
+ src/mame/audio/snes_snd.*
+Copyright:  Andrew Gardner
+ Angelo Salese
+ Brad Martin
+ David Haywood
+ ElSemi
+ Mariusz Wojcieszek
+ Michael Zapf
+ Olivier Galibert
+ R. Belmont
+ Samuele Zannoli
+ Tomasz Slanina
+ Uki
+License: LGPL-2.1+
+
+Files: artwork/* hash/*
+Copyright: MAME team
+License: CC0-1.0
+ CC0 1.0 Universal
+ .
+ Statement of Purpose
+ .
+ The laws of most jurisdictions throughout the world automatically confer
+ exclusive Copyright and Related Rights (defined below) upon the creator and
+ subsequent owner(s) (each and all, an "owner") of an original work of
+ authorship and/or a database (each, a "Work").
+ .
+ Certain owners wish to permanently relinquish those rights to a Work for the
+ purpose of contributing to a commons of creative, cultural and scientific
+ works ("Commons") that the public can reliably and without fear of later
+ claims of infringement build upon, modify, incorporate in other works, reuse
+ and redistribute as freely as possible in any form whatsoever and for any
+ purposes, including without limitation commercial purposes. These owners may
+ contribute to the Commons to promote the ideal of a free culture and the
+ further production of creative, cultural and scientific works, or to gain
+ reputation or greater distribution for their Work in part through the use and
+ efforts of others.
+ .
+ For these and/or other purposes and motivations, and without any expectation
+ of additional consideration or compensation, the person associating CC0 with a
+ Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
+ and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
+ and publicly distribute the Work under its terms, with knowledge of his or her
+ Copyright and Related Rights in the Work and the meaning and intended legal
+ effect of CC0 on those rights.
+ .
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
+ protected by copyright and related or neighboring rights ("Copyright and
+ Related Rights"). Copyright and Related Rights include, but are not limited
+ to, the following:
+ .
+   i. the right to reproduce, adapt, distribute, perform, display, communicate,
+   and translate a Work;
+ .
+   ii. moral rights retained by the original author(s) and/or performer(s);
+ .
+   iii. publicity and privacy rights pertaining to a person's image or likeness
+   depicted in a Work;
+ .
+   iv. rights protecting against unfair competition in regards to a Work,
+   subject to the limitations in paragraph 4(a), below;
+ .
+   v. rights protecting the extraction, dissemination, use and reuse of data in
+   a Work;
+ .
+   vi. database rights (such as those arising under Directive 96/9/EC of the
+   European Parliament and of the Council of 11 March 1996 on the legal
+   protection of databases, and under any national implementation thereof,
+   including any amended or successor version of such directive); and
+ .
+   vii. other similar, equivalent or corresponding rights throughout the world
+   based on applicable law or treaty, and any national implementations thereof.
+ .
+ 2. Waiver. To the greatest extent permitted by, but not in contravention of,
+ applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
+ unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
+ and Related Rights and associated claims and causes of action, whether now
+ known or unknown (including existing as well as future claims and causes of
+ action), in the Work (i) in all territories worldwide, (ii) for the maximum
+ duration provided by applicable law or treaty (including future time
+ extensions), (iii) in any current or future medium and for any number of
+ copies, and (iv) for any purpose whatsoever, including without limitation
+ commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
+ the Waiver for the benefit of each member of the public at large and to the
+ detriment of Affirmer's heirs and successors, fully intending that such Waiver
+ shall not be subject to revocation, rescission, cancellation, termination, or
+ any other legal or equitable action to disrupt the quiet enjoyment of the Work
+ by the public as contemplated by Affirmer's express Statement of Purpose.
+ .
+ 3. Public License Fallback. Should any part of the Waiver for any reason be
+ judged legally invalid or ineffective under applicable law, then the Waiver
+ shall be preserved to the maximum extent permitted taking into account
+ Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
+ is so judged Affirmer hereby grants to each affected person a royalty-free,
+ non transferable, non sublicensable, non exclusive, irrevocable and
+ unconditional license to exercise Affirmer's Copyright and Related Rights in
+ the Work (i) in all territories worldwide, (ii) for the maximum duration
+ provided by applicable law or treaty (including future time extensions), (iii)
+ in any current or future medium and for any number of copies, and (iv) for any
+ purpose whatsoever, including without limitation commercial, advertising or
+ promotional purposes (the "License"). The License shall be deemed effective as
+ of the date CC0 was applied by Affirmer to the Work. Should any part of the
+ License for any reason be judged legally invalid or ineffective under
+ applicable law, such partial invalidity or ineffectiveness shall not
+ invalidate the remainder of the License, and in such case Affirmer hereby
+ affirms that he or she will not (i) exercise any of his or her remaining
+ Copyright and Related Rights in the Work or (ii) assert any associated claims
+ and causes of action with respect to the Work, in either case contrary to
+ Affirmer's express Statement of Purpose.
+ .
+ 4. Limitations and Disclaimers.
+ .
+   a. No trademark or patent rights held by Affirmer are waived, abandoned,
+   surrendered, licensed or otherwise affected by this document.
+ .
+   b. Affirmer offers the Work as-is and makes no representations or warranties
+   of any kind concerning the Work, express, implied, statutory or otherwise,
+   including without limitation warranties of title, merchantability, fitness
+   for a particular purpose, non infringement, or the absence of latent or
+   other defects, accuracy, or the present or absence of errors, whether or not
+   discoverable, all to the greatest extent permissible under applicable law.
+ .
+   c. Affirmer disclaims responsibility for clearing rights of other persons
+   that may apply to the Work or any use thereof, including without limitation
+   any person's Copyright and Related Rights in the Work. Further, Affirmer
+   disclaims responsibility for obtaining any necessary consents, permissions
+   or other rights required for any use of the Work.
+ .
+   d. Affirmer understands and acknowledges that Creative Commons is not a
+   party to this document and has no duty or obligation with respect to this
+   CC0 or use of the Work.
+ .
+ For more information, please see
+ <http://creativecommons.org/publicdomain/zero/1.0/>
+
+Files: 3rdparty/bgfx/* 3rdparty/bx/*
+Copyright: 2010-2016 Branimir Karadzic
+License: BSD-2-clause
+ .
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+ 1. Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ EVENT SHALL COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: 3rdparty/expat/*
+Copyright: 1998, 1999, 2000 Thai Open Source Software Center Ltd
+License: MIT
+
+Files: 3rdparty/genie/*
+Copyright: 2014-2016 Branimir Karadžić
+                     Neil Richardson
+                     Mike Popoloski
+                     Drew Solomon
+                     Ted de Munnik
+                     Miodrag Milanović
+                     Brett Vickers
+                     Bill Freist
+                     Terry Hendrix II
+                     Ryan Juckett
+                     Andrew Johnson
+License: BSD-3-clause
+
+Files: 3rdparty/genie/base/*
+       3rdparty/genie/src/host/*
+       3rdparty/genie/src/tools/*
+       3rdparty/genie/src/actions/{xcode,codelite,make,vstudio,clean}/*
+       3rdparty/genie/tests/*
+       3rdparty/genie/_*.lua
+Copyright: 2002-2013 Jason Perkins and the Premake project
+License: BSD-3-clause
+
+Files: 3rdparty/genie/base/inspect.lua
+Copyright: 2013 Enrique García Cota
+License: MIT
+
+Files: 3rdparty/googletest/*
+Copyright: 2008 Google Inc.
+License: BSD-3-clause-Google
+ Copyright 2008, Google Inc.
+ All rights reserved.
+ .
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ .
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ * Neither the name of Google Inc. nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: 3rdparty/http-parser/*
+Copyright: Igor Sysoev
+License: MIT
+
+Files: 3rdparty/libflac/*
+Copyright: 2001, 2002, 2003, 2004, 2005, 2006, 2007  Josh Coalson
+License: BSD-3-clause-Xiph
+ Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson
+ .
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ .
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ .
+ - Neither the name of the Xiph.org Foundation nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: 3rdparty/libjpeg/*
+Copyright: 1991-2011, Thomas G. Lane, Guido Vollbeding
+License: Custom-IJG
+ The authors make NO WARRANTY or representation, either express or implied,
+ with respect to this software, its quality, accuracy, merchantability, or
+ fitness for a particular purpose.  This software is provided "AS IS", and you,
+ its user, assume the entire risk as to its quality and accuracy.
+ .
+ This software is copyright (C) 1991-2011, Thomas G. Lane, Guido Vollbeding.
+ All Rights Reserved except as specified below.
+ .
+ Permission is hereby granted to use, copy, modify, and distribute this
+ software (or portions thereof) for any purpose, without fee, subject to these
+ conditions:
+ (1) If any part of the source code for this software is distributed, then this
+ README file must be included, with this copyright and no-warranty notice
+ unaltered; and any additions, deletions, or changes to the original files
+ must be clearly indicated in accompanying documentation.
+ (2) If only executable code is distributed, then the accompanying
+ documentation must state that "this software is based in part on the work of
+ the Independent JPEG Group".
+ (3) Permission for use of this software is granted only if the user accepts
+ full responsibility for any undesirable consequences; the authors accept
+ NO LIABILITY for damages of any kind.
+ .
+ These conditions apply to any software derived from or based on the IJG code,
+ not just to the unmodified library.  If you use our work, you ought to
+ acknowledge us.
+ .
+ Permission is NOT granted for the use of any IJG author's name or company name
+ in advertising or publicity relating to this software or products derived from
+ it.  This software may be referred to only as "the Independent JPEG Group's
+ software".
+ .
+ We specifically permit and encourage the use of this software as the basis of
+ commercial products, provided that all warranty or liability claims are
+ assumed by the product vendor.
+ .
+ ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
+ sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
+ ansi2knr.c is NOT covered by the above copyright and conditions, but instead
+ by the usual distribution terms of the Free Software Foundation; principally,
+ that you must include source code if you redistribute it.  (See the file
+ ansi2knr.c for full details.)  However, since ansi2knr.c is not needed as part
+ of any program generated from the IJG code, this does not limit you more than
+ the foregoing paragraphs do.
+ .
+ The Unix configuration script "configure" was produced with GNU Autoconf.
+ It is copyright by the Free Software Foundation but is freely distributable.
+ The same holds for its supporting scripts (config.guess, config.sub,
+ ltmain.sh).  Another support script, install-sh, is copyright by X Consortium
+ but is also freely distributable.
+ .
+ The IJG distribution formerly included code to read and write GIF files.
+ To avoid entanglement with the Unisys LZW patent, GIF reading support has
+ been removed altogether, and the GIF writer has been simplified to produce
+ "uncompressed GIFs".  This technique does not use the LZW algorithm; the
+ resulting GIF files are larger than usual, but are readable by all standard
+ GIF decoders.
+ .
+ We are required to state that
+ .
+ "The Graphics Interchange Format(c) is the Copyright property of
+ CompuServe Incorporated.  GIF(sm) is a Service Mark property of
+ CompuServe Incorporated."
+
+Files: 3rdparty/libuv/*
+Copyright: Joyent, Inc. and other Node contributors
+License: MIT
+
+Files: 3rdparty/lsqlite3/*
+Copyright: 2002-2013 Tiago Dionizio, Doug Currie
+License: MIT
+
+Files: 3rdparty/luabridge/*
+Copyright: 2007 Nathan Reed
+           2012 Vinnie Falco
+License: MIT
+
+Files: 3rdparty/luafilesystem/*
+Copyright: 2003-2014 Kepler Project
+License: MIT
+
+Files: 3rdparty/lua-zlib/*
+Copyright: 2009 Brian Maher
+License: MIT
+
+Files: 3rdparty/lzma/*
+Copyright: Igor Pavlov
+License: public-domain
+
+Files: 3rdparty/portaudio/*
+Copyright: 1999-2006 Ross Bencina and Phil Burk
+License: MIT
+
+Files: 3rdparty/portmidi/*
+Copyright: 1999-2006 Ross Bencina and Phil Burk
+           2001-2009 Roger B. Dannenberg
+License: MIT
+
+Files: 3rdparty/rapidjson/*
+Copyright: 2015 THL A29 Limited, a Tencent company, and Milo Yip
+License: MIT
+
+Files: 3rdparty/rapidjson/includes/msinttypes/*
+Copyright: 2006-2013 Alexander Chemeris
+License: BSD-3-clause-msinttypes
+ Copyright (c) 2006-2013 Alexander Chemeris
+ .
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+ 1. Redistributions of source code must retain the above copyright notice,
+    this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ .
+ 3. Neither the name of the product nor the names of its contributors may
+    be used to endorse or promote products derived from this software
+    without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: 3rdparty/SDL2/* 3rdparty/SDL2-override/*
+Copyright: 1997-2016 Sam Lantinga <slouken at libsdl.org>
+License: Custom-SDL2
+ Simple DirectMedia Layer
+ Copyright (C) 1997-2016 Sam Lantinga <slouken at libsdl.org>
+ .
+ This software is provided 'as-is', without any express or implied
+ warranty.  In no event will the authors be held liable for any damages
+ arising from the use of this software.
+ .
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+ .
+ 1. The origin of this software must not be misrepresented; you must not
+    claim that you wrote the original software. If you use this software
+    in a product, an acknowledgment in the product documentation would be
+    appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+    misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+Files: 3rdparty/softfloat/*
+Copyright: 2002 John R. Hauser
+License: Custom-softfloat
+ SoftFloat was written by me, John R. Hauser.  This work was made possible in
+ part by the International Computer Science Institute, located at Suite 600,
+ 1947 Center Street, Berkeley, California 94704.  Funding was partially
+ provided by the National Science Foundation under grant MIP-9311980.  The
+ original version of this code was written as part of a project to build
+ a fixed-point vector processor in collaboration with the University of
+ California at Berkeley, overseen by Profs. Nelson Morgan and John Wawrzynek.
+ .
+ THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
+ has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
+ TIMES RESULT IN INCORRECT BEHAVIOR.  USE OF THIS SOFTWARE IS RESTRICTED TO
+ PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL
+ LOSSES, COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO
+ FURTHERMORE EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER
+ SCIENCE INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES,
+ COSTS, OR OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE
+ SOFTWARE.
+ .
+ Derivative works are acceptable, even for commercial purposes, provided
+ that the minimal documentation requirements stated in the source code are
+ satisfied.
+
+Files: 3rdparty/sqlite3/*
+Copyright: D. Richard Hipp <drh at hwaci.com>
+License: public-domain
+
+Files: 3rdparty/zlib/*
+Copyright: 1995-2005 Jean-loup Gailly and Mark Adler
+License: Zlib
+ Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
+ .
+ This software is provided 'as-is', without any express or implied
+ warranty.  In no event will the authors be held liable for any damages
+ arising from the use of this software.
+ .
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+ .
+ 1. The origin of this software must not be misrepresented; you must not
+    claim that you wrote the original software. If you use this software
+    in a product, an acknowledgment in the product documentation would be
+    appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+    misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+ .
+ Jean-loup Gailly        Mark Adler
+ jloup at gzip.org          madler at alumni.caltech.edu
+ . 
+ The data format used by the zlib library is described by RFCs (Request for
+ Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
+ (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
+
+License: GPL-2+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file /usr/share/common-licenses/GPL-2.
+
+License: GPL-3+
+ 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.
+ On Debian systems, the full text of the GNU General Public
+ License version 3 can be found in the file /usr/share/common-licenses/GPL-3.
+
+License: LGPL-2.1+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 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 Lesser General Public
+ License for more details.
+ .
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; see the file COPYING.LIB.  If not, write to
+ the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ MA 02110-1301, USA.
+ .
+ On Debian systems, the full text of the GNU Lesser General Public
+ License version 2.1 can be found in the file 
+ /usr/share/common-licenses/LGPL-2.1
+
+License: public-domain
+ This code implements the MD5 message-digest algorithm.
+ The algorithm is due to Ron Rivest.  This code was
+ written by Colin Plumb in 1993, no copyright is claimed.
+ This code is in the public domain; do with it what you wish.
+ .
+ Equivalent code is available from RSA Data Security, Inc.
+ This code has been tested against that, and is equivalent,
+ except that you don't need to include two pages of legalese
+ with every copy.
+ .
+ To compute the message digest of a chunk of bytes, declare an
+ MD5Context structure, pass it to MD5Init, call MD5Update as
+ needed on buffers full of bytes, and then call MD5Final, which
+ will fill a supplied 16-byte array with the digest.
+ . 
+ Changed so as no longer to depend on Colin Plumb's `usual.h' header
+ definitions; now uses stuff from dpkg's config.h.
+ - Ian Jackson <ijackson at nyx.cs.du.edu>.
+ Still in the public domain.
+
+License: BSD-3-clause
+ Copyright (c) The Regents of the University of California.
+ All rights reserved.
+ .
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the University nor the names of its contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+License: MIT
+ 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.
diff --git a/debian/install/hicolor/128x128/apps/mame.png b/debian/install/hicolor/128x128/apps/mame.png
new file mode 100644
index 0000000..d44cb2a
Binary files /dev/null and b/debian/install/hicolor/128x128/apps/mame.png differ
diff --git a/debian/install/hicolor/16x16/apps/mame.png b/debian/install/hicolor/16x16/apps/mame.png
new file mode 100644
index 0000000..5a9118c
Binary files /dev/null and b/debian/install/hicolor/16x16/apps/mame.png differ
diff --git a/debian/install/hicolor/22x22/apps/mame.png b/debian/install/hicolor/22x22/apps/mame.png
new file mode 100644
index 0000000..9a40ac5
Binary files /dev/null and b/debian/install/hicolor/22x22/apps/mame.png differ
diff --git a/debian/install/hicolor/24x24/apps/mame.png b/debian/install/hicolor/24x24/apps/mame.png
new file mode 100644
index 0000000..9d86f91
Binary files /dev/null and b/debian/install/hicolor/24x24/apps/mame.png differ
diff --git a/debian/install/hicolor/32x32/apps/mame.png b/debian/install/hicolor/32x32/apps/mame.png
new file mode 100644
index 0000000..f7c94d1
Binary files /dev/null and b/debian/install/hicolor/32x32/apps/mame.png differ
diff --git a/debian/install/hicolor/48x48/apps/mame.png b/debian/install/hicolor/48x48/apps/mame.png
new file mode 100644
index 0000000..99e9e6e
Binary files /dev/null and b/debian/install/hicolor/48x48/apps/mame.png differ
diff --git a/debian/install/hicolor/72x72/apps/mame.png b/debian/install/hicolor/72x72/apps/mame.png
new file mode 100644
index 0000000..9e0cf1d
Binary files /dev/null and b/debian/install/hicolor/72x72/apps/mame.png differ
diff --git a/debian/install/mame.desktop b/debian/install/mame.desktop
new file mode 100644
index 0000000..e5bc463
--- /dev/null
+++ b/debian/install/mame.desktop
@@ -0,0 +1,19 @@
+[Desktop Entry]
+Name=MAME™ Arcade Emulator
+Name[ca]=Emulador de jocs arcade MAME™
+Name[fr]=Emulateur arcade MAME™
+Name[it]=Emulatore di giochi arcade MAME™
+GenericName=Arcade Emulator
+GenericName[ca]=Emulador de jocs arcade
+GenericName[fr]=Emulateur arcade
+GenericName[it]=Emulatore di giochi arcade
+Comment=Play vintage arcade games using the MAME™ emulator
+Comment[ca]=Jugueu a jocs d'arcade antics emprant l'emulador MAME™
+Comment[fr]=Jugueu a jocs d'arcade antics emprant l'emulador MAME™
+Comment[it]=Gioca ai vecchi arcade con l'emulatore MAME™
+Exec=/usr/games/mame
+Icon=mame
+Terminal=false
+Type=Application
+Categories=Game;Emulator;
+Keywords=Game;Emulator;Arcade;
diff --git a/debian/mame-data.dirs b/debian/mame-data.dirs
new file mode 100644
index 0000000..f60865e
--- /dev/null
+++ b/debian/mame-data.dirs
@@ -0,0 +1 @@
+usr/share/games/mame/crosshair
diff --git a/debian/mame-data.install b/debian/mame-data.install
new file mode 100644
index 0000000..a95bfbd
--- /dev/null
+++ b/debian/mame-data.install
@@ -0,0 +1,9 @@
+artwork/* usr/share/games/mame/artwork
+bgfx/* usr/share/games/mame/bgfx
+ctrlr/* usr/share/games/mame/ctrlr
+hash/* usr/share/games/mame/hash
+keymaps/*LINUX.map usr/share/games/mame/keymaps
+language/* usr/share/games/mame/language
+plugins/* usr/share/games/mame/plugins
+samples/* usr/share/games/mame/samples
+uismall.bdf usr/share/games/mame/fonts
diff --git a/debian/mame-data.lintian-overrides b/debian/mame-data.lintian-overrides
new file mode 100644
index 0000000..b549103
--- /dev/null
+++ b/debian/mame-data.lintian-overrides
@@ -0,0 +1 @@
+mame-data: package-contains-empty-directory usr/share/games/mame/crosshair/
diff --git a/debian/mame-doc.doc-base b/debian/mame-doc.doc-base
new file mode 100644
index 0000000..6d792d8
--- /dev/null
+++ b/debian/mame-doc.doc-base
@@ -0,0 +1,9 @@
+Document: mame
+Title: MAME Documentation
+Author: MAMEdev Team
+Abstract: This manual describes all aspects of MAME for users and developers.
+Section: Emulators
+
+Format: HTML
+Index: /usr/share/doc/mame-doc/singlehtml/index.html
+Files: /usr/share/doc/mame-doc/singlehtml/index.html
diff --git a/debian/mame-doc.docs b/debian/mame-doc.docs
new file mode 100644
index 0000000..3ddce4b
--- /dev/null
+++ b/debian/mame-doc.docs
@@ -0,0 +1 @@
+docs/build/singlehtml
diff --git a/debian/mame-doc.links b/debian/mame-doc.links
new file mode 100644
index 0000000..1142877
--- /dev/null
+++ b/debian/mame-doc.links
@@ -0,0 +1,2 @@
+/usr/share/javascript/sphinxdoc/1.0/jquery.js usr/share/doc/mame-doc/singlehtml/_static/jquery.js
+/usr/share/javascript/sphinxdoc/1.0/underscore.js usr/share/doc/mame-doc/singlehtml/_static/underscore.js
diff --git a/debian/mame-get-roms.sh b/debian/mame-get-roms.sh
new file mode 100644
index 0000000..d46899b
--- /dev/null
+++ b/debian/mame-get-roms.sh
@@ -0,0 +1,45 @@
+    DESTPATH="/usr/share/games/mame/roms/";
+    FREEROMS=(
+      'Robby Roto (Ballt/Midway)'  'http://www.mamedev.org/roms/robby/robby.zip' \
+      'Gridlee (Videa)'            'http://www.mamedev.org/roms/gridlee/gridlee.zip' \
+      'Alien Arena (Duncan Brown)' 'http://www.mamedev.org/roms/alienar/alienar.zip' \
+      'Teeter Torture (Exidy)'     'http://www.mamedev.org/roms/teetert/teetert.zip' \
+      'Circus (Exidy)'             'http://www.mamedev.org/roms/circus/circus.zip' \
+      'Robot Bowl (Exidy)'         'http://www.mamedev.org/roms/robotbwl/robotbwl.zip' \
+      'Car Polo (Exidy)'           'http://www.mamedev.org/roms/carpolo/carpolo.zip' \
+      'Rip Cord (Exidy)'           'http://www.mamedev.org/roms/ripcord/ripcord.zip' \
+      'Fire One (Exidy)'           'http://www.mamedev.org/roms/fireone/fireone.zip' \
+      'Crash (Exidy)'              'http://www.mamedev.org/roms/crash/crash.zip' \
+      'Star Fire (Exidy)'          'http://www.mamedev.org/roms/starfire/starfire.zip' \
+      'Side Track (Exidy)'         'http://www.mamedev.org/roms/sidetrac/sidetrac.zip' \
+      'Spectar (Exidy)'            'http://www.mamedev.org/roms/spectar/spectar.zip' \
+      'Targ (Exidy)'               'http://www.mamedev.org/roms/targ/targ.zip' \
+    );
+    NBROMS=$((${#FREEROMS[@]}/2));
+
+    if [ ! -d ${DESTPATH} ]; then
+      mkdir -p ${DESTPATH}
+    fi
+
+    for (( i = 0 ; i < ${#FREEROMS[@]} ; i=i+2 ))
+    do
+      ROMPATH=${DESTPATH}$(basename ${FREEROMS[$i+1]});
+      if [ ! -s $ROMPATH ]; then
+        NOTDOWNLOADED="true";
+        break;
+      fi;
+    done
+
+    if [ "$NOTDOWNLOADED" = "true" ]; then
+      db_get mame/getfreeroms
+      if [ "$RET" = "true" ]; then
+        for (( i = 0 ; i < ${#FREEROMS[@]} ; i=i+2 ))
+        do
+          ROMPATH=${DESTPATH}$(basename ${FREEROMS[$i+1]});
+          #echo -en "\n-- $(((i+1)/2))/${NBROMS}. ${FREEROMS[$i]} ";
+          wget --user-agent="MAME package for Debian/Ubuntu <ludomatic at gmail.com>" ${FREEROMS[$i+1]} -O "$ROMPATH";
+          if [ $? -ne 0 ]; then NOTCOMPLETE="true" ; fi;
+          if [ ! -s $ROMPATH ]; then NOTCOMPLETE="true" ; fi;
+        done
+      fi
+    fi
diff --git a/debian/mame-tools.install b/debian/mame-tools.install
new file mode 100644
index 0000000..c1851c5
--- /dev/null
+++ b/debian/mame-tools.install
@@ -0,0 +1,8 @@
+castool usr/bin
+chdman usr/bin
+floptool usr/bin
+imgtool usr/bin
+jedutil usr/bin
+ldresample usr/bin
+ldverify usr/bin
+romcmp usr/bin
diff --git a/debian/mame-tools.manpages b/debian/mame-tools.manpages
new file mode 100644
index 0000000..577ac79
--- /dev/null
+++ b/debian/mame-tools.manpages
@@ -0,0 +1,8 @@
+docs/man/castool.1
+docs/man/chdman.1
+docs/man/floptool.1
+docs/man/imgtool.1
+docs/man/jedutil.1
+docs/man/ldresample.1
+docs/man/ldverify.1
+docs/man/romcmp.1
diff --git a/debian/mame.README.Debian b/debian/mame.README.Debian
new file mode 100644
index 0000000..783c5e7
--- /dev/null
+++ b/debian/mame.README.Debian
@@ -0,0 +1,85 @@
+== HISTORY ==
+
+This package supersedes the xmame-* packages, as the unix sdl port of Mame
+has been integrated in official mame since 0.136.
+See http://rbelmont.mameworld.info/?p=519 for info.
+
+== QUICK START ==
+
+1. Create a folder "mame" and a subfolder "mame/roms" in your home directory.
+
+2. Download the freely available rom World Rally from http://gaelco.com
+and put the wrally.zip file in the "roms" folder.
+
+3. Check now the sanity of your roms. Mame is very picky about that.
+
+{{{
+mame -verifyroms
+
+wrally  : tibpal20l8-25cnt.b23 (260 bytes) - NOT FOUND - NO GOOD DUMP KNOWN
+wrally  : gal16v8-25lnc.h21 (260 bytes) - NOT FOUND - NO GOOD DUMP KNOWN
+wrally  : tibpal20l8-25cnt.h15 (260 bytes) - NOT FOUND - NO GOOD DUMP KNOWN
+romset wrally is best available
+mac2bios: macs2os_l.bin (524288 bytes) - NOT FOUND - NO GOOD DUMP KNOWN
+mac2bios: macs2os_h.bin (524288 bytes) - NOT FOUND - NO GOOD DUMP KNOWN
+romset mac2bios is best available
+2 romsets found, 2 were OK.
+}}}
+
+You can safely ignore the mac2bios warning.
+
+4. Now start Mame with the command "mame" from the shell 
+or from your desktop applications menu.
+
+5. Basic keyboard commands include
+  * 5 key to insert a coin
+  * 1 key to start the game 
+  * Tab key to access the mame internal menu
+
+6. If mame is way too slow on your computer and you have 3D hardware 
+acceleration available, change the "video" parameter from "soft" to "opengl"
+in the Mame configuration file.
+
+== DEFAULT FILES PATH ==
+
+  * MAME binary: {{{/usr/games/mame}}}
+  * MAME tools directory: {{{/usr/bin}}} (chdman, ldresample, ...)
+  * Configuration file: {{{$HOME/.mame/mame.ini}}} or {{{/etc/mame/mame.ini}}}
+  * Output folders: {{{$HOME/.mame}}} (memory cards, snapshots, ...)
+  * Core folders: {{{/usr/share/games/mame}}} (roms, cheats, ...)
+
+== ROMS AND CONFIGURATION ==
+
+A default configuration file is provided with the package and installed 
+in {{{/etc/mame/mame.ini}}}
+
+If you need to change the location of the roms folder or tweak something like 
+video or cheats you can either:
+  * make your own copy of {{{/etc/mame/mame.ini}}} in {{{$HOME/.mame/mame.ini}}} and edit that file (recommended)
+  * edit directly {{{/etc/mame/mame.ini}}} 
+
+You can verify that MAME has read the correct options with "{{{mame -showconfig}}}"
+and even create a fresh mame.ini file with "{{{mame -createconfig}}}".
+
+If you upgraded from a previous version of mame, you might have to replace your
+rom sets, see the [[http://bit.ly/nBnkIf|Mame FAQ on ROMs]].
+
+== TOOLS ==
+
+MAME utilities like chdman, jedutil, ldresample or ldverify are available in a
+separate extra package called DebianPkg:mame-tools.
+
+== PATCH ==
+
+This package uses quilt to manage all modifications to the upstream source.
+Changes are stored in the source package as diffs in debian/patches and applied
+during the build. See {{{/usr/share/doc/quilt/README.source}}} for a detailed
+explanation.
+
+== ARTWORK ==
+
+Backdrop, overlay and bezel artwork can be downloaded from http://mirror.xmission.com/mame/ individually or globally with the following command (provided your artwork search path is {{{$HOME/mame/artwork}}}, which is the default)
+{{{
+wget --no-directories --recursive   --directory-prefix $HOME/mame/artwork ftp://mirror.xmission.com/mame/artwork/
+}}}
+
diff --git a/debian/mame.dirs b/debian/mame.dirs
new file mode 100644
index 0000000..8d327447
--- /dev/null
+++ b/debian/mame.dirs
@@ -0,0 +1,9 @@
+usr/share/games/mame/cheat
+usr/share/games/mame/roms
+usr/share/games/mame/samples
+usr/local/share/games/mame/artwork
+usr/local/share/games/mame/cheat
+usr/local/share/games/mame/crosshair
+usr/local/share/games/mame/hash
+usr/local/share/games/mame/roms
+usr/local/share/games/mame/samples
diff --git a/debian/mame.examples b/debian/mame.examples
new file mode 100644
index 0000000..58ad2d9
--- /dev/null
+++ b/debian/mame.examples
@@ -0,0 +1,3 @@
+default.mame.ini
+default.plugin.ini
+default.ui.ini
diff --git a/debian/mame.ini b/debian/mame.ini
new file mode 100644
index 0000000..bb574e7
--- /dev/null
+++ b/debian/mame.ini
@@ -0,0 +1,41 @@
+# Default MAME configuration file for Debian
+# See /usr/share/doc/mame/examples/default.mame.ini
+# for an example file with all possible options.
+#
+# Allow per-user mame.ini configuration files
+inipath                  $HOME/.mame;/etc/mame
+#
+# Default data search paths
+rompath                 $HOME/mame/roms;/usr/local/share/games/mame/roms;/usr/share/games/mame/roms
+samplepath              $HOME/mame/samples;/usr/local/share/games/mame/samples;/usr/share/games/mame/samples
+cheatpath               $HOME/mame/cheat;/usr/local/share/games/mame/cheat;/usr/share/games/mame/cheat
+artpath                 $HOME/mame/artwork;/usr/local/share/games/mame/artwork;/usr/share/games/mame/artwork
+crosshairpath           $HOME/mame/crosshair;/usr/local/share/games/mame/crosshair;/usr/share/games/mame/crosshair
+hashpath                /usr/share/games/mame/hash
+ctrlrpath               /usr/share/games/mame/ctrlr
+fontpath                /usr/share/games/mame/fonts
+bgfx_path               /usr/share/games/mame/bgfx
+pluginspath             /usr/share/games/mame/plugins
+languagepath            /usr/share/games/mame/language
+#
+# Default data output paths
+cfg_directory           $HOME/.mame/cfg
+nvram_directory         $HOME/.mame/nvram
+memcard_directory       $HOME/.mame/memcard
+input_directory         $HOME/.mame/inp
+state_directory         $HOME/.mame/sta
+snapshot_directory      $HOME/.mame/snap
+diff_directory          $HOME/.mame/diff
+comment_directory       $HOME/.mame/comments
+#
+# Debian feature defaults
+# Set video to 'soft' if DRI is not reliable on your hardware
+video                   opengl
+# Set numprocessors to auto for better performance
+numprocessors           auto
+# Set window to '1' if you want MAME to start in a window
+window                  0
+# Enable mouse support
+mouse                   1
+# Set key to toggle full/partial emulation to Ins
+uimodekey               INSERT
diff --git a/debian/mame.install b/debian/mame.install
new file mode 100644
index 0000000..009d96a
--- /dev/null
+++ b/debian/mame.install
@@ -0,0 +1,11 @@
+mame usr/games
+debian/mame.ini etc/mame
+debian/install/hicolor/16x16/apps/mame.png usr/share/icons/hicolor/16x16/apps
+debian/install/hicolor/22x22/apps/mame.png usr/share/icons/hicolor/22x22/apps
+debian/install/hicolor/24x24/apps/mame.png usr/share/icons/hicolor/24x24/apps
+debian/install/hicolor/32x32/apps/mame.png usr/share/icons/hicolor/32x32/apps
+debian/install/hicolor/48x48/apps/mame.png usr/share/icons/hicolor/48x48/apps
+debian/install/hicolor/72x72/apps/mame.png usr/share/icons/hicolor/72x72/apps
+debian/install/hicolor/128x128/apps/mame.png usr/share/icons/hicolor/128x128/apps
+debian/install/mame.desktop usr/share/applications
+ini/* etc/mame
diff --git a/debian/mame.lintian-overrides b/debian/mame.lintian-overrides
new file mode 100644
index 0000000..02b059a
--- /dev/null
+++ b/debian/mame.lintian-overrides
@@ -0,0 +1,3 @@
+mame binary: package-contains-empty-directory usr/share/games/mame/cheat/
+mame binary: package-contains-empty-directory usr/share/games/mame/roms/
+mame binary: package-contains-empty-directory usr/share/games/mame/samples/
diff --git a/debian/mame.manpages b/debian/mame.manpages
new file mode 100644
index 0000000..b73cfbe
--- /dev/null
+++ b/debian/mame.manpages
@@ -0,0 +1 @@
+docs/man/mame.6
diff --git a/debian/missing-sources/modernizr.js b/debian/missing-sources/modernizr.js
new file mode 100644
index 0000000..56a0022
--- /dev/null
+++ b/debian/missing-sources/modernizr.js
@@ -0,0 +1,1393 @@
+/*!
+ * Modernizr v2.6.2
+ * www.modernizr.com
+ *
+ * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton
+ * Available under the BSD and MIT licenses: www.modernizr.com/license/
+ */
+
+/*
+ * Modernizr tests which native CSS3 and HTML5 features are available in
+ * the current UA and makes the results available to you in two ways:
+ * as properties on a global Modernizr object, and as classes on the
+ * <html> element. This information allows you to progressively enhance
+ * your pages with a granular level of control over the experience.
+ *
+ * Modernizr has an optional (not included) conditional resource loader
+ * called Modernizr.load(), based on Yepnope.js (yepnopejs.com).
+ * To get a build that includes Modernizr.load(), as well as choosing
+ * which tests to include, go to www.modernizr.com/download/
+ *
+ * Authors        Faruk Ates, Paul Irish, Alex Sexton
+ * Contributors   Ryan Seddon, Ben Alman
+ */
+
+window.Modernizr = (function( window, document, undefined ) {
+
+    var version = '2.6.2',
+
+    Modernizr = {},
+
+    /*>>cssclasses*/
+    // option for enabling the HTML classes to be added
+    enableClasses = true,
+    /*>>cssclasses*/
+
+    docElement = document.documentElement,
+
+    /**
+     * Create our "modernizr" element that we do most feature tests on.
+     */
+    mod = 'modernizr',
+    modElem = document.createElement(mod),
+    mStyle = modElem.style,
+
+    /**
+     * Create the input element for various Web Forms feature tests.
+     */
+    inputElem /*>>inputelem*/ = document.createElement('input') /*>>inputelem*/ ,
+
+    /*>>smile*/
+    smile = ':)',
+    /*>>smile*/
+
+    toString = {}.toString,
+
+    // TODO :: make the prefixes more granular
+    /*>>prefixes*/
+    // List of property values to set for css tests. See ticket #21
+    prefixes = ' -webkit- -moz- -o- -ms- '.split(' '),
+    /*>>prefixes*/
+
+    /*>>domprefixes*/
+    // Following spec is to expose vendor-specific style properties as:
+    //   elem.style.WebkitBorderRadius
+    // and the following would be incorrect:
+    //   elem.style.webkitBorderRadius
+
+    // Webkit ghosts their properties in lowercase but Opera & Moz do not.
+    // Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+
+    //   erik.eae.net/archives/2008/03/10/21.48.10/
+
+    // More here: github.com/Modernizr/Modernizr/issues/issue/21
+    omPrefixes = 'Webkit Moz O ms',
+
+    cssomPrefixes = omPrefixes.split(' '),
+
+    domPrefixes = omPrefixes.toLowerCase().split(' '),
+    /*>>domprefixes*/
+
+    /*>>ns*/
+    ns = {'svg': 'http://www.w3.org/2000/svg'},
+    /*>>ns*/
+
+    tests = {},
+    inputs = {},
+    attrs = {},
+
+    classes = [],
+
+    slice = classes.slice,
+
+    featureName, // used in testing loop
+
+
+    /*>>teststyles*/
+    // Inject element with style element and some CSS rules
+    injectElementWithStyles = function( rule, callback, nodes, testnames ) {
+
+      var style, ret, node, docOverflow,
+          div = document.createElement('div'),
+          // After page load injecting a fake body doesn't work so check if body exists
+          body = document.body,
+          // IE6 and 7 won't return offsetWidth or offsetHeight unless it's in the body element, so we fake it.
+          fakeBody = body || document.createElement('body');
+
+      if ( parseInt(nodes, 10) ) {
+          // In order not to give false positives we create a node for each test
+          // This also allows the method to scale for unspecified uses
+          while ( nodes-- ) {
+              node = document.createElement('div');
+              node.id = testnames ? testnames[nodes] : mod + (nodes + 1);
+              div.appendChild(node);
+          }
+      }
+
+      // <style> elements in IE6-9 are considered 'NoScope' elements and therefore will be removed
+      // when injected with innerHTML. To get around this you need to prepend the 'NoScope' element
+      // with a 'scoped' element, in our case the soft-hyphen entity as it won't mess with our measurements.
+      // msdn.microsoft.com/en-us/library/ms533897%28VS.85%29.aspx
+      // Documents served as xml will throw if using ­ so use xml friendly encoded version. See issue #277
+      style = ['­','<style id="s', mod, '">', rule, '</style>'].join('');
+      div.id = mod;
+      // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.
+      // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270
+      (body ? div : fakeBody).innerHTML += style;
+      fakeBody.appendChild(div);
+      if ( !body ) {
+          //avoid crashing IE8, if background image is used
+          fakeBody.style.background = '';
+          //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible
+          fakeBody.style.overflow = 'hidden';
+          docOverflow = docElement.style.overflow;
+          docElement.style.overflow = 'hidden';
+          docElement.appendChild(fakeBody);
+      }
+
+      ret = callback(div, rule);
+      // If this is done after page load we don't want to remove the body so check if body exists
+      if ( !body ) {
+          fakeBody.parentNode.removeChild(fakeBody);
+          docElement.style.overflow = docOverflow;
+      } else {
+          div.parentNode.removeChild(div);
+      }
+
+      return !!ret;
+
+    },
+    /*>>teststyles*/
+
+    /*>>mq*/
+    // adapted from matchMedia polyfill
+    // by Scott Jehl and Paul Irish
+    // gist.github.com/786768
+    testMediaQuery = function( mq ) {
+
+      var matchMedia = window.matchMedia || window.msMatchMedia;
+      if ( matchMedia ) {
+        return matchMedia(mq).matches;
+      }
+
+      var bool;
+
+      injectElementWithStyles('@media ' + mq + ' { #' + mod + ' { position: absolute; } }', function( node ) {
+        bool = (window.getComputedStyle ?
+                  getComputedStyle(node, null) :
+                  node.currentStyle)['position'] == 'absolute';
+      });
+
+      return bool;
+
+     },
+     /*>>mq*/
+
+
+    /*>>hasevent*/
+    //
+    // isEventSupported determines if a given element supports the given event
+    // kangax.github.com/iseventsupported/
+    //
+    // The following results are known incorrects:
+    //   Modernizr.hasEvent("webkitTransitionEnd", elem) // false negative
+    //   Modernizr.hasEvent("textInput") // in Webkit. github.com/Modernizr/Modernizr/issues/333
+    //   ...
+    isEventSupported = (function() {
+
+      var TAGNAMES = {
+        'select': 'input', 'change': 'input',
+        'submit': 'form', 'reset': 'form',
+        'error': 'img', 'load': 'img', 'abort': 'img'
+      };
+
+      function isEventSupported( eventName, element ) {
+
+        element = element || document.createElement(TAGNAMES[eventName] || 'div');
+        eventName = 'on' + eventName;
+
+        // When using `setAttribute`, IE skips "unload", WebKit skips "unload" and "resize", whereas `in` "catches" those
+        var isSupported = eventName in element;
+
+        if ( !isSupported ) {
+          // If it has no `setAttribute` (i.e. doesn't implement Node interface), try generic element
+          if ( !element.setAttribute ) {
+            element = document.createElement('div');
+          }
+          if ( element.setAttribute && element.removeAttribute ) {
+            element.setAttribute(eventName, '');
+            isSupported = is(element[eventName], 'function');
+
+            // If property was created, "remove it" (by setting value to `undefined`)
+            if ( !is(element[eventName], 'undefined') ) {
+              element[eventName] = undefined;
+            }
+            element.removeAttribute(eventName);
+          }
+        }
+
+        element = null;
+        return isSupported;
+      }
+      return isEventSupported;
+    })(),
+    /*>>hasevent*/
+
+    // TODO :: Add flag for hasownprop ? didn't last time
+
+    // hasOwnProperty shim by kangax needed for Safari 2.0 support
+    _hasOwnProperty = ({}).hasOwnProperty, hasOwnProp;
+
+    if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) {
+      hasOwnProp = function (object, property) {
+        return _hasOwnProperty.call(object, property);
+      };
+    }
+    else {
+      hasOwnProp = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */
+        return ((property in object) && is(object.constructor.prototype[property], 'undefined'));
+      };
+    }
+
+    // Adapted from ES5-shim https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js
+    // es5.github.com/#x15.3.4.5
+
+    if (!Function.prototype.bind) {
+      Function.prototype.bind = function bind(that) {
+
+        var target = this;
+
+        if (typeof target != "function") {
+            throw new TypeError();
+        }
+
+        var args = slice.call(arguments, 1),
+            bound = function () {
+
+            if (this instanceof bound) {
+
+              var F = function(){};
+              F.prototype = target.prototype;
+              var self = new F();
+
+              var result = target.apply(
+                  self,
+                  args.concat(slice.call(arguments))
+              );
+              if (Object(result) === result) {
+                  return result;
+              }
+              return self;
+
+            } else {
+
+              return target.apply(
+                  that,
+                  args.concat(slice.call(arguments))
+              );
+
+            }
+
+        };
+
+        return bound;
+      };
+    }
+
+    /**
+     * setCss applies given styles to the Modernizr DOM node.
+     */
+    function setCss( str ) {
+        mStyle.cssText = str;
+    }
+
+    /**
+     * setCssAll extrapolates all vendor-specific css strings.
+     */
+    function setCssAll( str1, str2 ) {
+        return setCss(prefixes.join(str1 + ';') + ( str2 || '' ));
+    }
+
+    /**
+     * is returns a boolean for if typeof obj is exactly type.
+     */
+    function is( obj, type ) {
+        return typeof obj === type;
+    }
+
+    /**
+     * contains returns a boolean for if substr is found within str.
+     */
+    function contains( str, substr ) {
+        return !!~('' + str).indexOf(substr);
+    }
+
+    /*>>testprop*/
+
+    // testProps is a generic CSS / DOM property test.
+
+    // In testing support for a given CSS property, it's legit to test:
+    //    `elem.style[styleName] !== undefined`
+    // If the property is supported it will return an empty string,
+    // if unsupported it will return undefined.
+
+    // We'll take advantage of this quick test and skip setting a style
+    // on our modernizr element, but instead just testing undefined vs
+    // empty string.
+
+    // Because the testing of the CSS property names (with "-", as
+    // opposed to the camelCase DOM properties) is non-portable and
+    // non-standard but works in WebKit and IE (but not Gecko or Opera),
+    // we explicitly reject properties with dashes so that authors
+    // developing in WebKit or IE first don't end up with
+    // browser-specific content by accident.
+
+    function testProps( props, prefixed ) {
+        for ( var i in props ) {
+            var prop = props[i];
+            if ( !contains(prop, "-") && mStyle[prop] !== undefined ) {
+                return prefixed == 'pfx' ? prop : true;
+            }
+        }
+        return false;
+    }
+    /*>>testprop*/
+
+    // TODO :: add testDOMProps
+    /**
+     * testDOMProps is a generic DOM property test; if a browser supports
+     *   a certain property, it won't return undefined for it.
+     */
+    function testDOMProps( props, obj, elem ) {
+        for ( var i in props ) {
+            var item = obj[props[i]];
+            if ( item !== undefined) {
+
+                // return the property name as a string
+                if (elem === false) return props[i];
+
+                // let's bind a function
+                if (is(item, 'function')){
+                  // default to autobind unless override
+                  return item.bind(elem || obj);
+                }
+
+                // return the unbound function or obj or value
+                return item;
+            }
+        }
+        return false;
+    }
+
+    /*>>testallprops*/
+    /**
+     * testPropsAll tests a list of DOM properties we want to check against.
+     *   We specify literally ALL possible (known and/or likely) properties on
+     *   the element including the non-vendor prefixed one, for forward-
+     *   compatibility.
+     */
+    function testPropsAll( prop, prefixed, elem ) {
+
+        var ucProp  = prop.charAt(0).toUpperCase() + prop.slice(1),
+            props   = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');
+
+        // did they call .prefixed('boxSizing') or are we just testing a prop?
+        if(is(prefixed, "string") || is(prefixed, "undefined")) {
+          return testProps(props, prefixed);
+
+        // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])
+        } else {
+          props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');
+          return testDOMProps(props, prefixed, elem);
+        }
+    }
+    /*>>testallprops*/
+
+
+    /**
+     * Tests
+     * -----
+     */
+
+    // The *new* flexbox
+    // dev.w3.org/csswg/css3-flexbox
+
+    tests['flexbox'] = function() {
+      return testPropsAll('flexWrap');
+    };
+
+    // The *old* flexbox
+    // www.w3.org/TR/2009/WD-css3-flexbox-20090723/
+
+    tests['flexboxlegacy'] = function() {
+        return testPropsAll('boxDirection');
+    };
+
+    // On the S60 and BB Storm, getContext exists, but always returns undefined
+    // so we actually have to call getContext() to verify
+    // github.com/Modernizr/Modernizr/issues/issue/97/
+
+    tests['canvas'] = function() {
+        var elem = document.createElement('canvas');
+        return !!(elem.getContext && elem.getContext('2d'));
+    };
+
+    tests['canvastext'] = function() {
+        return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function'));
+    };
+
+    // webk.it/70117 is tracking a legit WebGL feature detect proposal
+
+    // We do a soft detect which may false positive in order to avoid
+    // an expensive context creation: bugzil.la/732441
+
+    tests['webgl'] = function() {
+        return !!window.WebGLRenderingContext;
+    };
+
+    /*
+     * The Modernizr.touch test only indicates if the browser supports
+     *    touch events, which does not necessarily reflect a touchscreen
+     *    device, as evidenced by tablets running Windows 7 or, alas,
+     *    the Palm Pre / WebOS (touch) phones.
+     *
+     * Additionally, Chrome (desktop) used to lie about its support on this,
+     *    but that has since been rectified: crbug.com/36415
+     *
+     * We also test for Firefox 4 Multitouch Support.
+     *
+     * For more info, see: modernizr.github.com/Modernizr/touch.html
+     */
+
+    tests['touch'] = function() {
+        var bool;
+
+        if(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
+          bool = true;
+        } else {
+          injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''), function( node ) {
+            bool = node.offsetTop === 9;
+          });
+        }
+
+        return bool;
+    };
+
+
+    // geolocation is often considered a trivial feature detect...
+    // Turns out, it's quite tricky to get right:
+    //
+    // Using !!navigator.geolocation does two things we don't want. It:
+    //   1. Leaks memory in IE9: github.com/Modernizr/Modernizr/issues/513
+    //   2. Disables page caching in WebKit: webk.it/43956
+    //
+    // Meanwhile, in Firefox < 8, an about:config setting could expose
+    // a false positive that would throw an exception: bugzil.la/688158
+
+    tests['geolocation'] = function() {
+        return 'geolocation' in navigator;
+    };
+
+
+    tests['postmessage'] = function() {
+      return !!window.postMessage;
+    };
+
+
+    // Chrome incognito mode used to throw an exception when using openDatabase
+    // It doesn't anymore.
+    tests['websqldatabase'] = function() {
+      return !!window.openDatabase;
+    };
+
+    // Vendors had inconsistent prefixing with the experimental Indexed DB:
+    // - Webkit's implementation is accessible through webkitIndexedDB
+    // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB
+    // For speed, we don't test the legacy (and beta-only) indexedDB
+    tests['indexedDB'] = function() {
+      return !!testPropsAll("indexedDB", window);
+    };
+
+    // documentMode logic from YUI to filter out IE8 Compat Mode
+    //   which false positives.
+    tests['hashchange'] = function() {
+      return isEventSupported('hashchange', window) && (document.documentMode === undefined || document.documentMode > 7);
+    };
+
+    // Per 1.6:
+    // This used to be Modernizr.historymanagement but the longer
+    // name has been deprecated in favor of a shorter and property-matching one.
+    // The old API is still available in 1.6, but as of 2.0 will throw a warning,
+    // and in the first release thereafter disappear entirely.
+    tests['history'] = function() {
+      return !!(window.history && history.pushState);
+    };
+
+    tests['draganddrop'] = function() {
+        var div = document.createElement('div');
+        return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div);
+    };
+
+    // FF3.6 was EOL'ed on 4/24/12, but the ESR version of FF10
+    // will be supported until FF19 (2/12/13), at which time, ESR becomes FF17.
+    // FF10 still uses prefixes, so check for it until then.
+    // for more ESR info, see: mozilla.org/en-US/firefox/organizations/faq/
+    tests['websockets'] = function() {
+        return 'WebSocket' in window || 'MozWebSocket' in window;
+    };
+
+
+    // css-tricks.com/rgba-browser-support/
+    tests['rgba'] = function() {
+        // Set an rgba() color and check the returned value
+
+        setCss('background-color:rgba(150,255,150,.5)');
+
+        return contains(mStyle.backgroundColor, 'rgba');
+    };
+
+    tests['hsla'] = function() {
+        // Same as rgba(), in fact, browsers re-map hsla() to rgba() internally,
+        //   except IE9 who retains it as hsla
+
+        setCss('background-color:hsla(120,40%,100%,.5)');
+
+        return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla');
+    };
+
+    tests['multiplebgs'] = function() {
+        // Setting multiple images AND a color on the background shorthand property
+        //  and then querying the style.background property value for the number of
+        //  occurrences of "url(" is a reliable method for detecting ACTUAL support for this!
+
+        setCss('background:url(https://),url(https://),red url(https://)');
+
+        // If the UA supports multiple backgrounds, there should be three occurrences
+        //   of the string "url(" in the return value for elemStyle.background
+
+        return (/(url\s*\(.*?){3}/).test(mStyle.background);
+    };
+
+
+
+    // this will false positive in Opera Mini
+    //   github.com/Modernizr/Modernizr/issues/396
+
+    tests['backgroundsize'] = function() {
+        return testPropsAll('backgroundSize');
+    };
+
+    tests['borderimage'] = function() {
+        return testPropsAll('borderImage');
+    };
+
+
+    // Super comprehensive table about all the unique implementations of
+    // border-radius: muddledramblings.com/table-of-css3-border-radius-compliance
+
+    tests['borderradius'] = function() {
+        return testPropsAll('borderRadius');
+    };
+
+    // WebOS unfortunately false positives on this test.
+    tests['boxshadow'] = function() {
+        return testPropsAll('boxShadow');
+    };
+
+    // FF3.0 will false positive on this test
+    tests['textshadow'] = function() {
+        return document.createElement('div').style.textShadow === '';
+    };
+
+
+    tests['opacity'] = function() {
+        // Browsers that actually have CSS Opacity implemented have done so
+        //  according to spec, which means their return values are within the
+        //  range of [0.0,1.0] - including the leading zero.
+
+        setCssAll('opacity:.55');
+
+        // The non-literal . in this regex is intentional:
+        //   German Chrome returns this value as 0,55
+        // github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632
+        return (/^0.55$/).test(mStyle.opacity);
+    };
+
+
+    // Note, Android < 4 will pass this test, but can only animate
+    //   a single property at a time
+    //   daneden.me/2011/12/putting-up-with-androids-bullshit/
+    tests['cssanimations'] = function() {
+        return testPropsAll('animationName');
+    };
+
+
+    tests['csscolumns'] = function() {
+        return testPropsAll('columnCount');
+    };
+
+
+    tests['cssgradients'] = function() {
+        /**
+         * For CSS Gradients syntax, please see:
+         * webkit.org/blog/175/introducing-css-gradients/
+         * developer.mozilla.org/en/CSS/-moz-linear-gradient
+         * developer.mozilla.org/en/CSS/-moz-radial-gradient
+         * dev.w3.org/csswg/css3-images/#gradients-
+         */
+
+        var str1 = 'background-image:',
+            str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));',
+            str3 = 'linear-gradient(left top,#9f9, white);';
+
+        setCss(
+             // legacy webkit syntax (FIXME: remove when syntax not in use anymore)
+              (str1 + '-webkit- '.split(' ').join(str2 + str1) +
+             // standard syntax             // trailing 'background-image:'
+              prefixes.join(str3 + str1)).slice(0, -str1.length)
+        );
+
+        return contains(mStyle.backgroundImage, 'gradient');
+    };
+
+
+    tests['cssreflections'] = function() {
+        return testPropsAll('boxReflect');
+    };
+
+
+    tests['csstransforms'] = function() {
+        return !!testPropsAll('transform');
+    };
+
+
+    tests['csstransforms3d'] = function() {
+
+        var ret = !!testPropsAll('perspective');
+
+        // Webkit's 3D transforms are passed off to the browser's own graphics renderer.
+        //   It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in
+        //   some conditions. As a result, Webkit typically recognizes the syntax but
+        //   will sometimes throw a false positive, thus we must do a more thorough check:
+        if ( ret && 'webkitPerspective' in docElement.style ) {
+
+          // Webkit allows this media query to succeed only if the feature is enabled.
+          // `@media (transform-3d),(-webkit-transform-3d){ ... }`
+          injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}', function( node, rule ) {
+            ret = node.offsetLeft === 9 && node.offsetHeight === 3;
+          });
+        }
+        return ret;
+    };
+
+
+    tests['csstransitions'] = function() {
+        return testPropsAll('transition');
+    };
+
+
+    /*>>fontface*/
+    // @font-face detection routine by Diego Perini
+    // javascript.nwbox.com/CSSSupport/
+
+    // false positives:
+    //   WebOS github.com/Modernizr/Modernizr/issues/342
+    //   WP7   github.com/Modernizr/Modernizr/issues/538
+    tests['fontface'] = function() {
+        var bool;
+
+        injectElementWithStyles('@font-face {font-family:"font";src:url("https://")}', function( node, rule ) {
+          var style = document.getElementById('smodernizr'),
+              sheet = style.sheet || style.styleSheet,
+              cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : '';
+
+          bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0;
+        });
+
+        return bool;
+    };
+    /*>>fontface*/
+
+    // CSS generated content detection
+    tests['generatedcontent'] = function() {
+        var bool;
+
+        injectElementWithStyles(['#',mod,'{font:0/0 a}#',mod,':after{content:"',smile,'";visibility:hidden;font:3px/1 a}'].join(''), function( node ) {
+          bool = node.offsetHeight >= 3;
+        });
+
+        return bool;
+    };
+
+
+
+    // These tests evaluate support of the video/audio elements, as well as
+    // testing what types of content they support.
+    //
+    // We're using the Boolean constructor here, so that we can extend the value
+    // e.g.  Modernizr.video     // true
+    //       Modernizr.video.ogg // 'probably'
+    //
+    // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845
+    //                     thx to NielsLeenheer and zcorpan
+
+    // Note: in some older browsers, "no" was a return value instead of empty string.
+    //   It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2
+    //   It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5
+
+    tests['video'] = function() {
+        var elem = document.createElement('video'),
+            bool = false;
+
+        // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224
+        try {
+            if ( bool = !!elem.canPlayType ) {
+                bool      = new Boolean(bool);
+                bool.ogg  = elem.canPlayType('video/ogg; codecs="theora"')      .replace(/^no$/,'');
+
+                // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546
+                bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"') .replace(/^no$/,'');
+
+                bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,'');
+            }
+
+        } catch(e) { }
+
+        return bool;
+    };
+
+    tests['audio'] = function() {
+        var elem = document.createElement('audio'),
+            bool = false;
+
+        try {
+            if ( bool = !!elem.canPlayType ) {
+                bool      = new Boolean(bool);
+                bool.ogg  = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,'');
+                bool.mp3  = elem.canPlayType('audio/mpeg;')               .replace(/^no$/,'');
+
+                // Mimetypes accepted:
+                //   developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements
+                //   bit.ly/iphoneoscodecs
+                bool.wav  = elem.canPlayType('audio/wav; codecs="1"')     .replace(/^no$/,'');
+                bool.m4a  = ( elem.canPlayType('audio/x-m4a;')            ||
+                              elem.canPlayType('audio/aac;'))             .replace(/^no$/,'');
+            }
+        } catch(e) { }
+
+        return bool;
+    };
+
+
+    // In FF4, if disabled, window.localStorage should === null.
+
+    // Normally, we could not test that directly and need to do a
+    //   `('localStorage' in window) && ` test first because otherwise Firefox will
+    //   throw bugzil.la/365772 if cookies are disabled
+
+    // Also in iOS5 Private Browsing mode, attempting to use localStorage.setItem
+    // will throw the exception:
+    //   QUOTA_EXCEEDED_ERRROR DOM Exception 22.
+    // Peculiarly, getItem and removeItem calls do not throw.
+
+    // Because we are forced to try/catch this, we'll go aggressive.
+
+    // Just FWIW: IE8 Compat mode supports these features completely:
+    //   www.quirksmode.org/dom/html5.html
+    // But IE8 doesn't support either with local files
+
+    tests['localstorage'] = function() {
+        try {
+            localStorage.setItem(mod, mod);
+            localStorage.removeItem(mod);
+            return true;
+        } catch(e) {
+            return false;
+        }
+    };
+
+    tests['sessionstorage'] = function() {
+        try {
+            sessionStorage.setItem(mod, mod);
+            sessionStorage.removeItem(mod);
+            return true;
+        } catch(e) {
+            return false;
+        }
+    };
+
+
+    tests['webworkers'] = function() {
+        return !!window.Worker;
+    };
+
+
+    tests['applicationcache'] = function() {
+        return !!window.applicationCache;
+    };
+
+
+    // Thanks to Erik Dahlstrom
+    tests['svg'] = function() {
+        return !!document.createElementNS && !!document.createElementNS(ns.svg, 'svg').createSVGRect;
+    };
+
+    // specifically for SVG inline in HTML, not within XHTML
+    // test page: paulirish.com/demo/inline-svg
+    tests['inlinesvg'] = function() {
+      var div = document.createElement('div');
+      div.innerHTML = '<svg/>';
+      return (div.firstChild && div.firstChild.namespaceURI) == ns.svg;
+    };
+
+    // SVG SMIL animation
+    tests['smil'] = function() {
+        return !!document.createElementNS && /SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate')));
+    };
+
+    // This test is only for clip paths in SVG proper, not clip paths on HTML content
+    // demo: srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg
+
+    // However read the comments to dig into applying SVG clippaths to HTML content here:
+    //   github.com/Modernizr/Modernizr/issues/213#issuecomment-1149491
+    tests['svgclippaths'] = function() {
+        return !!document.createElementNS && /SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath')));
+    };
+
+    /*>>webforms*/
+    // input features and input types go directly onto the ret object, bypassing the tests loop.
+    // Hold this guy to execute in a moment.
+    function webforms() {
+        /*>>input*/
+        // Run through HTML5's new input attributes to see if the UA understands any.
+        // We're using f which is the <input> element created early on
+        // Mike Taylr has created a comprehensive resource for testing these attributes
+        //   when applied to all input types:
+        //   miketaylr.com/code/input-type-attr.html
+        // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
+
+        // Only input placeholder is tested while textarea's placeholder is not.
+        // Currently Safari 4 and Opera 11 have support only for the input placeholder
+        // Both tests are available in feature-detects/forms-placeholder.js
+        Modernizr['input'] = (function( props ) {
+            for ( var i = 0, len = props.length; i < len; i++ ) {
+                attrs[ props[i] ] = !!(props[i] in inputElem);
+            }
+            if (attrs.list){
+              // safari false positive's on datalist: webk.it/74252
+              // see also github.com/Modernizr/Modernizr/issues/146
+              attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);
+            }
+            return attrs;
+        })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));
+        /*>>input*/
+
+        /*>>inputtypes*/
+        // Run through HTML5's new input types to see if the UA understands any.
+        //   This is put behind the tests runloop because it doesn't return a
+        //   true/false like all the other tests; instead, it returns an object
+        //   containing each input type with its corresponding true/false value
+
+        // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/
+        Modernizr['inputtypes'] = (function(props) {
+
+            for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {
+
+                inputElem.setAttribute('type', inputElemType = props[i]);
+                bool = inputElem.type !== 'text';
+
+                // We first check to see if the type we give it sticks..
+                // If the type does, we feed it a textual value, which shouldn't be valid.
+                // If the value doesn't stick, we know there's input sanitization which infers a custom UI
+                if ( bool ) {
+
+                    inputElem.value         = smile;
+                    inputElem.style.cssText = 'position:absolute;visibility:hidden;';
+
+                    if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {
+
+                      docElement.appendChild(inputElem);
+                      defaultView = document.defaultView;
+
+                      // Safari 2-4 allows the smiley as a value, despite making a slider
+                      bool =  defaultView.getComputedStyle &&
+                              defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&
+                              // Mobile android web browser has false positive, so must
+                              // check the height to see if the widget is actually there.
+                              (inputElem.offsetHeight !== 0);
+
+                      docElement.removeChild(inputElem);
+
+                    } else if ( /^(search|tel)$/.test(inputElemType) ){
+                      // Spec doesn't define any special parsing or detectable UI
+                      //   behaviors so we pass these through as true
+
+                      // Interestingly, opera fails the earlier test, so it doesn't
+                      //  even make it here.
+
+                    } else if ( /^(url|email)$/.test(inputElemType) ) {
+                      // Real url and email support comes with prebaked validation.
+                      bool = inputElem.checkValidity && inputElem.checkValidity() === false;
+
+                    } else {
+                      // If the upgraded input compontent rejects the :) text, we got a winner
+                      bool = inputElem.value != smile;
+                    }
+                }
+
+                inputs[ props[i] ] = !!bool;
+            }
+            return inputs;
+        })('search tel url email datetime date month week time datetime-local number range color'.split(' '));
+        /*>>inputtypes*/
+    }
+    /*>>webforms*/
+
+
+    // End of test definitions
+    // -----------------------
+
+
+
+    // Run through all tests and detect their support in the current UA.
+    // todo: hypothetically we could be doing an array of tests and use a basic loop here.
+    for ( var feature in tests ) {
+        if ( hasOwnProp(tests, feature) ) {
+            // run the test, throw the return value into the Modernizr,
+            //   then based on that boolean, define an appropriate className
+            //   and push it into an array of classes we'll join later.
+            featureName  = feature.toLowerCase();
+            Modernizr[featureName] = tests[feature]();
+
+            classes.push((Modernizr[featureName] ? '' : 'no-') + featureName);
+        }
+    }
+
+    /*>>webforms*/
+    // input tests need to run.
+    Modernizr.input || webforms();
+    /*>>webforms*/
+
+
+    /**
+     * addTest allows the user to define their own feature tests
+     * the result will be added onto the Modernizr object,
+     * as well as an appropriate className set on the html element
+     *
+     * @param feature - String naming the feature
+     * @param test - Function returning true if feature is supported, false if not
+     */
+     Modernizr.addTest = function ( feature, test ) {
+       if ( typeof feature == 'object' ) {
+         for ( var key in feature ) {
+           if ( hasOwnProp( feature, key ) ) {
+             Modernizr.addTest( key, feature[ key ] );
+           }
+         }
+       } else {
+
+         feature = feature.toLowerCase();
+
+         if ( Modernizr[feature] !== undefined ) {
+           // we're going to quit if you're trying to overwrite an existing test
+           // if we were to allow it, we'd do this:
+           //   var re = new RegExp("\\b(no-)?" + feature + "\\b");
+           //   docElement.className = docElement.className.replace( re, '' );
+           // but, no rly, stuff 'em.
+           return Modernizr;
+         }
+
+         test = typeof test == 'function' ? test() : test;
+
+         if (typeof enableClasses !== "undefined" && enableClasses) {
+           docElement.className += ' ' + (test ? '' : 'no-') + feature;
+         }
+         Modernizr[feature] = test;
+
+       }
+
+       return Modernizr; // allow chaining.
+     };
+
+
+    // Reset modElem.cssText to nothing to reduce memory footprint.
+    setCss('');
+    modElem = inputElem = null;
+
+    /*>>shiv*/
+    /*! HTML5 Shiv v3.6.1 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed */
+    ;(function(window, document) {
+    /*jshint evil:true */
+      /** Preset options */
+      var options = window.html5 || {};
+
+      /** Used to skip problem elements */
+      var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
+
+      /** Not all elements can be cloned in IE **/
+      var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
+
+      /** Detect whether the browser supports default html5 styles */
+      var supportsHtml5Styles;
+
+      /** Name of the expando, to work with multiple documents or to re-shiv one document */
+      var expando = '_html5shiv';
+
+      /** The id for the the documents expando */
+      var expanID = 0;
+
+      /** Cached data for each document */
+      var expandoData = {};
+
+      /** Detect whether the browser supports unknown elements */
+      var supportsUnknownElements;
+
+      (function() {
+        try {
+            var a = document.createElement('a');
+            a.innerHTML = '<xyz></xyz>';
+            //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
+            supportsHtml5Styles = ('hidden' in a);
+
+            supportsUnknownElements = a.childNodes.length == 1 || (function() {
+              // assign a false positive if unable to shiv
+              (document.createElement)('a');
+              var frag = document.createDocumentFragment();
+              return (
+                typeof frag.cloneNode == 'undefined' ||
+                typeof frag.createDocumentFragment == 'undefined' ||
+                typeof frag.createElement == 'undefined'
+              );
+            }());
+        } catch(e) {
+          supportsHtml5Styles = true;
+          supportsUnknownElements = true;
+        }
+
+      }());
+
+      /*--------------------------------------------------------------------------*/
+
+      /**
+       * Creates a style sheet with the given CSS text and adds it to the document.
+       * @private
+       * @param {Document} ownerDocument The document.
+       * @param {String} cssText The CSS text.
+       * @returns {StyleSheet} The style element.
+       */
+      function addStyleSheet(ownerDocument, cssText) {
+        var p = ownerDocument.createElement('p'),
+            parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
+
+        p.innerHTML = 'x<style>' + cssText + '</style>';
+        return parent.insertBefore(p.lastChild, parent.firstChild);
+      }
+
+      /**
+       * Returns the value of `html5.elements` as an array.
+       * @private
+       * @returns {Array} An array of shived element node names.
+       */
+      function getElements() {
+        var elements = html5.elements;
+        return typeof elements == 'string' ? elements.split(' ') : elements;
+      }
+
+        /**
+       * Returns the data associated to the given document
+       * @private
+       * @param {Document} ownerDocument The document.
+       * @returns {Object} An object of data.
+       */
+      function getExpandoData(ownerDocument) {
+        var data = expandoData[ownerDocument[expando]];
+        if (!data) {
+            data = {};
+            expanID++;
+            ownerDocument[expando] = expanID;
+            expandoData[expanID] = data;
+        }
+        return data;
+      }
+
+      /**
+       * returns a shived element for the given nodeName and document
+       * @memberOf html5
+       * @param {String} nodeName name of the element
+       * @param {Document} ownerDocument The context document.
+       * @returns {Object} The shived element.
+       */
+      function createElement(nodeName, ownerDocument, data){
+        if (!ownerDocument) {
+            ownerDocument = document;
+        }
+        if(supportsUnknownElements){
+            return ownerDocument.createElement(nodeName);
+        }
+        if (!data) {
+            data = getExpandoData(ownerDocument);
+        }
+        var node;
+
+        if (data.cache[nodeName]) {
+            node = data.cache[nodeName].cloneNode();
+        } else if (saveClones.test(nodeName)) {
+            node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
+        } else {
+            node = data.createElem(nodeName);
+        }
+
+        // Avoid adding some elements to fragments in IE < 9 because
+        // * Attributes like `name` or `type` cannot be set/changed once an element
+        //   is inserted into a document/fragment
+        // * Link elements with `src` attributes that are inaccessible, as with
+        //   a 403 response, will cause the tab/window to crash
+        // * Script elements appended to fragments will execute when their `src`
+        //   or `text` property is set
+        return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
+      }
+
+      /**
+       * returns a shived DocumentFragment for the given document
+       * @memberOf html5
+       * @param {Document} ownerDocument The context document.
+       * @returns {Object} The shived DocumentFragment.
+       */
+      function createDocumentFragment(ownerDocument, data){
+        if (!ownerDocument) {
+            ownerDocument = document;
+        }
+        if(supportsUnknownElements){
+            return ownerDocument.createDocumentFragment();
+        }
+        data = data || getExpandoData(ownerDocument);
+        var clone = data.frag.cloneNode(),
+            i = 0,
+            elems = getElements(),
+            l = elems.length;
+        for(;i<l;i++){
+            clone.createElement(elems[i]);
+        }
+        return clone;
+      }
+
+      /**
+       * Shivs the `createElement` and `createDocumentFragment` methods of the document.
+       * @private
+       * @param {Document|DocumentFragment} ownerDocument The document.
+       * @param {Object} data of the document.
+       */
+      function shivMethods(ownerDocument, data) {
+        if (!data.cache) {
+            data.cache = {};
+            data.createElem = ownerDocument.createElement;
+            data.createFrag = ownerDocument.createDocumentFragment;
+            data.frag = data.createFrag();
+        }
+
+
+        ownerDocument.createElement = function(nodeName) {
+          //abort shiv
+          if (!html5.shivMethods) {
+              return data.createElem(nodeName);
+          }
+          return createElement(nodeName, ownerDocument, data);
+        };
+
+        ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
+          'var n=f.cloneNode(),c=n.createElement;' +
+          'h.shivMethods&&(' +
+            // unroll the `createElement` calls
+            getElements().join().replace(/\w+/g, function(nodeName) {
+              data.createElem(nodeName);
+              data.frag.createElement(nodeName);
+              return 'c("' + nodeName + '")';
+            }) +
+          ');return n}'
+        )(html5, data.frag);
+      }
+
+      /*--------------------------------------------------------------------------*/
+
+      /**
+       * Shivs the given document.
+       * @memberOf html5
+       * @param {Document} ownerDocument The document to shiv.
+       * @returns {Document} The shived document.
+       */
+      function shivDocument(ownerDocument) {
+        if (!ownerDocument) {
+            ownerDocument = document;
+        }
+        var data = getExpandoData(ownerDocument);
+
+        if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
+          data.hasCSS = !!addStyleSheet(ownerDocument,
+            // corrects block display not defined in IE6/7/8/9
+            'article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}' +
+            // adds styling not present in IE6/7/8/9
+            'mark{background:#FF0;color:#000}'
+          );
+        }
+        if (!supportsUnknownElements) {
+          shivMethods(ownerDocument, data);
+        }
+        return ownerDocument;
+      }
+
+      /*--------------------------------------------------------------------------*/
+
+      /**
+       * The `html5` object is exposed so that more elements can be shived and
+       * existing shiving can be detected on iframes.
+       * @type Object
+       * @example
+       *
+       * // options can be changed before the script is included
+       * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
+       */
+      var html5 = {
+
+        /**
+         * An array or space separated string of node names of the elements to shiv.
+         * @memberOf html5
+         * @type Array|String
+         */
+        'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video',
+
+        /**
+         * A flag to indicate that the HTML5 style sheet should be inserted.
+         * @memberOf html5
+         * @type Boolean
+         */
+        'shivCSS': (options.shivCSS !== false),
+
+        /**
+         * Is equal to true if a browser supports creating unknown/HTML5 elements
+         * @memberOf html5
+         * @type boolean
+         */
+        'supportsUnknownElements': supportsUnknownElements,
+
+        /**
+         * A flag to indicate that the document's `createElement` and `createDocumentFragment`
+         * methods should be overwritten.
+         * @memberOf html5
+         * @type Boolean
+         */
+        'shivMethods': (options.shivMethods !== false),
+
+        /**
+         * A string to describe the type of `html5` object ("default" or "default print").
+         * @memberOf html5
+         * @type String
+         */
+        'type': 'default',
+
+        // shivs the document according to the specified `html5` object options
+        'shivDocument': shivDocument,
+
+        //creates a shived element
+        createElement: createElement,
+
+        //creates a shived documentFragment
+        createDocumentFragment: createDocumentFragment
+      };
+
+      /*--------------------------------------------------------------------------*/
+
+      // expose html5
+      window.html5 = html5;
+
+      // shiv the document
+      shivDocument(document);
+
+    }(this, document));
+    /*>>shiv*/
+
+    // Assign private properties to the return object with prefix
+    Modernizr._version      = version;
+
+    // expose these for the plugin API. Look in the source for how to join() them against your input
+    /*>>prefixes*/
+    Modernizr._prefixes     = prefixes;
+    /*>>prefixes*/
+    /*>>domprefixes*/
+    Modernizr._domPrefixes  = domPrefixes;
+    Modernizr._cssomPrefixes  = cssomPrefixes;
+    /*>>domprefixes*/
+
+    /*>>mq*/
+    // Modernizr.mq tests a given media query, live against the current state of the window
+    // A few important notes:
+    //   * If a browser does not support media queries at all (eg. oldIE) the mq() will always return false
+    //   * A max-width or orientation query will be evaluated against the current state, which may change later.
+    //   * You must specify values. Eg. If you are testing support for the min-width media query use:
+    //       Modernizr.mq('(min-width:0)')
+    // usage:
+    // Modernizr.mq('only screen and (max-width:768)')
+    Modernizr.mq            = testMediaQuery;
+    /*>>mq*/
+
+    /*>>hasevent*/
+    // Modernizr.hasEvent() detects support for a given event, with an optional element to test on
+    // Modernizr.hasEvent('gesturestart', elem)
+    Modernizr.hasEvent      = isEventSupported;
+    /*>>hasevent*/
+
+    /*>>testprop*/
+    // Modernizr.testProp() investigates whether a given style property is recognized
+    // Note that the property names must be provided in the camelCase variant.
+    // Modernizr.testProp('pointerEvents')
+    Modernizr.testProp      = function(prop){
+        return testProps([prop]);
+    };
+    /*>>testprop*/
+
+    /*>>testallprops*/
+    // Modernizr.testAllProps() investigates whether a given style property,
+    //   or any of its vendor-prefixed variants, is recognized
+    // Note that the property names must be provided in the camelCase variant.
+    // Modernizr.testAllProps('boxSizing')
+    Modernizr.testAllProps  = testPropsAll;
+    /*>>testallprops*/
+
+
+    /*>>teststyles*/
+    // Modernizr.testStyles() allows you to add custom styles to the document and test an element afterwards
+    // Modernizr.testStyles('#modernizr { position:absolute }', function(elem, rule){ ... })
+    Modernizr.testStyles    = injectElementWithStyles;
+    /*>>teststyles*/
+
+
+    /*>>prefixed*/
+    // Modernizr.prefixed() returns the prefixed or nonprefixed property name variant of your input
+    // Modernizr.prefixed('boxSizing') // 'MozBoxSizing'
+
+    // Properties must be passed as dom-style camelcase, rather than `box-sizing` hypentated style.
+    // Return values will also be the camelCase variant, if you need to translate that to hypenated style use:
+    //
+    //     str.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-');
+
+    // If you're trying to ascertain which transition end event to bind to, you might do something like...
+    //
+    //     var transEndEventNames = {
+    //       'WebkitTransition' : 'webkitTransitionEnd',
+    //       'MozTransition'    : 'transitionend',
+    //       'OTransition'      : 'oTransitionEnd',
+    //       'msTransition'     : 'MSTransitionEnd',
+    //       'transition'       : 'transitionend'
+    //     },
+    //     transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ];
+
+    Modernizr.prefixed      = function(prop, obj, elem){
+      if(!obj) {
+        return testPropsAll(prop, 'pfx');
+      } else {
+        // Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame'
+        return testPropsAll(prop, obj, elem);
+      }
+    };
+    /*>>prefixed*/
+
+
+    /*>>cssclasses*/
+    // Remove "no-js" class from <html> element, if it exists:
+    docElement.className = docElement.className.replace(/(^|\s)no-js(\s|$)/, '$1$2') +
+
+                            // Add the new classes to the <html> element.
+                            (enableClasses ? ' js ' + classes.join(' ') : '');
+    /*>>cssclasses*/
+
+    return Modernizr;
+
+})(this, this.document);
diff --git a/debian/patches/avoid_linenoise.patch b/debian/patches/avoid_linenoise.patch
new file mode 100644
index 0000000..5149007
--- /dev/null
+++ b/debian/patches/avoid_linenoise.patch
@@ -0,0 +1,79 @@
+Author: Jordi Mallach <jordi at debian.org>
+Description: avoid compiling linenoise, that includes the non-free file
+ ConvertUTF.cpp.
+
+Index: mame/makefile
+===================================================================
+--- mame.orig/makefile
++++ mame/makefile
+@@ -784,6 +784,10 @@ endif
+ ifdef WEBASSEMBLY
+ PARAMS += --WEBASSEMBLY='$(WEBASSEMBLY)'
+ endif
++
++ifdef NO_USE_LINENOISE
++PARAMS += --NO_USE_LINENOISE=1
++endif
+ #-------------------------------------------------
+ # All scripts
+ #-------------------------------------------------
+Index: mame/scripts/genie.lua
+===================================================================
+--- mame.orig/scripts/genie.lua
++++ mame/scripts/genie.lua
+@@ -388,6 +388,11 @@ newoption {
+ }
+ 
+ newoption {
++	trigger = "NO_USE_LINENOISE",
++	description = "Avoid using linenoise for licensing reasons.",
++}
++
++newoption {
+ 	trigger = "PROJECT",
+ 	description = "Select projects to be built. Will look into project folder for files.",
+ }
+Index: mame/scripts/src/3rdparty.lua
+===================================================================
+--- mame.orig/scripts/src/3rdparty.lua
++++ mame/scripts/src/3rdparty.lua
+@@ -572,7 +572,7 @@ project "lualibs"
+ 	includedirs {
+ 		MAME_DIR .. "3rdparty",
+ 	}
+-if (_OPTIONS["osd"] ~= "uwp") then
++if (_OPTIONS["osd"] ~= "uwp") and (not _OPTIONS["NO_USE_LINENOISE"]) then
+ 	includedirs {
+ 		MAME_DIR .. "3rdparty/linenoise-ng/include",
+ 	}
+@@ -595,7 +595,7 @@ end
+ 		MAME_DIR .. "3rdparty/lua-zlib/lua_zlib.c",
+ 		MAME_DIR .. "3rdparty/luafilesystem/src/lfs.c",
+ 	}
+-if (_OPTIONS["osd"] == "uwp") then
++if (_OPTIONS["osd"] == "uwp") or (_OPTIONS["NO_USE_LINENOISE"]) then
+ 	files {
+ 		MAME_DIR .. "3rdparty/lua-linenoise/linenoise_none.c",
+ 	}
+@@ -1633,7 +1633,7 @@ end
+ --------------------------------------------------
+ -- linenoise-ng library
+ --------------------------------------------------
+-if (_OPTIONS["osd"] ~= "uwp") then
++if (_OPTIONS["osd"] ~= "uwp") and (not _OPTIONS["NO_USE_LINENOISE"]) then
+ project "linenoise-ng"
+ 	uuid "7320ffc8-2748-4add-8864-ae29b72a8511"
+ 	kind (LIBTYPE)
+Index: mame/scripts/src/main.lua
+===================================================================
+--- mame.orig/scripts/src/main.lua
++++ mame/scripts/src/main.lua
+@@ -267,7 +267,7 @@ if (STANDALONE~=true) then
+ 		ext_lib("lua"),
+ 		"lualibs",
+ 	}
+-if (_OPTIONS["osd"] ~= "uwp") then
++if (_OPTIONS["osd"] ~= "uwp") and (not _OPTIONS["NO_USE_LINENOISE"]) then
+ 	links {
+ 		"linenoise-ng",
+ 	}
diff --git a/debian/patches/genie_freebsd_target.patch b/debian/patches/genie_freebsd_target.patch
new file mode 100644
index 0000000..fee353e
--- /dev/null
+++ b/debian/patches/genie_freebsd_target.patch
@@ -0,0 +1,1038 @@
+Author: Jordi Mallach <jordi at debian.org>
+Description: Hack around genie to make kfreebsd builds work.
+Forwarded: no
+
+Index: mame/makefile
+===================================================================
+--- mame.orig/makefile
++++ mame/makefile
+@@ -180,19 +180,19 @@ GENIEOS := solaris
+ endif
+ ifeq ($(firstword $(filter FreeBSD,$(UNAME))),FreeBSD)
+ OS := freebsd
+-GENIEOS := freebsd
++GENIEOS := bsd
+ endif
+ ifeq ($(firstword $(filter GNU/kFreeBSD,$(UNAME))),GNU/kFreeBSD)
+ OS := freebsd
+-GENIEOS := freebsd
++GENIEOS := bsd
+ endif
+ ifeq ($(firstword $(filter NetBSD,$(UNAME))),NetBSD)
+ OS := netbsd
+-GENIEOS := freebsd
++GENIEOS := bsd
+ endif
+ ifeq ($(firstword $(filter OpenBSD,$(UNAME))),OpenBSD)
+ OS := openbsd
+-GENIEOS := freebsd
++GENIEOS := bsd
+ endif
+ ifeq ($(firstword $(filter Darwin,$(UNAME))),Darwin)
+ OS := macosx
+Index: mame/3rdparty/genie/build/gmake.bsd/Makefile
+===================================================================
+--- /dev/null
++++ mame/3rdparty/genie/build/gmake.bsd/Makefile
+@@ -0,0 +1,34 @@
++# GNU Make solution makefile autogenerated by GENie
++# Type "make help" for usage help
++
++ifndef config
++  config=release
++endif
++export config
++
++PROJECTS := genie
++
++.PHONY: all clean help $(PROJECTS)
++
++all: $(PROJECTS)
++
++genie: 
++	@echo "==== Building genie ($(config)) ===="
++	@${MAKE} --no-print-directory -C . -f genie.make
++
++clean:
++	@${MAKE} --no-print-directory -C . -f genie.make clean
++
++help:
++	@echo "Usage: make [config=name] [target]"
++	@echo ""
++	@echo "CONFIGURATIONS:"
++	@echo "   release"
++	@echo "   debug"
++	@echo ""
++	@echo "TARGETS:"
++	@echo "   all (default)"
++	@echo "   clean"
++	@echo "   genie"
++	@echo ""
++	@echo "For more information, see https://github.com/bkaradzic/genie"
+Index: mame/3rdparty/genie/build/gmake.bsd/genie.make
+===================================================================
+--- /dev/null
++++ mame/3rdparty/genie/build/gmake.bsd/genie.make
+@@ -0,0 +1,459 @@
++# GNU Make project makefile autogenerated by GENie
++ifndef config
++  config=release
++endif
++
++ifndef verbose
++  SILENT = @
++endif
++
++SHELLTYPE := msdos
++ifeq (,$(ComSpec)$(COMSPEC))
++  SHELLTYPE := posix
++endif
++ifeq (/bin,$(findstring /bin,$(SHELL)))
++  SHELLTYPE := posix
++endif
++ifeq (/bin,$(findstring /bin,$(MAKESHELL)))
++  SHELLTYPE := posix
++endif
++
++ifeq (posix,$(SHELLTYPE))
++  MKDIR = $(SILENT) mkdir -p "$(1)"
++  COPY  = $(SILENT) cp -fR "$(1)" "$(2)"
++  RM    = $(SILENT) rm -f "$(1)"
++else
++  MKDIR = $(SILENT) mkdir "$(subst /,\\,$(1))" 2> nul || exit 0
++  COPY  = $(SILENT) copy /Y "$(subst /,\\,$(1))" "$(subst /,\\,$(2))"
++  RM    = $(SILENT) del /F "$(subst /,\\,$(1))" 2> nul || exit 0
++endif
++
++CC  = gcc
++CXX = g++
++AR  = ar
++
++ifndef RESCOMP
++  ifdef WINDRES
++    RESCOMP = $(WINDRES)
++  else
++    RESCOMP = windres
++  endif
++endif
++
++ifeq ($(config),release)
++  OBJDIR         = obj/Release
++  TARGETDIR      = ../../bin/bsd
++  override TARGET         = $(TARGETDIR)/genie
++  DEFINES       += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN
++  INCLUDES      += -I../../src/host/lua-5.3.0/src
++  INCLUDES      +=
++  ALL_CPPFLAGS  += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
++  ALL_CFLAGS    += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os
++  ALL_CXXFLAGS  += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os
++  ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os
++  ALL_RESFLAGS  += $(RESFLAGS) $(DEFINES) $(INCLUDES)
++  ALL_LDFLAGS   += $(LDFLAGS) -L. -s -rdynamic
++  LDDEPS        +=
++  LIBS          += $(LDDEPS) -lm
++  EXTERNAL_LIBS +=
++  LINKCMD        = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
++  OBJECTS := \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
++	$(OBJDIR)/src/host/os_chdir.o \
++	$(OBJDIR)/src/host/os_copyfile.o \
++	$(OBJDIR)/src/host/os_getcwd.o \
++	$(OBJDIR)/src/host/os_is64bit.o \
++	$(OBJDIR)/src/host/os_isdir.o \
++	$(OBJDIR)/src/host/os_isfile.o \
++	$(OBJDIR)/src/host/os_match.o \
++	$(OBJDIR)/src/host/os_mkdir.o \
++	$(OBJDIR)/src/host/os_pathsearch.o \
++	$(OBJDIR)/src/host/os_rmdir.o \
++	$(OBJDIR)/src/host/os_stat.o \
++	$(OBJDIR)/src/host/os_ticks.o \
++	$(OBJDIR)/src/host/os_uuid.o \
++	$(OBJDIR)/src/host/path_isabsolute.o \
++	$(OBJDIR)/src/host/premake.o \
++	$(OBJDIR)/src/host/premake_main.o \
++	$(OBJDIR)/src/host/scripts.o \
++	$(OBJDIR)/src/host/string_endswith.o \
++	$(OBJDIR)/src/host/string_hash.o \
++
++  define PREBUILDCMDS
++  endef
++  define PRELINKCMDS
++  endef
++  define POSTBUILDCMDS
++  endef
++endif
++
++ifeq ($(config),debug)
++  OBJDIR         = obj/Debug
++  TARGETDIR      = ../../bin/bsd
++  override TARGET         = $(TARGETDIR)/genie
++  DEFINES       += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN
++  INCLUDES      += -I../../src/host/lua-5.3.0/src
++  INCLUDES      +=
++  ALL_CPPFLAGS  += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
++  ALL_CFLAGS    += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g
++  ALL_CXXFLAGS  += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g
++  ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g
++  ALL_RESFLAGS  += $(RESFLAGS) $(DEFINES) $(INCLUDES)
++  ALL_LDFLAGS   += $(LDFLAGS) -L. -rdynamic
++  LDDEPS        +=
++  LIBS          += $(LDDEPS) -lm
++  EXTERNAL_LIBS +=
++  LINKCMD        = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
++  OBJECTS := \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
++	$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
++	$(OBJDIR)/src/host/os_chdir.o \
++	$(OBJDIR)/src/host/os_copyfile.o \
++	$(OBJDIR)/src/host/os_getcwd.o \
++	$(OBJDIR)/src/host/os_is64bit.o \
++	$(OBJDIR)/src/host/os_isdir.o \
++	$(OBJDIR)/src/host/os_isfile.o \
++	$(OBJDIR)/src/host/os_match.o \
++	$(OBJDIR)/src/host/os_mkdir.o \
++	$(OBJDIR)/src/host/os_pathsearch.o \
++	$(OBJDIR)/src/host/os_rmdir.o \
++	$(OBJDIR)/src/host/os_stat.o \
++	$(OBJDIR)/src/host/os_ticks.o \
++	$(OBJDIR)/src/host/os_uuid.o \
++	$(OBJDIR)/src/host/path_isabsolute.o \
++	$(OBJDIR)/src/host/premake.o \
++	$(OBJDIR)/src/host/premake_main.o \
++	$(OBJDIR)/src/host/scripts.o \
++	$(OBJDIR)/src/host/string_endswith.o \
++	$(OBJDIR)/src/host/string_hash.o \
++
++  define PREBUILDCMDS
++  endef
++  define PRELINKCMDS
++  endef
++  define POSTBUILDCMDS
++  endef
++endif
++
++OBJDIRS := \
++	$(OBJDIR) \
++	$(OBJDIR)/src/host \
++	$(OBJDIR)/src/host/lua-5.3.0/src \
++
++RESOURCES := \
++
++.PHONY: clean prebuild prelink
++
++all: $(OBJDIRS) prebuild prelink $(TARGET) | $(TARGETDIR)
++	@:
++
++$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(EXTERNAL_LIBS) $(RESOURCES) | $(TARGETDIR) $(OBJDIRS)
++	@echo Linking genie
++	$(SILENT) $(LINKCMD)
++	$(POSTBUILDCMDS)
++
++$(TARGETDIR):
++	@echo Creating $(TARGETDIR)
++	-$(call MKDIR,$(TARGETDIR))
++
++$(OBJDIRS):
++	@echo Creating $(@)
++	-$(call MKDIR,$@)
++
++clean:
++	@echo Cleaning genie
++ifeq (posix,$(SHELLTYPE))
++	$(SILENT) rm -f  $(TARGET)
++	$(SILENT) rm -rf $(OBJDIR)
++else
++	$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
++	$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
++endif
++
++prebuild:
++	$(PREBUILDCMDS)
++
++prelink:
++	$(PRELINKCMDS)
++
++ifneq (,$(PCH))
++$(GCH): $(PCH) | $(OBJDIR)
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) -x c-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<"
++endif
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH) genie.make
++	@echo $(notdir $<)
++	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
++
++-include $(OBJECTS:%.o=%.d)
++ifneq (,$(PCH))
++  -include $(OBJDIR)/$(notdir $(PCH)).d
++endif
+Index: mame/3rdparty/genie/build/gmake.freebsd/Makefile
+===================================================================
+--- mame.orig/3rdparty/genie/build/gmake.freebsd/Makefile
++++ /dev/null
+@@ -1,34 +0,0 @@
+-# GNU Make solution makefile autogenerated by GENie
+-# Type "make help" for usage help
+-
+-ifndef config
+-  config=release
+-endif
+-export config
+-
+-PROJECTS := genie
+-
+-.PHONY: all clean help $(PROJECTS)
+-
+-all: $(PROJECTS)
+-
+-genie: 
+-	@echo "==== Building genie ($(config)) ===="
+-	@${MAKE} --no-print-directory -C . -f genie.make
+-
+-clean:
+-	@${MAKE} --no-print-directory -C . -f genie.make clean
+-
+-help:
+-	@echo "Usage: make [config=name] [target]"
+-	@echo ""
+-	@echo "CONFIGURATIONS:"
+-	@echo "   release"
+-	@echo "   debug"
+-	@echo ""
+-	@echo "TARGETS:"
+-	@echo "   all (default)"
+-	@echo "   clean"
+-	@echo "   genie"
+-	@echo ""
+-	@echo "For more information, see https://github.com/bkaradzic/genie"
+Index: mame/3rdparty/genie/build/gmake.freebsd/genie.make
+===================================================================
+--- mame.orig/3rdparty/genie/build/gmake.freebsd/genie.make
++++ /dev/null
+@@ -1,459 +0,0 @@
+-# GNU Make project makefile autogenerated by GENie
+-ifndef config
+-  config=release
+-endif
+-
+-ifndef verbose
+-  SILENT = @
+-endif
+-
+-SHELLTYPE := msdos
+-ifeq (,$(ComSpec)$(COMSPEC))
+-  SHELLTYPE := posix
+-endif
+-ifeq (/bin,$(findstring /bin,$(SHELL)))
+-  SHELLTYPE := posix
+-endif
+-ifeq (/bin,$(findstring /bin,$(MAKESHELL)))
+-  SHELLTYPE := posix
+-endif
+-
+-ifeq (posix,$(SHELLTYPE))
+-  MKDIR = $(SILENT) mkdir -p "$(1)"
+-  COPY  = $(SILENT) cp -fR "$(1)" "$(2)"
+-  RM    = $(SILENT) rm -f "$(1)"
+-else
+-  MKDIR = $(SILENT) mkdir "$(subst /,\\,$(1))" 2> nul || exit 0
+-  COPY  = $(SILENT) copy /Y "$(subst /,\\,$(1))" "$(subst /,\\,$(2))"
+-  RM    = $(SILENT) del /F "$(subst /,\\,$(1))" 2> nul || exit 0
+-endif
+-
+-CC  = gcc
+-CXX = g++
+-AR  = ar
+-
+-ifndef RESCOMP
+-  ifdef WINDRES
+-    RESCOMP = $(WINDRES)
+-  else
+-    RESCOMP = windres
+-  endif
+-endif
+-
+-ifeq ($(config),release)
+-  OBJDIR         = obj/Release
+-  TARGETDIR      = ../../bin/bsd
+-  override TARGET         = $(TARGETDIR)/genie
+-  DEFINES       += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN
+-  INCLUDES      += -I../../src/host/lua-5.3.0/src
+-  INCLUDES      +=
+-  ALL_CPPFLAGS  += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
+-  ALL_CFLAGS    += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os
+-  ALL_CXXFLAGS  += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os
+-  ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os
+-  ALL_RESFLAGS  += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+-  ALL_LDFLAGS   += $(LDFLAGS) -L. -s -rdynamic
+-  LDDEPS        +=
+-  LIBS          += $(LDDEPS) -lm
+-  EXTERNAL_LIBS +=
+-  LINKCMD        = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
+-  OBJECTS := \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
+-	$(OBJDIR)/src/host/os_chdir.o \
+-	$(OBJDIR)/src/host/os_copyfile.o \
+-	$(OBJDIR)/src/host/os_getcwd.o \
+-	$(OBJDIR)/src/host/os_is64bit.o \
+-	$(OBJDIR)/src/host/os_isdir.o \
+-	$(OBJDIR)/src/host/os_isfile.o \
+-	$(OBJDIR)/src/host/os_match.o \
+-	$(OBJDIR)/src/host/os_mkdir.o \
+-	$(OBJDIR)/src/host/os_pathsearch.o \
+-	$(OBJDIR)/src/host/os_rmdir.o \
+-	$(OBJDIR)/src/host/os_stat.o \
+-	$(OBJDIR)/src/host/os_ticks.o \
+-	$(OBJDIR)/src/host/os_uuid.o \
+-	$(OBJDIR)/src/host/path_isabsolute.o \
+-	$(OBJDIR)/src/host/premake.o \
+-	$(OBJDIR)/src/host/premake_main.o \
+-	$(OBJDIR)/src/host/scripts.o \
+-	$(OBJDIR)/src/host/string_endswith.o \
+-	$(OBJDIR)/src/host/string_hash.o \
+-
+-  define PREBUILDCMDS
+-  endef
+-  define PRELINKCMDS
+-  endef
+-  define POSTBUILDCMDS
+-  endef
+-endif
+-
+-ifeq ($(config),debug)
+-  OBJDIR         = obj/Debug
+-  TARGETDIR      = ../../bin/bsd
+-  override TARGET         = $(TARGETDIR)/genie
+-  DEFINES       += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN
+-  INCLUDES      += -I../../src/host/lua-5.3.0/src
+-  INCLUDES      +=
+-  ALL_CPPFLAGS  += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
+-  ALL_CFLAGS    += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g
+-  ALL_CXXFLAGS  += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g
+-  ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g
+-  ALL_RESFLAGS  += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+-  ALL_LDFLAGS   += $(LDFLAGS) -L. -rdynamic
+-  LDDEPS        +=
+-  LIBS          += $(LDDEPS) -lm
+-  EXTERNAL_LIBS +=
+-  LINKCMD        = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
+-  OBJECTS := \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
+-	$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
+-	$(OBJDIR)/src/host/os_chdir.o \
+-	$(OBJDIR)/src/host/os_copyfile.o \
+-	$(OBJDIR)/src/host/os_getcwd.o \
+-	$(OBJDIR)/src/host/os_is64bit.o \
+-	$(OBJDIR)/src/host/os_isdir.o \
+-	$(OBJDIR)/src/host/os_isfile.o \
+-	$(OBJDIR)/src/host/os_match.o \
+-	$(OBJDIR)/src/host/os_mkdir.o \
+-	$(OBJDIR)/src/host/os_pathsearch.o \
+-	$(OBJDIR)/src/host/os_rmdir.o \
+-	$(OBJDIR)/src/host/os_stat.o \
+-	$(OBJDIR)/src/host/os_ticks.o \
+-	$(OBJDIR)/src/host/os_uuid.o \
+-	$(OBJDIR)/src/host/path_isabsolute.o \
+-	$(OBJDIR)/src/host/premake.o \
+-	$(OBJDIR)/src/host/premake_main.o \
+-	$(OBJDIR)/src/host/scripts.o \
+-	$(OBJDIR)/src/host/string_endswith.o \
+-	$(OBJDIR)/src/host/string_hash.o \
+-
+-  define PREBUILDCMDS
+-  endef
+-  define PRELINKCMDS
+-  endef
+-  define POSTBUILDCMDS
+-  endef
+-endif
+-
+-OBJDIRS := \
+-	$(OBJDIR) \
+-	$(OBJDIR)/src/host \
+-	$(OBJDIR)/src/host/lua-5.3.0/src \
+-
+-RESOURCES := \
+-
+-.PHONY: clean prebuild prelink
+-
+-all: $(OBJDIRS) prebuild prelink $(TARGET) | $(TARGETDIR)
+-	@:
+-
+-$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(EXTERNAL_LIBS) $(RESOURCES) | $(TARGETDIR) $(OBJDIRS)
+-	@echo Linking genie
+-	$(SILENT) $(LINKCMD)
+-	$(POSTBUILDCMDS)
+-
+-$(TARGETDIR):
+-	@echo Creating $(TARGETDIR)
+-	-$(call MKDIR,$(TARGETDIR))
+-
+-$(OBJDIRS):
+-	@echo Creating $(@)
+-	-$(call MKDIR,$@)
+-
+-clean:
+-	@echo Cleaning genie
+-ifeq (posix,$(SHELLTYPE))
+-	$(SILENT) rm -f  $(TARGET)
+-	$(SILENT) rm -rf $(OBJDIR)
+-else
+-	$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
+-	$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
+-endif
+-
+-prebuild:
+-	$(PREBUILDCMDS)
+-
+-prelink:
+-	$(PRELINKCMDS)
+-
+-ifneq (,$(PCH))
+-$(GCH): $(PCH) | $(OBJDIR)
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) -x c-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<"
+-endif
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+-$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH) genie.make
+-	@echo $(notdir $<)
+-	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
+-
+--include $(OBJECTS:%.o=%.d)
+-ifneq (,$(PCH))
+-  -include $(OBJDIR)/$(notdir $(PCH)).d
+-endif
diff --git a/debian/patches/hurd.patch b/debian/patches/hurd.patch
new file mode 100644
index 0000000..d0759a0
--- /dev/null
+++ b/debian/patches/hurd.patch
@@ -0,0 +1,127 @@
+Author: Jordi Mallach <jordi at debian.org>
+Description: Several FTBFS fixes for Hurd systems.
+Forwarded: no
+
+Index: mame/makefile
+===================================================================
+--- mame.orig/makefile
++++ mame/makefile
+@@ -194,6 +194,9 @@ ifeq ($(firstword $(filter OpenBSD,$(UNA
+ OS := openbsd
+ GENIEOS := freebsd
+ endif
++ifeq ($(firstword $(filter GNU,$(UNAME))),GNU)
++OS := gnu
++endif
+ ifeq ($(firstword $(filter Darwin,$(UNAME))),Darwin)
+ OS := macosx
+ GENIEOS := darwin
+@@ -1252,6 +1255,16 @@ linux: generate $(PROJECTDIR)/$(MAKETYPE
+ 	$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG) precompile
+ 	$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)
+ 
++.PHONY: gnu_x86
++gnu_x86: generate $(PROJECTDIR)/$(MAKETYPE)-linux/Makefile
++	$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)32 precompile
++	$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)32
++
++.PHONY: gnu
++gnu: generate $(PROJECTDIR)/$(MAKETYPE)-linux/Makefile
++	$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG) precompile
++	$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)
++
+ #-------------------------------------------------
+ # gmake-linux-clang
+ #-------------------------------------------------
+Index: mame/scripts/src/osd/sdl.lua
+===================================================================
+--- mame.orig/scripts/src/osd/sdl.lua
++++ mame/scripts/src/osd/sdl.lua
+@@ -229,6 +229,9 @@ if _OPTIONS["targetos"]=="linux" then
+ elseif _OPTIONS["targetos"]=="openbsd" then
+ elseif _OPTIONS["targetos"]=="netbsd" then
+ 	SDL_NETWORK         = "pcap"
++elseif _OPTIONS["targetos"]=="gnu" then
++	SDL_NETWORK         = "taptun"
++	SYNC_IMPLEMENTATION = "tc"
+ elseif _OPTIONS["targetos"]=="haiku" then
+ elseif _OPTIONS["targetos"]=="asmjs" then
+ elseif _OPTIONS["targetos"]=="windows" then
+Index: mame/src/osd/sdl/sdlprefix.h
+===================================================================
+--- mame.orig/src/osd/sdl/sdlprefix.h
++++ mame/src/osd/sdl/sdlprefix.h
+@@ -41,7 +41,7 @@
+ /* Large file support on IRIX needs _SGI_SOURCE */
+ #undef _POSIX_SOURCE
+ 
+-#elif defined(__linux__) || defined(__FreeBSD_kernel__)
++#elif defined(__linux__) || defined(__GNU__) || defined(__FreeBSD_kernel__)
+ #define SDLMAME_LINUX 1
+ 
+ #elif defined(__FreeBSD__)
+Index: mame/src/osd/modules/file/posixfile.cpp
+===================================================================
+--- mame.orig/src/osd/modules/file/posixfile.cpp
++++ mame/src/osd/modules/file/posixfile.cpp
+@@ -37,6 +37,12 @@
+ #endif
+ #endif
+ 
++#if defined(__GNU__)
++#ifndef PATH_MAX
++#define PATH_MAX 1024
++#endif
++#endif
++
+ // MAME headers
+ #include "posixfile.h"
+ #include "unicode.h"
+Index: mame/src/osd/modules/file/posixptty.cpp
+===================================================================
+--- mame.orig/src/osd/modules/file/posixptty.cpp
++++ mame/src/osd/modules/file/posixptty.cpp
+@@ -27,10 +27,18 @@
+ #include <util.h>
+ #elif defined(__linux__) || defined(EMSCRIPTEN)
+ #include <pty.h>
++#elif defined(__GNU__)
++#include <pty.h>
++#include <termios.h>
+ #elif defined(__HAIKU__)
+ #include <bsd/pty.h>
+ #endif
+ 
++#if defined(__GNU__)
++#ifndef PATH_MAX
++#define PATH_MAX 1024
++#endif
++#endif
+ 
+ namespace {
+ #if defined(__APPLE__)
+Index: mame/scripts/genie.lua
+===================================================================
+--- mame.orig/scripts/genie.lua
++++ mame/scripts/genie.lua
+@@ -129,6 +129,7 @@ newoption {
+ 		{ "freebsd",       "FreeBSD"                },
+ 		{ "netbsd",        "NetBSD"                 },
+ 		{ "openbsd",       "OpenBSD"                },
++		{ "gnu",           "GNU"                    },
+ 		{ "pnacl",         "Native Client - PNaCl"  },
+ 		{ "linux",         "Linux"                  },
+ 		{ "ios",           "iOS"                    },
+Index: mame/src/osd/modules/render/drawbgfx.cpp
+===================================================================
+--- mame.orig/src/osd/modules/render/drawbgfx.cpp
++++ mame/src/osd/modules/render/drawbgfx.cpp
+@@ -143,7 +143,7 @@ static void* sdlNativeWindowHandle(SDL_W
+ 		return nullptr;
+ 	}
+ 
+-#   if BX_PLATFORM_LINUX || BX_PLATFORM_BSD || BX_PLATFORM_RPI
++#   if BX_PLATFORM_LINUX || BX_PLATFORM_BSD || BX_PLATFORM_HURD || BX_PLATFORM_RPI
+ 	return (void*)wmi.info.x11.window;
+ #   elif BX_PLATFORM_OSX
+ 	return wmi.info.cocoa.window;
diff --git a/debian/patches/kfreebsd_dirent.h_path.patch b/debian/patches/kfreebsd_dirent.h_path.patch
new file mode 100644
index 0000000..5dbbd85
--- /dev/null
+++ b/debian/patches/kfreebsd_dirent.h_path.patch
@@ -0,0 +1,11 @@
+diff --git a/3rdparty/bx/include/compat/freebsd/dirent.h b/3rdparty/bx/include/compat/freebsd/dirent.h
+index b4f586b..5f52d2d 100644
+--- a/3rdparty/bx/include/compat/freebsd/dirent.h
++++ b/3rdparty/bx/include/compat/freebsd/dirent.h
+@@ -1 +1,5 @@
+-#include <sys/dirent.h>
++#if defined(__GLIBC__)
++#   include_next <dirent.h>
++#else
++#   include <sys/dirent.h>
++#endif
diff --git a/debian/patches/m68000_archopts.patch b/debian/patches/m68000_archopts.patch
new file mode 100644
index 0000000..46fd4a6
--- /dev/null
+++ b/debian/patches/m68000_archopts.patch
@@ -0,0 +1,17 @@
+Author: Jordi Mallach <jordi at debian.org>
+Description: Pass $(ARCHOPTS) to standalone m68000 makefile.
+Forwarded: no
+
+Index: mame/src/devices/cpu/m68000/makefile
+===================================================================
+--- mame.orig/src/devices/cpu/m68000/makefile
++++ mame/src/devices/cpu/m68000/makefile
+@@ -25,7 +25,7 @@ clean:
+ 	- at rm -f m68kops.*
+ 
+ m68kmake.o: m68kmake.cpp
+-	$(SILENT) $(CC) -x c++ -std=c++11 -o "$@" -c "$<"
++	$(SILENT) $(CC) -x c++ -std=c++11 $(ARCHOPTS) -o "$@" -c "$<"
+ 
+ m68kmake$(EXE) : m68kmake.o
+ 	@echo Linking $@...
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..412a423
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,6 @@
+#genie_freebsd_target.patch
+hurd.patch
+sphinx_mathjax_location.patch
+m68000_archopts.patch
+kfreebsd_dirent.h_path.patch
+avoid_linenoise.patch
diff --git a/debian/patches/sphinx_mathjax_location.patch b/debian/patches/sphinx_mathjax_location.patch
new file mode 100644
index 0000000..cd444d1
--- /dev/null
+++ b/debian/patches/sphinx_mathjax_location.patch
@@ -0,0 +1,19 @@
+Author: Jordi Mallach <jordi at debian.org>
+Description: Use the packaged version of MathJax.
+ Avoid a privacy breach by using the packaged version of
+ libjs-mathjax in the generated sphinx docs.
+Forwarded: no
+
+Index: mame-0.178/docs/source/conf.py
+===================================================================
+--- mame-0.178.orig/docs/source/conf.py
++++ mame-0.178/docs/source/conf.py
+@@ -38,7 +38,7 @@ edit_on_github_project = 'mamedev/docs'
+ edit_on_github_branch = 'master/source'
+ 
+ # Math
+-mathjax_path = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
++mathjax_path = "file:///usr/share/javascript/mathjax/config/TeX-AMS-MML_HTMLorMML.js"
+ 
+ # Add any paths that contain templates here, relative to this directory.
+ templates_path = ['_templates']
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..04f7af8
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,281 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+# Default/i386/amd64 options from sdlmame rules file by Cesare Falco.
+
+#export DH_VERBOSE = 1
+
+DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+DEB_HOST_ARCH_BITS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
+
+# Define DEB_HOST_MULTIARCH for QT prefix handling
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+# add c++ hardening options (upstream makefile doesn't use CPPFLAGS)
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_CFLAGS_MAINT_APPEND = $(shell dpkg-buildflags --get CPPFLAGS)
+
+# Sacrifice linking speed to avoid using so much memory
+export DEB_LDFLAGS_MAINT_APPEND = -Wl,--no-keep-memory
+
+# taken verbatim from debian policy
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+MAKEFLAGS += -j$(NUMJOBS)
+endif
+
+# Override relevant make variables in original makefile
+DEB_OPTS = \
+    NOWERROR=1 \
+    OSD=sdl \
+    DEBUG= \
+    TARGETOS=linux \
+    DISTRO=debian-stable \
+    FORCE_DRC_C_BACKEND=1 \
+    PTR64= \
+    BIGENDIAN= \
+    NOASM=1 \
+    NO_USE_LINENOISE=1 \
+    QT_HOME=/usr/lib/$(DEB_HOST_MULTIARCH)/qt5/ \
+    USE_SYSTEM_LIB_EXPAT=1 \
+    USE_SYSTEM_LIB_ZLIB=1 \
+    USE_SYSTEM_LIB_JPEG=1 \
+    USE_SYSTEM_LIB_FLAC=1 \
+    USE_SYSTEM_LIB_LUA=lua5.3:/usr/include/lua5.3 \
+    USE_SYSTEM_LIB_SQLITE3=1 \
+    USE_SYSTEM_LIB_PORTMIDI=1 \
+    USE_SYSTEM_LIB_PORTAUDIO=1 \
+    USE_SYSTEM_LIB_UV=1 \
+    VERBOSE=1
+
+# Override make variables for specific archs
+# Linux architectures
+ifeq ($(DEB_HOST_ARCH),amd64)
+DEB_OPTS += \
+    FORCE_DRC_C_BACKEND= \
+    PTR64=1 \
+    NOASM=
+endif
+
+ifeq ($(DEB_HOST_ARCH),arm64)
+DEB_OPTS += \
+    ARCHOPTS="-mabi=lp64 -fPIC"
+endif
+
+ifeq ($(DEB_HOST_ARCH),i386)
+DEB_OPTS += \
+    FORCE_DRC_C_BACKEND= \
+    NOASM=
+endif
+
+ifeq ($(DEB_HOST_ARCH),ia64)
+DEB_OPTS += \
+    PTR64=1
+endif
+
+ifeq ($(DEB_HOST_ARCH),mips)
+DEB_OPTS += \
+    ARCHOPTS=-Umips \
+    BIGENDIAN=1
+endif
+
+ifeq ($(DEB_HOST_ARCH),mipsel)
+DEB_OPTS += \
+    ARCHOPTS=-Umips
+endif
+
+ifeq ($(DEB_HOST_ARCH),powerpc)
+DEB_OPTS += \
+    ARCHOPTS=-Upowerpc \
+    NOASM= \
+    BIGENDIAN=1
+endif
+
+ifeq ($(DEB_HOST_ARCH),ppc64)
+DEB_OPTS += \
+    PTR64=1 \
+    NOASM= \
+    BIGENDIAN=1
+endif
+
+ifeq ($(DEB_HOST_ARCH),ppc64el)
+DEB_OPTS += \
+    PTR64=1 \
+    NOASM=
+endif
+
+ifeq ($(DEB_HOST_ARCH),s390)
+DEB_OPTS += \
+    BIGENDIAN=1
+endif
+
+ifeq ($(DEB_HOST_ARCH),s390x)
+DEB_OPTS += \
+    PTR64=1 \
+    BIGENDIAN=1
+endif
+
+ifeq ($(DEB_HOST_ARCH),sparc)
+DEB_OPTS += \
+    BIGENDIAN=1
+endif
+
+ifeq ($(DEB_HOST_ARCH),sparc64)
+DEB_OPTS += \
+    PTR64=1 \
+    BIGENDIAN=1
+endif
+
+ifeq ($(DEB_HOST_ARCH),x32)
+DEB_OPTS += \
+    FORCE_DRC_C_BACKEND= \
+    NOASM=
+endif
+
+# kFreeBSD architectures
+ifeq ($(DEB_HOST_ARCH),kfreebsd-amd64)
+DEB_OPTS += \
+    TARGETOS=freebsd \
+    FORCE_DRC_C_BACKEND= \
+    PTR64=1 \
+    NOASM= \
+    USE_SYSTEM_LIB_PORTMIDI=
+export DEB_LDFLAGS_MAINT_APPEND = -ldl
+endif
+
+ifeq ($(DEB_HOST_ARCH),kfreebsd-i386)
+DEB_OPTS += \
+    TARGETOS=freebsd \
+    FORCE_DRC_C_BACKEND= \
+    NOASM= \
+    USE_SYSTEM_LIB_PORTMIDI=
+export DEB_LDFLAGS_MAINT_APPEND = -ldl
+endif
+
+# GNU/Hurd architecture
+ifeq ($(DEB_HOST_ARCH),hurd-i386)
+DEB_OPTS += \
+    TARGETOS=gnu \
+    FORCE_DRC_C_BACKEND= \
+    NOASM= \
+    USE_SYSTEM_LIB_PORTMIDI= \
+    NO_USE_MIDI=1
+endif
+
+DEB_MAME_OPTS = \
+    SDL_INI_PATH=/etc/mame \
+    FULLNAME=mame \
+    TARGET=mame \
+    SUBTARGET=mame \
+    TOOLS=1
+
+ifndef DEBUG
+# Disable -g entirely
+CFLAGS := $(CFLAGS:-g=-g0)
+endif
+
+%:
+	dh $@
+
+override_dh_auto_build-arch:
+	$(MAKE) $(DEB_OPTS) $(DEB_MAME_OPTS)
+	-mv mame64 mame #FIXME
+	$(CURDIR)/mame -createconfig
+	mv mame.ini default.mame.ini
+	mv plugin.ini default.plugin.ini
+	mv ui.ini default.ui.ini
+
+override_dh_auto_build-indep:
+	$(MAKE) -C docs singlehtml
+
+override_dh_auto_test-arch:
+	# Run MAME's internal validation tests
+	-$(CURDIR)/mame -validate
+
+override_dh_install:
+	dh_install --fail-missing \
+		   --exclude=dir.txt \
+		   --exclude=LICENSE \
+		   --exclude=README.md \
+		   --exclude=jquery.js \
+		   --exclude=underscore.js
+
+override_dh_installchangelogs:
+	dh_installchangelogs whatsnew.txt
+
+override_dh_fixperms-arch:
+	dh_fixperms
+	find debian/mame/etc/mame -type f -execdir chmod 644 {} \;
+
+override_dh_fixperms-indep:
+	dh_fixperms
+	find debian/mame-data/usr/share/games/mame/artwork -type f -execdir chmod 644 {} \;
+	find debian/mame-data/usr/share/games/mame/bgfx -type f -execdir chmod 644 {} \;
+	find debian/mame-data/usr/share/games/mame/ctrlr -type f -execdir chmod 644 {} \;
+	find debian/mame-data/usr/share/games/mame/fonts -type f -execdir chmod 644 {} \;
+	find debian/mame-data/usr/share/games/mame/hash -type f -execdir chmod 644 {} \;
+	find debian/mame-data/usr/share/games/mame/keymaps -type f -execdir chmod 644 {} \;
+	find debian/mame-data/usr/share/games/mame/language -type f -name "*.po" -delete
+	find debian/mame-data/usr/share/games/mame/language -type f -execdir chmod 644 {} \;
+	find debian/mame-data/usr/share/games/mame/plugins -type f -execdir chmod 644 {} \;
+
+PKD := $(abspath $(dir $(MAKEFILE_LIST)))
+PKG := $(shell dpkg-parsechangelog -l$(PKD)/changelog --show-field=Source)
+DTYPE :=
+VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog --show-field=Version | sed -e 's/\(.*\)-.*/\1/')
+# Upstream source has no dot in its name, so we have to cut it out
+UVER := $(shell echo $(VER) | sed -e 's/\.//' )
+TMPDIR := $(shell mktemp --dry-run --directory -p .)
+
+.PHONY: get-orig-source
+get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.xz $(info I: $(PKG)_$(VER)$(DTYPE))
+	@
+
+$(PKG)_$(VER)$(DTYPE).orig.tar.xz:
+	@echo "# Downloading..."
+	uscan --noconf --verbose --rename --destdir=$(CURDIR) \
+        --check-dirname-level=0 --force-download \
+        --download-version $(VER) $(PKD)
+	@echo "# Extracting..."
+	mkdir -p $(TMPDIR)/$(PKG)-$(VER)
+	tar -xzf $(PKG)_$(VER).orig.tar.gz --strip-component=1 \
+        -C $(TMPDIR)/$(PKG)-$(VER)/ --exclude=\.*
+	@echo "# Cleaning-up..."
+	# Remove binaries and other cruft
+	cd $(TMPDIR)/$(PKG)-$(VER) && make clean && make cleansrc
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/.mame_version
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/zlib/contrib/dotzlib/DotZLib.chm
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/bx/tools/bin/linux/bin2c
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/bx/tools/bin/linux/genie
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/bx/tools/bin/linux/ninja
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/bx/tools/bin/windows/bin2c.exe
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/bx/tools/bin/windows/genie.exe
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/bx/tools/bin/windows/ninja.exe
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Convert.js
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/bgfx/3rdparty/scintilla/src/Editor.cxx.orig
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/bgfx/3rdparty/scintilla/gtk/makefile.orig
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/glm/doc/api
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/linenoise-ng/src/ConvertUTF.*
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/lzma/7zr.exe
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/lzma/lzma.exe
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/portmidi/pm_java/JavaExe.exe
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/portmidi/pm_java/UpdateRsrcJavaExe.exe
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/portmidi/pm_csharp/pm_managed/app.rc
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/portmidi/pm_csharp/pm_managed/resource.h
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/portmidi/pm_java/pmjni/pmjni.rc
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/portmidi/pm_java/setup/pmdefaults-setup.exe
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/android-project/gradle/wrapper/gradle-wrapper.jar
+	rm -rf $(TMPDIR)/$(PKG)-$(VER)/3rdparty/zlib/contrib/dotzlib/DotZLib.chm
+	# Add upstream changelog and other useful bits distributed separately
+	wget https://github.com/mamedev/build/archive/master.zip
+	unzip -oqjd $(TMPDIR) master.zip \
+        *mamedirs.zip *whatsnew_$(UVER).txt
+	mv $(TMPDIR)/whatsnew_$(UVER).txt \
+        $(TMPDIR)/$(PKG)-$(VER)/whatsnew.txt
+	unzip -oqd $(TMPDIR)/$(PKG)-$(VER)/ $(TMPDIR)/mamedirs.zip
+	@echo "# Packing..."
+	tar -C $(TMPDIR) -cf - $(PKG)-$(VER) | xz -9c > $(PKG)_$(VER)$(DTYPE).orig.tar.xz
+	rm -rf $(TMPDIR) $(PKG)_$(VER).orig.tar.gz master.zip
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/include-binaries b/debian/source/include-binaries
new file mode 100644
index 0000000..11e246d
--- /dev/null
+++ b/debian/source/include-binaries
@@ -0,0 +1,7 @@
+debian/install/hicolor/16x16/apps/mame.png
+debian/install/hicolor/22x22/apps/mame.png
+debian/install/hicolor/24x24/apps/mame.png
+debian/install/hicolor/32x32/apps/mame.png
+debian/install/hicolor/48x48/apps/mame.png
+debian/install/hicolor/72x72/apps/mame.png
+debian/install/hicolor/128x128/apps/mame.png
diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
new file mode 100644
index 0000000..0749b31
--- /dev/null
+++ b/debian/source/lintian-overrides
@@ -0,0 +1,11 @@
+mame source: ancient-autotools-helper-file 3rdparty/libflac/config.guess 2003-06-17
+mame source: ancient-autotools-helper-file 3rdparty/libflac/config.sub 2003-06-18
+mame source: outdated-autotools-helper-file 3rdparty/libjpeg/config.guess 2009-11-20
+mame source: outdated-autotools-helper-file 3rdparty/libjpeg/config.sub 2009-11-20
+mame source: outdated-autotools-helper-file 3rdparty/portaudio/config.guess 2011-05-11
+mame source: outdated-autotools-helper-file 3rdparty/portaudio/config.sub 2011-03-23
+mame source: license-problem-json-evil 3rdparty/rapidjson/license.txt
+mame source: source-contains-prebuilt-doxygen-documentation 3rdparty/winpcap/docs/html/
+mame source: source-contains-prebuilt-doxygen-documentation 3rdparty/libflac/doc/html/api/
+mame source: ancient-autotools-helper-file 3rdparty/portaudio/bindings/cpp/build/gnu/config.guess 2001-10-05
+mame source: ancient-autotools-helper-file 3rdparty/portaudio/bindings/cpp/build/gnu/config.sub 2003-07-17
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..a67b3a9
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+https://github.com/mamedev/mame/tags/ .+(\d)(\d{3})\.tar\.gz

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mame.git



More information about the Pkg-games-commits mailing list