diff --git a/acct-group/flatpak/flatpak-0.ebuild b/acct-group/flatpak/flatpak-0.ebuild
new file mode 100644
index 0000000000..808e706322
--- /dev/null
+++ b/acct-group/flatpak/flatpak-0.ebuild
@@ -0,0 +1,9 @@
+# Copyright 2019-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit acct-group
+
+KEYWORDS="~amd64 ~x86"
+ACCT_GROUP_ID=313
diff --git a/acct-group/flatpak/metadata.xml b/acct-group/flatpak/metadata.xml
new file mode 100644
index 0000000000..775bda744b
--- /dev/null
+++ b/acct-group/flatpak/metadata.xml
@@ -0,0 +1,8 @@
+
+
+
+
+ david@ixit.cz
+ David Heidelberg
+
+
diff --git a/acct-user/flatpak/flatpak-0.ebuild b/acct-user/flatpak/flatpak-0.ebuild
new file mode 100644
index 0000000000..59e29e9e3e
--- /dev/null
+++ b/acct-user/flatpak/flatpak-0.ebuild
@@ -0,0 +1,11 @@
+# Copyright 2019-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit acct-user
+
+ACCT_USER_ID=313
+ACCT_USER_GROUPS=( flatpak )
+KEYWORDS="~amd64 ~x86"
+acct-user_add_deps
diff --git a/acct-user/flatpak/metadata.xml b/acct-user/flatpak/metadata.xml
new file mode 100644
index 0000000000..775bda744b
--- /dev/null
+++ b/acct-user/flatpak/metadata.xml
@@ -0,0 +1,8 @@
+
+
+
+
+ david@ixit.cz
+ David Heidelberg
+
+
diff --git a/sys-apps/flatpak/Manifest b/sys-apps/flatpak/Manifest
new file mode 100644
index 0000000000..dd04d79cf7
--- /dev/null
+++ b/sys-apps/flatpak/Manifest
@@ -0,0 +1 @@
+DIST flatpak-1.6.3.tar.xz 1340936 BLAKE2B ed697161a6ea10de7910438ef19d3a27d6bc4fc6b4ab8d14a955fb0ba6299950d13b25bf356b9b3341395441d378c0d0f3000dc0dd983a922090372d8e67a30d SHA512 8527914dd728d6bc4d28fcc7740514a370aad7c49c65e6126cdc237886dc3a5cb173a7fa69d8374a7502e08b1429b69bf24ee700a7d723fc090f9661534ca7b4
diff --git a/sys-apps/flatpak/flatpak-1.6.3.ebuild b/sys-apps/flatpak/flatpak-1.6.3.ebuild
new file mode 100644
index 0000000000..e82a738fad
--- /dev/null
+++ b/sys-apps/flatpak/flatpak-1.6.3.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools linux-info
+
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.xz"
+DESCRIPTION="Application distribution framework"
+HOMEPAGE="http://flatpak.org/"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc gnome gtk introspection policykit seccomp"
+
+# FIXME: systemd is automagic dep.
+RDEPEND="
+ acct-group/flatpak
+ acct-user/flatpak
+ >=dev-util/ostree-2019.5[gpg(+)]
+ || ( dev-util/ostree[curl]
+ dev-util/ostree[soup] )
+ >=net-libs/libsoup-2.4
+ >=gnome-base/dconf-0.26
+ >=dev-libs/appstream-glib-0.5.10
+ x11-libs/gdk-pixbuf:2
+ >=dev-libs/glib-2.56:2
+ >=dev-libs/libxml2-2.4
+ sys-apps/dbus
+ dev-libs/json-glib
+ x11-apps/xauth
+ >=app-arch/libarchive-2.8
+ >=app-crypt/gpgme-1.1.8
+ >=sys-fs/fuse-2.9.9:0
+ policykit? ( >=sys-auth/polkit-0.98 )
+ seccomp? ( sys-libs/libseccomp )
+"
+DEPEND="${RDEPEND}
+ >=sys-devel/gettext-0.18.2
+ dev-util/gdbus-codegen
+ introspection? ( >=dev-libs/gobject-introspection-1.40 )
+ doc? ( >=dev-util/gtk-doc-1.20
+ dev-libs/libxslt )
+"
+
+BDEPEND="
+ >=sys-devel/automake-1.13.4
+ sys-devel/bison
+ virtual/pkgconfig
+"
+# FIXME: is there a nicer way to do this?
+PDEPEND="
+ gtk? ( >=sys-apps/xdg-desktop-portal-0.10
+ sys-apps/xdg-desktop-portal-gtk )
+ gnome? ( >=sys-apps/xdg-desktop-portal-0.10
+ sys-apps/xdg-desktop-portal-gtk )
+"
+
+pkg_setup() {
+ local CONFIG_CHECK="~USER_NS"
+ linux-info_pkg_setup
+}
+
+src_configure() {
+ # FIXME: the gtk-doc check doesn't seem to be working
+ # TODO: split out bubblewrap
+ # TODO: split out xdg-dbus-proxy?
+ # TODO: We do not provide libmalcontent yet.
+ local myeconfargs=(
+ --enable-sandboxed-triggers \
+ --enable-xauth \
+ --localstatedir="${EPREFIX}"/var \
+ --without-system-bubblewrap \
+ --without-system-dbus-proxy \
+ $(use_enable doc documentation) \
+ $(use_enable doc gtk-doc) \
+ $(use_enable introspection) \
+ $(use_enable policykit system-helper) \
+ $(use_enable seccomp)
+ )
+
+ econf "${myeconfargs[@]}"
+
+}
diff --git a/sys-apps/flatpak/metadata.xml b/sys-apps/flatpak/metadata.xml
new file mode 100644
index 0000000000..775bda744b
--- /dev/null
+++ b/sys-apps/flatpak/metadata.xml
@@ -0,0 +1,8 @@
+
+
+
+
+ david@ixit.cz
+ David Heidelberg
+
+
diff --git a/sys-apps/xdg-desktop-portal-gtk/Manifest b/sys-apps/xdg-desktop-portal-gtk/Manifest
new file mode 100644
index 0000000000..5384a90925
--- /dev/null
+++ b/sys-apps/xdg-desktop-portal-gtk/Manifest
@@ -0,0 +1 @@
+DIST xdg-desktop-portal-gtk-1.6.0.tar.xz 366292 BLAKE2B 66676f5dc26b8eaa3db477a4c6e021cbae7f96944a9636bcb3e2f8b5ddb6123be0c6430819aaf02a107f17d29c5eef820c4c2be16d20f05f6e13f0bdeb0ed73d SHA512 97111e0c14a8cb54d88d0dd8142003b3f1a60e156131cce77deec0f43c936a110eda24c1e8efbb555dad0ad5aafe392d8c5afab80ea96166f616e6255371adc8
diff --git a/sys-apps/xdg-desktop-portal-gtk/metadata.xml b/sys-apps/xdg-desktop-portal-gtk/metadata.xml
new file mode 100644
index 0000000000..775bda744b
--- /dev/null
+++ b/sys-apps/xdg-desktop-portal-gtk/metadata.xml
@@ -0,0 +1,8 @@
+
+
+
+
+ david@ixit.cz
+ David Heidelberg
+
+
diff --git a/sys-apps/xdg-desktop-portal-gtk/xdg-desktop-portal-gtk-1.6.0.ebuild b/sys-apps/xdg-desktop-portal-gtk/xdg-desktop-portal-gtk-1.6.0.ebuild
new file mode 100644
index 0000000000..ef7ad5c161
--- /dev/null
+++ b/sys-apps/xdg-desktop-portal-gtk/xdg-desktop-portal-gtk-1.6.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd
+
+SRC_URI="https://github.com/flatpak/${PN}/releases/download/${PV}/${P}.tar.xz"
+DESCRIPTION="GTK/GNOME backend for xdg-desktop-portal"
+HOMEPAGE="https://github.com/flatpak/xdg-desktop-portal-gtk"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="wayland X"
+
+RDEPEND="
+ gnome-base/gnome-desktop:3
+ media-libs/fontconfig
+ >=dev-libs/glib-2.44:2[dbus]
+ >=x11-libs/gtk+-3.21.5:3[wayland=,X=]
+ >=sys-apps/xdg-desktop-portal-1.6.0-r1
+"
+DEPEND="${RDEPEND}
+ >=sys-devel/gettext-0.18.3
+"
+BDEPEND="
+ virtual/pkgconfig
+"
+
+src_configure() {
+ local myeconfargs=(
+ --with-systemduserunitdir="$(systemd_get_userunitdir)"
+ )
+ econf "${myeconfargs[@]}"
+}