Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libglib2.0 attr automake appstream-compose gettext autopoint bison dbus gtk-doc-tools \
sudo apt-get install -y libglib2.0 attr automake libappstream-compose-dev gettext autopoint bison dbus gtk-doc-tools \
libfuse-dev ostree libostree-dev libarchive-dev libcap-dev libattr1-dev libdw-dev libelf-dev \
libjson-glib-dev shared-mime-info desktop-file-utils libpolkit-agent-1-dev libpolkit-gobject-1-dev \
libseccomp-dev libsystemd-dev libxml2-utils libgpgme11-dev gobject-introspection \
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libglib2.0 attr automake appstream-compose gettext autopoint bison dbus gtk-doc-tools \
sudo apt-get install -y libglib2.0 attr automake libappstream-compose-dev gettext autopoint bison dbus gtk-doc-tools \
libfuse-dev ostree libostree-dev libarchive-dev libcap-dev libattr1-dev libdw-dev libelf-dev \
libjson-glib-dev shared-mime-info desktop-file-utils libpolkit-agent-1-dev libpolkit-gobject-1-dev \
libseccomp-dev libsystemd-dev libxml2-utils libgpgme11-dev gobject-introspection \
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
attr \
automake \
autopoint \
appstream-compose \
libappstream-compose-dev \
bison \
debugedit \
dbus \
Expand Down
18 changes: 1 addition & 17 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,6 @@ else
[AC_MSG_ERROR([You need at least version $FLATPAK_REQS of flatpak, your version is $FLATPAK_VERSION])])
fi

AC_CHECK_PROG([APPSTREAMCLI], [appstreamcli], [appstreamcli], [false])
if test "x$APPSTREAMCLI" = xfalse; then
AC_MSG_ERROR([You need appstreamcli installed])
APPSTREAMCLI_VERSION=`$APPSTREAMCLI --version | sed 's,.*\ \([0-9]*\.[0-9]*\.[0-9]*\)$,\1,'`
AX_COMPARE_VERSION([$APPSTREAMCLI_REQS],[gt],[$APPSTREAMCLI_VERSION],
[AC_MSG_ERROR([You need at least version $APPSTREAMCLI_REQS of appstreamcli, your version is $APPSTREAMCLI_VERSION])])
fi

AC_MSG_CHECKING([whether appstreamcli has compose support])
AS_IF([appstreamcli compose --help >/dev/null 2>&1],
[AC_MSG_RESULT(yes)],
[
AC_MSG_RESULT(no)
AC_MSG_ERROR([appstreamcli must have compose support enabled and installed])
])

LT_PREREQ([2.2.6])
LT_INIT([disable-static])

Expand Down Expand Up @@ -102,7 +86,7 @@ PKG_PROG_PKG_CONFIG([0.24])
# For libglnx
AC_CHECK_HEADER([sys/xattr.h], [], [AC_MSG_ERROR([You must have sys/xattr.h from glibc])])

PKG_CHECK_MODULES(BASE, [glib-2.0 >= $GLIB_REQS gio-2.0 gio-unix-2.0 ostree-1 >= $OSTREE_REQS json-glib-1.0 libxml-2.0 >= 2.4 libcurl])
PKG_CHECK_MODULES(BASE, [glib-2.0 >= $GLIB_REQS gio-2.0 gio-unix-2.0 ostree-1 >= $OSTREE_REQS json-glib-1.0 libxml-2.0 >= 2.4 libcurl appstream >= $APPSTREAMCLI_REQS appstream-compose >= $APPSTREAMCLI_REQS])

dnl ************************
dnl *** check for libelf ***
Expand Down
16 changes: 16 additions & 0 deletions doc/flatpak-builder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,22 @@
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>--compose-enable-screencasts</option></term>

<listitem><para>
Allow screencasts in Appstream catalogue.
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>--compose-enable-partial-urls</option></term>
<listitem><para>
Use partial URLs in Appstream catalogue. Requires
appstream >= 0.16.3.
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>--add-tag=TAG</option></term>

Expand Down
4 changes: 0 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ endforeach
# The debugedit program is a hard dependency
debugedit = find_program('debugedit', version: '>= 5.0')

# Require appstream with compose plugin installed
appstreamcli = find_program('appstreamcli', version: '>= 0.15.0')
appstreamcli_compose = run_command(appstreamcli, ['compose', '--help'], check: true)

subdir('src')
subdir('doc')
if get_option('tests')
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am.inc
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ flatpak_builder_SOURCES = \
$(NULL)

flatpak_builder_LDADD = $(AM_LDADD) $(BASE_LIBS) $(LIBELF_LIBS) $(YAML_LIBS) libglnx.la
flatpak_builder_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(YAML_CFLAGS)
flatpak_builder_CFLAGS = -I$(top_srcdir)/src $(AM_CFLAGS) $(BASE_CFLAGS) $(YAML_CFLAGS)
20 changes: 20 additions & 0 deletions src/asc-font.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* asc-font.h (stub)
*
* This header is intentionally provided as a no-op.
*
* In AppStream < 1.0.6, the public header
* appstream-compose.h -> asc-canvas.h
* includes the private header "asc-font.h".
*
* That private header is not installed by default, and nothing in
* the public API actually depends on its declarations.
*
* To allow building against older AppStream releases, we provide
* this empty stub so the include resolves cleanly.
*
* Safe to remove once the minimum required AppStream is >= 1.0.6.
*/
#ifndef __ASC_FONT_H
#define __ASC_FONT_H
#endif
28 changes: 28 additions & 0 deletions src/builder-context.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ struct BuilderContext
gboolean no_shallow_clone;
gboolean opt_export_only;
char *opt_mirror_screenshots_url;
gboolean opt_compose_enable_screencasts;
gboolean opt_compose_enable_partial_urls;

BuilderSdkConfig *sdk_config;
};
Expand Down Expand Up @@ -376,6 +378,32 @@ builder_context_get_opt_mirror_screenshots_url (BuilderContext *self)
return self->opt_mirror_screenshots_url;
}

void
builder_context_set_opt_compose_enable_screencasts (BuilderContext *self,
gboolean opt_compose_enable_screencasts)
{
self->opt_compose_enable_screencasts = !!opt_compose_enable_screencasts;
}

gboolean
builder_context_get_opt_compose_enable_screencasts (BuilderContext *self)
{
return self->opt_compose_enable_screencasts;
}

void
builder_context_set_opt_compose_enable_partial_urls (BuilderContext *self,
gboolean opt_compose_enable_partial_urls)
{
self->opt_compose_enable_partial_urls = !!opt_compose_enable_partial_urls;
}

gboolean
builder_context_get_opt_compose_enable_partial_urls (BuilderContext *self)
{
return self->opt_compose_enable_partial_urls;
}

GFile *
builder_context_find_in_sources_dirs (BuilderContext *self,
...)
Expand Down
10 changes: 10 additions & 0 deletions src/builder-context.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,16 @@ void builder_context_set_opt_mirror_screenshots_url (BuilderContext *

const char * builder_context_get_opt_mirror_screenshots_url (BuilderContext *self);

void builder_context_set_opt_compose_enable_screencasts (BuilderContext *self,
gboolean opt_compose_enable_screencasts);

gboolean builder_context_get_opt_compose_enable_screencasts (BuilderContext *self);

void builder_context_set_opt_compose_enable_partial_urls (BuilderContext *self,
gboolean opt_compose_enable_partial_urls);

gboolean builder_context_get_opt_compose_enable_partial_urls (BuilderContext *self);

BuilderSdkConfig * builder_context_get_sdk_config (BuilderContext *self);

gboolean builder_context_create_state_dir (BuilderContext *self,
Expand Down
6 changes: 6 additions & 0 deletions src/builder-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ static gboolean opt_log_session_bus;
static gboolean opt_log_system_bus;
static gboolean opt_yes;
static gint64 opt_source_date_epoch = -1;
static gboolean opt_compose_enable_screencasts;
static gboolean opt_compose_enable_partial_urls;

static GOptionEntry entries[] = {
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &opt_verbose, "Print debug information during command processing", NULL },
Expand Down Expand Up @@ -144,6 +146,8 @@ static GOptionEntry entries[] = {
{ "assumeyes", 'y', 0, G_OPTION_ARG_NONE, &opt_yes, N_("Automatically answer yes for all questions"), NULL },
{ "no-shallow-clone", 0, 0, G_OPTION_ARG_NONE, &opt_no_shallow_clone, "Don't use shallow clones when mirroring git repos", NULL },
{ "override-source-date-epoch", 0, 0, G_OPTION_ARG_INT64, &opt_source_date_epoch, "Use this timestamp to perform the build, instead of the last modification time of the manifest.", NULL },
{ "compose-enable-screencasts", 0, 0, G_OPTION_ARG_NONE, &opt_compose_enable_screencasts, "Allow screencasts in Appstream catalogue", NULL },
{ "compose-enable-partial-urls", 0, 0, G_OPTION_ARG_NONE, &opt_compose_enable_partial_urls, "Allow partial URLs in Appstream catalogue", NULL },
{ NULL }
};

Expand Down Expand Up @@ -605,6 +609,8 @@ main (int argc,
builder_context_set_bundle_sources (build_context, opt_bundle_sources);
builder_context_set_opt_export_only (build_context, opt_export_only);
builder_context_set_opt_mirror_screenshots_url (build_context, opt_mirror_screenshots_url);
builder_context_set_opt_compose_enable_screencasts (build_context, opt_compose_enable_screencasts);
builder_context_set_opt_compose_enable_partial_urls (build_context, opt_compose_enable_partial_urls);

git_init_email ();

Expand Down
Loading
Loading