diff options
author | Michael Catanzaro <mcatanzaro@igalia.com> | 2017-04-26 16:42:13 -0500 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@igalia.com> | 2017-04-26 20:37:34 -0500 |
commit | 24c68890024ca6653e6f2da0e8929c61e0ebfa0a (patch) | |
tree | a7d3aa6af3f17a7288f1a8c50bbaabb1008f308e | |
parent | 5e2afd83797c76400450c2ee3af85fe9c306bd86 (diff) | |
download | epiphany-24c68890024ca6653e6f2da0e8929c61e0ebfa0a.tar.gz |
Port to meson build system
72 files changed, 1133 insertions, 2055 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..567609b12 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/.gitmodules b/.gitmodules index 303eb9bcb..c651969a5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "libgd"] - path = libgd +[submodule "subprojects/libgd"] + path = subprojects/libgd url = ../libgd diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 5b70335be..000000000 --- a/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -SUBDIRS = help libgd gvdb lib embed src data po -if ENABLE_TESTS -SUBDIRS += tests -endif - -AM_DISTCHECK_CONFIGURE_FLAGS = \ - --enable-appstream-util \ - --enable-debug - -@CODE_COVERAGE_RULES@ - -# Ignore gtk theme cache files on distcheck -distuninstallcheck_listfiles = find . -type f -print | grep -v 'icon-theme.cache' - -@GENERATE_CHANGELOG_RULES@ -CHANGELOG_START = $(EPIPHANY_CHANGELOG_START) -CHANGELOG_GIT_FLAGS = --stat --no-color --no-decorate -dist-hook: dist-ChangeLog - -MAINTAINERCLEANFILES = \ - $(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \ - $(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \ - $(GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL) \ - m4/ - --include $(top_srcdir)/git.mk diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 66773e2ef..000000000 --- a/autogen.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# Run this to generate all the initial makefiles, etc. -test -n "$srcdir" || srcdir=$(dirname "$0") -test -n "$srcdir" || srcdir=. - -olddir=$(pwd) - -cd $srcdir - -(test -f configure.ac) || { - echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***" - exit 1 -} - -# shellcheck disable=SC2016 -PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac) - -if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then - echo "*** WARNING: I am going to run 'configure' with no arguments." >&2 - echo "*** If you wish to pass any to it, please specify them on the" >&2 - echo "*** '$0' command line." >&2 - echo "" >&2 -fi - -git submodule update --init --recursive - -aclocal --install || exit 1 -autoreconf --verbose --force --install || exit 1 - -cd "$olddir" -if [ "$NOCONFIGURE" = "" ]; then - $srcdir/configure "$@" || exit 1 - - if [ "$1" = "--help" ]; then exit 0 else - echo "Now type 'make' to compile $PKG_NAME" || exit 1 - fi -else - echo "Skipping configure process." -fi diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 674fc2333..000000000 --- a/configure.ac +++ /dev/null @@ -1,252 +0,0 @@ -# Copyright © 2000-2004 Marco Pesenti Gritti -# Copyright © 2003, 2004, 2005, 2006, 2007 Christian Persch -# Copyright © 2015-2016 Igalia S.L -# -# This file is part of Epiphany. -# -# Epiphany 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. -# -# Epiphany is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Epiphany. If not, see <http://www.gnu.org/licenses/>. - -AX_REQUIRE_DEFINED([APPSTREAM_XML]) -AX_REQUIRE_DEFINED([AX_CHECK_ENABLE_DEBUG]) -AX_REQUIRE_DEFINED([AX_COMPILER_FLAGS]) -AX_REQUIRE_DEFINED([AX_GENERATE_CHANGELOG]) -AX_REQUIRE_DEFINED([AX_IS_RELEASE]) -AX_REQUIRE_DEFINED([GLIB_GSETTINGS]) -AX_REQUIRE_DEFINED([PKG_CHECK_EXISTS]) -AX_REQUIRE_DEFINED([PKG_CHECK_MODULES]) -AX_REQUIRE_DEFINED([YELP_HELP_INIT]) - -dnl Must be a valid git tag -m4_define([epiphany_changelog_start],[3.21.4]) - -AC_INIT([GNOME Web Browser],[3.24.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=epiphany],[epiphany]) -AX_IS_RELEASE([git-directory]) - -AC_PREREQ([2.69]) - -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_MACRO_DIRS([m4 libgd]) -AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_SRCDIR([configure.ac]) - -AX_CHECK_ENABLE_DEBUG([yes]) -AX_CODE_COVERAGE -AX_COMPILER_FLAGS - -AX_GENERATE_CHANGELOG -AC_SUBST([EPIPHANY_CHANGELOG_START],[epiphany_changelog_start]) - -AC_PROG_CC - -AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums]) - -dnl Note: I want to enable subdir-objects here, to silence Automake's many -dnl warnings about not using it. But we can't do this until we require Automake -dnl 1.16 (which has not been released as of June 2015), due to GNU bug #13928. -dnl If Automake 2.0 comes out next instead of 1.16, we will need to bump our -dnl requirement straight to that, and then there is no need to use -dnl subdir-objects here as it will be implied. It is unfortunate that there is -dnl no way our build can be compatible with both future and older Automake, but -dnl it is a bug after all, and updating for bugfixes is just how software works. -dnl Note also: the issue is that a directory _literally_ named $(top_srcdir) -dnl will be created under embed/web-extension, and the build will fail due to -dnl misplaced .Plo files (used for dependency tracking). -AM_INIT_AUTOMAKE([1.11 foreign dist-xz no-dist-gzip tar-ustar]) -AM_SILENT_RULES([yes]) -AM_MAINTAINER_MODE([enable]) - -# Initialize libtool -LT_PREREQ([2.2]) -LT_INIT([dlopen disable-static]) - -APPSTREAM_XML - -GLIB_GSETTINGS - -YELP_HELP_INIT - -# Tests - -AC_MSG_CHECKING([whether to build tests]) -AC_ARG_ENABLE([tests], - AS_HELP_STRING([--enable-tests],[Whether to build tests (default: yes)]), - [], [enable_tests=yes]) -AC_MSG_RESULT([$enable_tests]) - -AM_CONDITIONAL([ENABLE_TESTS],[test "$enable_tests" = "yes"]) - -# ************ -# Dependencies -# ************ - -LIBGD_INIT([_view-common notification static]) - -LT_LIB_M - -GLIB_REQUIRED=2.46.0 -GTK_REQUIRED=3.22.0 -WEBKITGTK_REQUIRED=2.15.90 - -PKG_CHECK_MODULES([CAIRO], [cairo >= 1.2]) -PKG_CHECK_MODULES([GCR], [gcr-3 >= 3.5.5]) -PKG_CHECK_MODULES([GDK], [gdk-3.0 >= $GTK_REQUIRED]) -PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 >= 2.36.5]) -PKG_CHECK_MODULES([GIO_UNIX], [gio-unix-2.0 >= $GLIB_REQUIRED]) -PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $GLIB_REQUIRED]) -PKG_CHECK_MODULES([GNOME_DESKTOP], [gnome-desktop-3.0 >= 2.91.2]) -PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= $GTK_REQUIRED]) -PKG_CHECK_MODULES([GTK_UNIX_PRINT], [gtk+-unix-print-3.0 >= $GTK_REQUIRED]) -PKG_CHECK_MODULES([ICU_UC], [icu-uc >= 4.6]) -PKG_CHECK_MODULES([JSON_GLIB], [json-glib-1.0 >= 1.2.0]) -PKG_CHECK_MODULES([LIBNOTIFY], [libnotify >= 0.5.1]) -PKG_CHECK_MODULES([LIBSECRET], [libsecret-1 >= 0.14]) -PKG_CHECK_MODULES([LIBSOUP], [libsoup-2.4 >= 2.48.0]) -PKG_CHECK_MODULES([LIBXML], [libxml-2.0 >= 2.6.12]) -PKG_CHECK_MODULES([LIBXSLT], [libxslt >= 1.1.7]) -PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= 3.0]) -PKG_CHECK_MODULES([WEBKIT2GTK], [webkit2gtk-4.0 >= $WEBKITGTK_REQUIRED]) -PKG_CHECK_MODULES([WEBKIT2GTK_WEB_EXTENSION], [webkit2gtk-web-extension-4.0 >= $WEBKITGTK_REQUIRED]) - -# ********************* -# Experimental features -# ********************* - -# libhttpseverywhere is disabled by default for now. See tracker bug #775575. -AC_ARG_WITH([libhttpseverywhere], - [AS_HELP_STRING([--with-libhttpseverywhere], [Enable experimental HTTPS Everywhere support])], - [], - [with_libhttpseverywhere=no] -) -AS_IF([test "x$with_libhttpseverywhere" = "xyes"], - [PKG_CHECK_MODULES([HTTPSEVERYWHERE], [httpseverywhere-0.2 >= 0.2.2]) - AC_DEFINE([HAVE_LIBHTTPSEVERYWHERE], [1], [Define if libhttpseverywhere is available])] -) - -# Firefox sync is not quite ready yet either. -AC_ARG_ENABLE([firefox-sync], - [AS_HELP_STRING([--enable-firefox-sync], [Enable experimental Firefox Sync support])], - [], - [enable_firefox_sync=no] -) -AS_IF([test "x$enable_firefox_sync" = "xyes"], - [PKG_CHECK_MODULES([HOGWEED], [hogweed >= 3.2]) - PKG_CHECK_MODULES([NETTLE], [nettle >= 3.2]) - AC_DEFINE([ENABLE_SYNC], [1], [Define if Firefox Sync support is enabled])] -) - -AM_CONDITIONAL([ENABLE_SYNC], [test "x$enable_firefox_sync" = "xyes"]) - -# ****************** -# Portability checks -# ****************** - -# for backtrace() -AC_CHECK_HEADERS([execinfo.h]) -AC_SEARCH_LIBS([backtrace], [c execinfo]) - -# ******************************* -# Internationalization -# ******************************* - -ISO_CODES_REQUIRED=0.35 - -PKG_CHECK_EXISTS([iso-codes >= $ISO_CODES_REQUIRED], - [have_iso_codes=yes],[have_iso_codes=no]) - -if test "$have_iso_codes" = "yes"; then - AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains]) - if $PKG_CONFIG --variable=domains iso-codes | grep -q 639 && \ - $PKG_CONFIG --variable=domains iso-codes | grep -q 3166 ; then - result=yes - else - result=no - have_iso_codes=no - fi - AC_MSG_RESULT([$result]) -fi - -if test "$have_iso_codes" = "yes"; then - AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["`$PKG_CONFIG --variable=prefix iso-codes`"],[ISO codes prefix]) - AC_DEFINE([HAVE_ISO_CODES],[1],[Define if you have the iso-codes package]) -else - AC_MSG_ERROR([iso-codes is required]) -fi - -AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.19.8]) -AC_SUBST([GETTEXT_PACKAGE], [epiphany]) - -# **************** -# Distributor name -# **************** - -AC_ARG_WITH([distributor-name], - AS_HELP_STRING([--with-distributor-name=name],[Set the distributor name]), - [LSB_DISTRIBUTOR="$withval"]) - -if test -z "$LSB_DISTRIBUTOR"; then - AC_CHECK_PROGS([LSB_RELEASE], [lsb_release],) - if test -n "$LSB_RELEASE"; then - # Fallback on lsb_release if available - LSB_DISTRIBUTOR=$($LSB_RELEASE -i -s) - else - # Fallback on the product name - LSB_DISTRIBUTOR="Epiphany" - fi -fi - -AC_DEFINE_UNQUOTED([LSB_DISTRIBUTOR],["$LSB_DISTRIBUTOR"],[Distributor name]) - -# ************ -# Output files -# ************ - -AC_CONFIG_FILES([ -Makefile -data/Makefile -data/icons/Makefile -gvdb/Makefile -help/Makefile -libgd/Makefile -lib/Makefile -lib/egg/Makefile -lib/history/Makefile -lib/widgets/Makefile -embed/Makefile -embed/web-extension/Makefile -src/Makefile -src/profile-migrator/Makefile -src/search-provider/Makefile -po/Makefile.in -tests/Makefile -tests/data/Makefile -]) - -AC_OUTPUT - -# ************************************* -# ************************************* - -echo " -Epiphany was configured with the following options: - - Source code location : $srcdir - Compiler : $CC - Prefix : $prefix - Extra debugging support : $enable_debug - Build tests : $enable_tests - Code coverage : $enable_code_coverage - HTTPS Everywhere (unstable): $with_libhttpseverywhere - Firefox Sync (unstable) : $enable_firefox_sync -" diff --git a/data/Makefile.am b/data/Makefile.am deleted file mode 100644 index 69e841cac..000000000 --- a/data/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -SUBDIRS = icons - -desktop_in_files = org.gnome.Epiphany.desktop.in -desktopdir = $(datadir)/applications -desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) - -$(desktop_DATA): $(desktop_in_files) - $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@ - -gsettings_ENUM_NAMESPACE = org.gnome.Epiphany -gsettings_ENUM_FILES = $(top_srcdir)/lib/ephy-prefs.h - -gsettings_SCHEMAS = org.gnome.epiphany.gschema.xml -@GSETTINGS_RULES@ - -appstream_in_files = org.gnome.Epiphany.appdata.xml.in -appstream_XML = $(appstream_in_files:.xml.in=.xml) -@APPSTREAM_XML_RULES@ - -$(appstream_XML): $(appstream_in_files) - $(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@ - -# Dbus service file -servicedir = $(datadir)/dbus-1/services -service_in_files = org.gnome.EpiphanySearchProvider.service.in -service_DATA = $(service_in_files:.service.in=.service) - -# Rule to make the service file with bindir expanded -$(service_DATA): $(service_in_files) Makefile - $(AM_V_GEN) sed -e "s|\@libexecdir[@]|$(libexecdir)|g" $< > $@ - -# Default bookmarks -default_bookmarksdir = $(pkgdatadir) -default_bookmarks_in_files = default-bookmarks.rdf.in -default_bookmarks_DATA = $(default_bookmarks_in_files:.rdf.in=.rdf) -$(default_bookmarks_DATA): $(default_bookmarks_in_files) Makefile - $(AM_V_GEN) sed -e "s|\@pkgdatadir[@]|$(pkgdatadir)|g" $< > $@ - -searchproviderdir = $(datadir)/gnome-shell/search-providers -dist_searchprovider_DATA = epiphany-search-provider.ini - -dist_man_MANS = epiphany.1 - -EXTRA_DIST = \ - $(appstream_in_files) \ - $(service_in_files) \ - $(desktop_in_files) \ - $(default_bookmarks_in_files) \ - $(gsettings_SCHEMAS) \ - epiphany-service.xml - -CLEANFILES = \ - $(appstream_XML) \ - $(service_DATA) \ - $(desktop_DATA) \ - $(default_bookmarks_DATA) - --include $(top_srcdir)/git.mk diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am deleted file mode 100644 index 30fea24ee..000000000 --- a/data/icons/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -public_icons_themes = hicolor - -public_icons = \ - hicolor_apps_symbolic_org.gnome.Epiphany-symbolic.svg \ - hicolor_apps_16x16_org.gnome.Epiphany.png \ - hicolor_apps_24x24_org.gnome.Epiphany.png \ - hicolor_apps_32x32_org.gnome.Epiphany.png \ - hicolor_apps_48x48_org.gnome.Epiphany.png \ - hicolor_apps_512x512_org.gnome.Epiphany.png - -EXTRA_DIST = $(public_icons) - -dist_noinst_DATA = source.svg - -############################################################################### - -gtk_update_icon_cache = gtk-update-icon-cache -f -t - -update-icon-cache: - @-if test -z "$(DESTDIR)"; then \ - echo "Updating Gtk icon cache."; \ - for theme in $(public_icons_themes); do \ - $(gtk_update_icon_cache) $(datadir)/icons/$$theme; \ - done; \ - else \ - echo "*** Icon cache not updated. After (un)install, run this:"; \ - for theme in $(public_icons_themes); do \ - echo "*** $(gtk_update_icon_cache) $(datadir)/icons/$$theme"; \ - done; \ - fi - -install-icons: - for icon in $(public_icons); do \ - THEME=`echo $$icon | cut -d_ -f1`; \ - CONTEXT=`echo $$icon | cut -d_ -f2`; \ - SIZE=`echo $$icon | cut -d_ -f3`; \ - ICONFILE=`echo $$icon | cut -d_ -f4`; \ - mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \ - $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ - done - -uninstall-icons: - -for icon in $(public_icons); do \ - THEME=`echo $$icon | cut -d_ -f1`; \ - CONTEXT=`echo $$icon | cut -d_ -f2`; \ - SIZE=`echo $$icon | cut -d_ -f3`; \ - ICONFILE=`echo $$icon | cut -d_ -f4`; \ - rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ - done - -install-data-local: install-icons update-icon-cache - -uninstall-local: uninstall-icons update-icon-cache - --include $(top_srcdir)/git.mk diff --git a/data/icons/hicolor_apps_16x16_org.gnome.Epiphany.png b/data/icons/hicolor/16x16/apps/org.gnome.Epiphany.png Binary files differindex 029ef758e..029ef758e 100644 --- a/data/icons/hicolor_apps_16x16_org.gnome.Epiphany.png +++ b/data/icons/hicolor/16x16/apps/org.gnome.Epiphany.png diff --git a/data/icons/hicolor_apps_24x24_org.gnome.Epiphany.png b/data/icons/hicolor/24x24/apps/org.gnome.Epiphany.png Binary files differindex 18170eba1..18170eba1 100644 --- a/data/icons/hicolor_apps_24x24_org.gnome.Epiphany.png +++ b/data/icons/hicolor/24x24/apps/org.gnome.Epiphany.png diff --git a/data/icons/hicolor_apps_32x32_org.gnome.Epiphany.png b/data/icons/hicolor/32x32/apps/org.gnome.Epiphany.png Binary files differindex 86dce5582..86dce5582 100644 --- a/data/icons/hicolor_apps_32x32_org.gnome.Epiphany.png +++ b/data/icons/hicolor/32x32/apps/org.gnome.Epiphany.png diff --git a/data/icons/hicolor_apps_48x48_org.gnome.Epiphany.png b/data/icons/hicolor/48x48/apps/org.gnome.Epiphany.png Binary files differindex 54cfef114..54cfef114 100644 --- a/data/icons/hicolor_apps_48x48_org.gnome.Epiphany.png +++ b/data/icons/hicolor/48x48/apps/org.gnome.Epiphany.png diff --git a/data/icons/hicolor_apps_512x512_org.gnome.Epiphany.png b/data/icons/hicolor/512x512/apps/org.gnome.Epiphany.png Binary files differindex df8353ae7..df8353ae7 100644 --- a/data/icons/hicolor_apps_512x512_org.gnome.Epiphany.png +++ b/data/icons/hicolor/512x512/apps/org.gnome.Epiphany.png diff --git a/data/icons/hicolor_apps_symbolic_org.gnome.Epiphany-symbolic.svg b/data/icons/hicolor/symbolic/apps/org.gnome.Epiphany-symbolic.svg index ddc8e0706..ef4e33dec 100644 --- a/data/icons/hicolor_apps_symbolic_org.gnome.Epiphany-symbolic.svg +++ b/data/icons/hicolor/symbolic/apps/org.gnome.Epiphany-symbolic.svg @@ -19,7 +19,7 @@ <g style='display:inline' inkscape:groupmode='layer' id='layer9' inkscape:label='status' transform='translate(-183,-529)'/> <g inkscape:groupmode='layer' id='layer10' inkscape:label='devices' transform='translate(-183,-529)'/> <g inkscape:groupmode='layer' id='layer11' inkscape:label='apps' transform='translate(-183,-529)'> - + <path style='color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate' sodipodi:nodetypes='cccccccc' id='path6242' inkscape:connector-curvature='0' d='m 191.0002,533.84553 0,10.38049 -2.34399,-2.28818 -1.33941,2.73465 c -0.32808,0.73962 -2.03368,0.14492 -1.5487,-0.84412 l 1.32547,-2.83928 -2.95789,0 6.86452,-7.14356 z'/> <path style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans' sodipodi:nodetypes='csccssccsssc' id='path23405' inkscape:connector-curvature='0' d='m 190.15645,530.0625 c -3.82659,0.46006 -6.57883,3.95775 -6.09375,7.78125 0.13127,1.03473 0.29377,1.38184 0.29377,1.38184 l 1.67498,-1.63184 c -0.33104,-2.75343 1.62156,-5.23146 4.375,-5.5625 2.75344,-0.33104 5.23146,1.62156 5.5625,4.375 0.31355,2.60795 -1.39127,5.02493 -3.96875,5.53125 l 0.0312,2 c 0,0 0.52086,-0.1059 0.62354,-0.13097 3.41561,-0.83385 5.70627,-4.1273 5.28271,-7.65028 -0.46006,-3.8266 -3.95466,-6.55381 -7.78125,-6.09375 z'/> <path style='opacity:0.3;color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate' id='path11289' inkscape:connector-curvature='0' d='m 187.11293,536.81497 0,-0.20574 -0.19826,0.0186 c 0.0165,-0.13095 0.0329,-0.26167 0.0496,-0.3926 l -0.11578,0 -0.11556,0.14959 -0.11578,0.0559 -0.1653,-0.0932 -0.0165,-0.20575 0.0331,-0.22438 0.24798,-0.18688 0.19826,0 0.0329,-0.11229 0.24786,0.0559 0.18183,0.2246 0.0331,-0.37419 0.31401,-0.26167 0.11567,-0.28055 0.23133,-0.0934 0.1322,-0.18688 0.29738,-0.0564 0.14885,-0.22415 c -0.14874,0 -0.29749,0 -0.44623,0 l 0.28094,-0.13095 0.19814,0 0.28106,-0.0937 0.0331,-0.11186 -0.0992,-0.0937 -0.11567,-0.0375 0.0331,-0.11208 -0.0826,-0.16822 -0.19837,0.0746 0.0331,-0.14947 -0.23134,-0.13096 -0.18171,0.3177 0.0165,0.11229 -0.18171,0.075 -0.11578,0.24302 -0.0495,-0.22438 -0.31402,-0.13095 -0.0496,-0.16822 0.41315,-0.24325 0.18182,-0.16822 0.0165,-0.20563 -0.0991,-0.0562 -0.13219,-0.0188 -0.0826,0.20575 c 0,0 -0.1382,0.0271 -0.17373,0.0358 -0.45378,0.41804 -1.37066,1.32044 -1.58368,3.02405 0.008,0.0395 0.15441,0.26854 0.15441,0.26854 l 0.347,0.20552 0.347,0.0937 m 3.96609,-4.30034 -0.4298,-0.16833 -0.49552,0.0561 -0.61161,0.16822 -0.11567,0.11229 0.38008,0.26167 0,0.14959 -0.14875,0.14959 0.19846,0.39294 0.13188,-0.075 0.16561,-0.26168 c 0.2553,-0.0789 0.4842,-0.16833 0.72686,-0.28053 l 0.19846,-0.5048 m 2.52925,0.34192 -0.375,0.0937 -0.21875,0.15625 0,0.125 -0.375,0.25 0.0937,0.34375 0.21875,-0.15625 0.125,0.15625 0.15625,0.0937 0.0937,-0.28125 -0.0625,-0.15625 0.0625,-0.0937 0.21875,-0.1875 0.0937,0 -0.0937,0.21875 0,0.1875 c 0.0892,-0.0242 0.1588,-0.051 0.25,-0.0625 l -0.25,0.1875 0,0.125 -0.3125,0.21875 -0.28125,-0.0625 0,-0.15625 -0.125,0.0625 0.0625,0.15625 -0.21875,0 -0.125,0.21875 -0.15625,0.15625 -0.0937,0.0312 0,0.1875 0.0312,0.15625 -0.0312,0 0,0.53125 0.0625,-0.0312 0.0937,-0.21875 0.1875,-0.125 0.0312,-0.0937 0.28125,-0.0625 0.15625,0.1875 0.1875,0.0937 -0.0937,0.1875 0.15625,-0.0312 0.0625,-0.21875 -0.1875,-0.21875 0.0625,0 0.21875,0.15625 0.0312,0.21875 0.15625,0.21875 0.0625,-0.3125 0.0937,-0.0312 c 0.0959,0.0996 0.1692,0.23163 0.25,0.34375 l 0.28125,0 0.1875,0.125 -0.0937,0.0937 -0.15625,0.15625 -0.25,0 -0.34375,-0.0937 -0.1875,0 -0.125,0.15625 -0.34375,-0.375 -0.25,-0.0625 -0.375,0.0625 -0.15625,0.0937 0,2.40625 0.0312,0.0312 0.25,-0.15625 0.0937,0.0937 0.28125,0 0.125,0.15625 -0.0937,0.3125 0.1875,0.1875 0,0.375 0.125,0.25 -0.0937,0.25 c -0.009,0.16159 0,0.30714 0,0.46875 0.0795,0.21894 0.14355,0.43575 0.21875,0.65625 l 0.0625,0.34375 0,0.1875 0.125,0 0.21875,-0.125 0.25,0 0.375,-0.4375 -0.0312,-0.15625 0.25,-0.21875 -0.1875,-0.1875 0.21875,-0.1875 0.21875,-0.125 0.0937,-0.125 -0.0625,-0.25 0,-0.59375 0.1875,-0.375 0.1875,-0.25 0.25,-0.5625 0,-0.15625 c -0.11654,0.0146 -0.22972,0.0231 -0.34375,0.0312 -0.0722,0.005 -0.14446,0 -0.21875,0 -0.12359,-0.25961 -0.2183,-0.50966 -0.3125,-0.78125 l -0.15625,-0.1875 -0.0937,-0.3125 0.0625,-0.0625 0.21875,0.25 0.25,0.5625 0.15625,0.15625 -0.0625,0.21875 0.15625,0.15625 0.25,-0.25 0.3125,-0.21875 0.15625,-0.1875 0,-0.21875 c -0.0389,-0.0732 -0.0547,-0.14545 -0.0937,-0.21875 l -0.15625,0.1875 -0.125,-0.15625 -0.1875,-0.125 0,-0.28125 0.21875,0.21875 0.21875,-0.0312 c 0.10166,0.0923 0.19205,0.20751 0.28125,0.3125 l 0.15625,-0.1875 c 0,-0.17463 -0.19976,-1.02044 -0.625,-1.75 -0.42526,-0.72932 -1.15625,-1.40625 -1.15625,-1.40625 l -0.0625,0.0937 -0.21875,0.21875 -0.25,-0.25 0.25,0 0.125,-0.125 -0.46875,-0.0937 -0.25,-0.0937 z'/> diff --git a/data/meson.build b/data/meson.build new file mode 100644 index 000000000..855529a26 --- /dev/null +++ b/data/meson.build @@ -0,0 +1,66 @@ +install_subdir('icons/hicolor', + install_dir: join_paths(datadir, 'icons') +) + +i18n.merge_file('desktop-file', + input: 'org.gnome.Epiphany.desktop.in', + output: 'org.gnome.Epiphany.desktop', + install: true, + install_dir: join_paths(datadir, 'applications'), + po_dir: '../po', + type: 'desktop' +) + +i18n.merge_file('appdata-file', + input: 'org.gnome.Epiphany.appdata.xml.in', + output: 'org.gnome.Epiphany.appdata.xml', + install: true, + install_dir: join_paths(datadir, 'appdata'), + po_dir: '../po' +) + +# https://github.com/mesonbuild/meson/issues/1687 +custom_target('gsettings-enums', + input: '../lib/ephy-prefs.h', + output: 'org.gnome.Epiphany.enums.xml', + install: true, + install_dir: join_paths(datadir, 'glib-2.0', 'schemas'), + capture: true, + command: ['glib-mkenums', + '--comments', '<!-- @comment@ -->', + '--fhead', '<schemalist>', + '--vhead', ' <@type@ id="org.gnome.Epiphany.@EnumName@">', + '--vprod', ' <value nick="@valuenick@" value="@valuenum@"/>', + '--vtail', ' </@type@>', + '--ftail', '</schemalist>', + '@INPUT@' + ] +) +install_data('org.gnome.epiphany.gschema.xml', + install_dir: join_paths(datadir, 'glib-2.0', 'schemas') +) + +serviceconf = configuration_data() +serviceconf.set('libexecdir', libexecdir) +configure_file( + input: 'org.gnome.EpiphanySearchProvider.service.in', + output: 'org.gnome.EpiphanySearchProvider.service', + configuration: serviceconf, + install: true, + install_dir: join_paths(datadir, 'dbus-1', 'services') +) +install_data('epiphany-search-provider.ini', + install_dir: join_paths(datadir, 'gnome-shell', 'search-providers') +) + +bookmarksconf = configuration_data() +bookmarksconf.set('pkgdatadir', pkgdatadir) +configure_file( + input: 'default-bookmarks.rdf.in', + output: 'default-bookmarks.rdf', + configuration: bookmarksconf, + install: true, + install_dir: pkgdatadir +) + +install_man('epiphany.1') diff --git a/embed/Makefile.am b/embed/Makefile.am deleted file mode 100644 index cbe2d822d..000000000 --- a/embed/Makefile.am +++ /dev/null @@ -1,133 +0,0 @@ -SUBDIRS = web-extension - -noinst_LTLIBRARIES = \ - libephyembed.la - -TYPES_H_FILES = \ - ephy-download.h \ - ephy-embed-shell.h \ - ephy-web-view.h - -BUILT_SOURCES = \ - ephy-embed-type-builtins.c \ - ephy-embed-type-builtins.h - -libephyembed_la_SOURCES = \ - ephy-about-handler.c \ - ephy-about-handler.h \ - ephy-downloads-manager.c \ - ephy-downloads-manager.h \ - ephy-download.c \ - ephy-download.h \ - ephy-embed.c \ - ephy-embed.h \ - ephy-embed-container.c \ - ephy-embed-container.h \ - ephy-embed-event.c \ - ephy-embed-event.h \ - ephy-embed-prefs.c \ - ephy-embed-prefs.h \ - ephy-embed-shell.c \ - ephy-embed-shell.h \ - ephy-embed-utils.c \ - ephy-embed-utils.h \ - ephy-encoding.c \ - ephy-encoding.h \ - ephy-encodings.c \ - ephy-encodings.h \ - ephy-file-monitor.c \ - ephy-file-monitor.h \ - ephy-find-toolbar.c \ - ephy-find-toolbar.h \ - ephy-notification-container.c \ - ephy-notification-container.h \ - ephy-web-view.c \ - ephy-web-view.h \ - ephy-web-extension-proxy.c \ - ephy-web-extension-proxy.h - -nodist_libephyembed_la_SOURCES = \ - $(BUILT_SOURCES) - -libephyembed_la_CFLAGS = \ - $(WARN_CFLAGS) - -libephyembed_la_CPPFLAGS = \ - -I$(top_builddir)/lib \ - -I$(top_builddir)/lib/widgets \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/lib/egg \ - -I$(top_srcdir)/lib/history \ - -I$(top_srcdir)/lib/widgets \ - -I$(top_srcdir)/libgd \ - -DPKGDATADIR=\"$(pkgdatadir)\" \ - -DEPHY_WEB_EXTENSIONS_DIR=\"$(pkglibdir)/web-extensions\" \ - $(GDK_CFLAGS) \ - $(GIO_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(GTK_CFLAGS) \ - $(HTTPSEVERYWHERE_CFLAGS) \ - $(LIBSECRET_CFLAGS) \ - $(LIBSOUP_CFLAGS) \ - $(WEBKIT2GTK_CFLAGS) - -libephyembed_la_LDFLAGS = \ - $(WARN_LDFLAGS) - -libephyembed_la_LIBADD = \ - $(GDK_LIBS) \ - $(GIO_LIBS) \ - $(GLIB_LIBS) \ - $(GTK_LIBS) \ - $(HTTPSEVERYWHERE_LIBS) \ - $(LIBM) \ - $(LIBSECRET_LIBS) \ - $(LIBSOUP_LIBS) \ - $(WEBKIT2GTK_LIBS) - -CLEANFILES = $(stamp_files) $(BUILT_SOURCES) - -stamp_files = \ - stamp-ephy-embed-type-builtins.c \ - stamp-ephy-embed-type-builtins.h - -ephy-embed-type-builtins.c: stamp-ephy-embed-type-builtins.c Makefile - @true -stamp-ephy-embed-type-builtins.c: Makefile $(TYPES_H_FILES) - $(AM_V_GEN) $(GLIB_MKENUMS) \ - --fhead "#include <config.h>\n\n" \ - --fhead "#include \"ephy-embed-type-builtins.h\"\n\n" \ - --fprod "\n/* enumerations from \"@filename@\" */" \ - --fprod "\n#include \"@filename@\"" \ - --vhead "GType\n@enum_name@_get_type (void)\n{\n" \ - --vhead " static GType type = 0;\n\n" \ - --vhead " if (G_UNLIKELY (type == 0))\n {\n" \ - --vhead " static const G@Type@Value _@enum_name@_values[] = {" \ - --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ - --vtail " { 0, NULL, NULL }\n };\n\n" \ - --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n }\n\n" \ - --vtail " return type;\n}\n\n" \ - $(filter-out $<,$^) > xgen-$(@F) \ - && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \ - && rm -f xgen-$(@F) \ - && echo timestamp > $(@F) - -ephy-embed-type-builtins.h: stamp-ephy-embed-type-builtins.h Makefile - @true -stamp-ephy-embed-type-builtins.h: Makefile $(TYPES_H_FILES) - $(AM_V_GEN) $(GLIB_MKENUMS) \ - --fhead "#ifndef EPHY_EMBED_TYPE_BUILTINS_H\n" \ - --fhead "#define EPHY_EMBED_TYPE_BUILTINS_H 1\n\n" \ - --fhead "#include <glib-object.h>\n\n" \ - --fhead "G_BEGIN_DECLS\n\n" \ - --ftail "G_END_DECLS\n\n" \ - --ftail "#endif /* EPHY_EMBED_TYPE_BUILTINS_H */\n" \ - --fprod "\n/* --- @filename@ --- */" \ - --eprod "#define EPHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \ - --eprod "GType @enum_name@_get_type (void);\n" \ - $(filter-out $<,$^) > xgen-$(@F) \ - && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \ - && rm -f xgen-$(@F) \ - && echo timestamp > $(@F) - --include $(top_srcdir)/git.mk diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c index eb5f0a990..bb5572db5 100644 --- a/embed/ephy-embed-shell.c +++ b/embed/ephy-embed-shell.c @@ -43,7 +43,7 @@ #include <gtk/gtk.h> #include <stdlib.h> -#ifdef HAVE_LIBHTTPSEVERYWHERE +#if ENABLE_HTTPS_EVERYWHERE #include <httpseverywhere.h> #endif @@ -821,7 +821,7 @@ ephy_embed_shell_create_web_context (EphyEmbedShell *shell) g_object_unref (manager); } -#ifdef HAVE_LIBHTTPSEVERYWHERE +#if ENABLE_HTTPS_EVERYWHERE static void https_everywhere_update_cb (HTTPSEverywhereUpdater *updater, GAsyncResult *result) @@ -868,7 +868,7 @@ ephy_embed_shell_startup (GApplication *application) char *filename; char *cookie_policy; char *filters_dir; -#ifdef HAVE_LIBHTTPSEVERYWHERE +#if ENABLE_HTTPS_EVERYWHERE HTTPSEverywhereContext *context; HTTPSEverywhereUpdater *updater; #endif @@ -973,7 +973,7 @@ ephy_embed_shell_startup (GApplication *application) ephy_embed_prefs_set_cookie_accept_policy (cookie_manager, cookie_policy); g_free (cookie_policy); -#ifdef HAVE_LIBHTTPSEVERYWHERE +#if ENABLE_HTTPS_EVERYWHERE /* We might want to be smarter about this in the future. For now, * trigger an update of the rulesets once each time Epiphany is started. * Note that the updated rules will not be used until the next time Epiphany diff --git a/embed/ephy-embed-type-builtins.c.in b/embed/ephy-embed-type-builtins.c.in new file mode 100644 index 000000000..ed7fecaf8 --- /dev/null +++ b/embed/ephy-embed-type-builtins.c.in @@ -0,0 +1,42 @@ +/*** BEGIN file-header ***/ + +#include <config.h> +#include "ephy-embed-type-builtins.h" + +/*** END file-header ***/ +/*** BEGIN file-production ***/ + +/* enumerations from "@basename@" */ +#include "@basename@" + +/*** END file-production ***/ + +/*** BEGIN value-header ***/ +GType +@enum_name@_get_type(void) { + static volatile gsize g_define_type_id__volatile = 0; + + if(g_once_init_enter(&g_define_type_id__volatile)) { + static const G@Type@Value values [] = { +/*** END value-header ***/ + +/*** BEGIN value-production ***/ + { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, +/*** END value-production ***/ + +/*** BEGIN value-tail ***/ + { 0, NULL, NULL } + }; + + GType g_define_type_id = + g_@type@_register_static(g_intern_static_string("@EnumName@"), values); + g_once_init_leave(&g_define_type_id__volatile, g_define_type_id); + } + + return g_define_type_id__volatile; +} + +/*** END value-tail ***/ + +/*** BEGIN file-tail ***/ +/*** END file-tail ***/ diff --git a/embed/ephy-embed-type-builtins.h.in b/embed/ephy-embed-type-builtins.h.in new file mode 100644 index 000000000..f36794564 --- /dev/null +++ b/embed/ephy-embed-type-builtins.h.in @@ -0,0 +1,22 @@ +/*** BEGIN file-header ***/ +#pragma once + +#include <glib-object.h> + +G_BEGIN_DECLS +/*** END file-header ***/ + +/*** BEGIN file-production ***/ + +/* enumerations from "@basename@" */ +/*** END file-production ***/ +/*** BEGIN value-header ***/ +GType @enum_name@_get_type (void) G_GNUC_CONST; +#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) +/*** END value-header ***/ + +/*** BEGIN file-tail ***/ + +G_END_DECLS + +/*** END file-tail ***/ diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index 8c490f6a2..4915238aa 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -1994,7 +1994,7 @@ format_crash_error_page (const char *uri, formatted_uri); formatted_distributor = g_strdup_printf ("<strong>%s</strong>", - LSB_DISTRIBUTOR); + DISTRIBUTOR_NAME); /* Further error details when a site cannot be loaded due to a page crash error. */ second_paragraph = g_strdup_printf (_("If this happens again, please report " "the problem to the %s developers."), diff --git a/embed/meson.build b/embed/meson.build new file mode 100644 index 000000000..b391dd948 --- /dev/null +++ b/embed/meson.build @@ -0,0 +1,71 @@ +subdir('web-extension') + +types_headers = [ + 'ephy-download.h', + 'ephy-embed-shell.h', + 'ephy-web-view.h' +] + +enums = gnome.mkenums('ephy-embed', + sources: types_headers, + h_template: 'ephy-embed-type-builtins.h.in', + c_template: 'ephy-embed-type-builtins.c.in' +) + +libephyembed_sources = [ + 'ephy-about-handler.c', + 'ephy-downloads-manager.c', + 'ephy-download.c', + 'ephy-embed.c', + 'ephy-embed-container.c', + 'ephy-embed-event.c', + 'ephy-embed-prefs.c', + 'ephy-embed-shell.c', + 'ephy-embed-utils.c', + 'ephy-encoding.c', + 'ephy-encodings.c', + 'ephy-file-monitor.c', + 'ephy-find-toolbar.c', + 'ephy-notification-container.c', + 'ephy-web-view.c', + 'ephy-web-extension-proxy.c', + enums +] + +libephyembed_deps = [ + gio_dep, + glib_dep, + gtk_dep, + icu_uc_dep, + libgd_dep, + libsecret_dep, + libsoup_dep, + m_dep, + webkit2gtk_dep +] + +if get_option('enable_https_everywhere') + libephyembed_deps += httpseverywhere_dep +endif + +libephyembed_includes = include_directories( + '.', + '..', + '../lib', + '../lib/egg', + '../lib/history', + '../lib/widgets', + '../subprojects/libgd' +) + +libephyembed = static_library('ephyembed', + libephyembed_sources, + dependencies: libephyembed_deps, + include_directories: libephyembed_includes, +) + +ephyembed_dep = declare_dependency( + link_with: libephyembed, + include_directories: libephyembed_includes, + dependencies: libephyembed_deps +) diff --git a/embed/web-extension/Makefile.am b/embed/web-extension/Makefile.am deleted file mode 100644 index bf091aef3..000000000 --- a/embed/web-extension/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -webextension_LTLIBRARIES = libephywebextension.la - -webextensiondir = $(pkglibdir)/web-extensions - -libephywebextension_la_SOURCES = \ - ephy-embed-form-auth.c \ - ephy-embed-form-auth.h \ - ephy-uri-tester.c \ - ephy-uri-tester.h \ - ephy-web-dom-utils.c \ - ephy-web-dom-utils.h \ - ephy-web-extension.c \ - ephy-web-extension.h \ - ephy-web-extension-main.c \ - ephy-web-overview.h \ - ephy-web-overview.c \ - ephy-web-overview-model.h \ - ephy-web-overview-model.c - -libephywebextension_la_CPPFLAGS = \ - -I$(top_srcdir)/lib \ - $(GIO_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(GTK_CFLAGS) \ - $(LIBSECRET_CFLAGS) \ - $(LIBSOUP_CFLAGS) \ - $(HTTPSEVERYWHERE_CFLAGS) \ - $(WEBKIT2GTK_WEB_EXTENSION_CFLAGS) - -libephywebextension_la_CFLAGS = \ - $(WARN_CFLAGS) - -libephywebextension_la_LDFLAGS = \ - $(WARN_LDFLAGS) -module -avoid-version -no-undefined - -libephywebextension_la_LIBADD = \ - $(top_builddir)/lib/libephymisc.la \ - $(GIO_LIBS) \ - $(GLIB_LIBS) \ - $(GTK_LIBS) \ - $(LIBSECRET_LIBS) \ - $(LIBSOUP_LIBS) \ - $(HTTPSEVERYWHERE_LIBS) \ - $(WEBKIT2GTK_WEB_EXTENSION_LIBS) - --include $(top_srcdir)/git.mk diff --git a/embed/web-extension/ephy-uri-tester.c b/embed/web-extension/ephy-uri-tester.c index 5415d514b..4f23792ce 100644 --- a/embed/web-extension/ephy-uri-tester.c +++ b/embed/web-extension/ephy-uri-tester.c @@ -37,7 +37,7 @@ #include <libsoup/soup.h> #include <string.h> -#ifdef HAVE_LIBHTTPSEVERYWHERE +#if ENABLE_HTTPS_EVERYWHERE #include <httpseverywhere.h> #endif @@ -69,7 +69,7 @@ struct _EphyUriTester { GMainLoop *load_loop; int adblock_filters_to_load; gboolean adblock_loaded; -#ifdef HAVE_LIBHTTPSEVERYWHERE +#if ENABLE_HTTPS_EVERYWHERE gboolean https_everywhere_loaded; HTTPSEverywhereContext *https_everywhere_context; @@ -538,7 +538,7 @@ ephy_uri_tester_adblock_loaded (EphyUriTester *tester) { if (g_atomic_int_dec_and_test (&tester->adblock_filters_to_load)) { tester->adblock_loaded = TRUE; -#ifdef HAVE_LIBHTTPSEVERYWHERE +#if ENABLE_HTTPS_EVERYWHERE if (tester->https_everywhere_loaded) g_main_loop_quit (tester->load_loop); #else @@ -547,7 +547,7 @@ ephy_uri_tester_adblock_loaded (EphyUriTester *tester) } } -#ifdef HAVE_LIBHTTPSEVERYWHERE +#if ENABLE_HTTPS_EVERYWHERE static void ephy_uri_tester_https_everywhere_loaded (EphyUriTester *tester) { @@ -634,7 +634,7 @@ ephy_uri_tester_rewrite_uri (EphyUriTester *tester, return NULL; } -#ifdef HAVE_LIBHTTPSEVERYWHERE +#if ENABLE_HTTPS_EVERYWHERE if ((flags & EPHY_URI_TEST_HTTPS_EVERYWHERE) && tester->https_everywhere_context != NULL) return https_everywhere_context_rewrite (tester->https_everywhere_context, request_uri); #endif @@ -642,7 +642,7 @@ ephy_uri_tester_rewrite_uri (EphyUriTester *tester, return g_strdup (request_uri); } -#ifdef HAVE_LIBHTTPSEVERYWHERE +#if ENABLE_HTTPS_EVERYWHERE static void https_everywhere_context_init_cb (HTTPSEverywhereContext *context, GAsyncResult *res, @@ -723,7 +723,7 @@ ephy_uri_tester_load_sync (GTask *task, g_main_context_push_thread_default (context); tester->load_loop = g_main_loop_new (context, FALSE); -#ifdef HAVE_LIBHTTPSEVERYWHERE +#if ENABLE_HTTPS_EVERYWHERE if (!tester->https_everywhere_loaded) { g_assert (tester->https_everywhere_context == NULL); tester->https_everywhere_context = https_everywhere_context_new (); @@ -819,13 +819,13 @@ ephy_uri_tester_set_property (GObject *object, static void ephy_uri_tester_dispose (GObject *object) { -#ifdef HAVE_LIBHTTPSEVERYWHERE +#if ENABLE_HTTPS_EVERYWHERE EphyUriTester *tester = EPHY_URI_TESTER (object); #endif LOG ("EphyUriTester disposing %p", object); -#ifdef HAVE_LIBHTTPSEVERYWHERE +#if ENABLE_HTTPS_EVERYWHERE g_clear_object (&tester->https_everywhere_context); #endif @@ -932,7 +932,7 @@ ephy_uri_tester_load (EphyUriTester *tester) tester->adblock_loaded = TRUE; if (tester->adblock_loaded -#ifdef HAVE_LIBHTTPSEVERYWHERE +#if ENABLE_HTTPS_EVERYWHERE && tester->https_everywhere_loaded #endif ) diff --git a/embed/web-extension/ephy-web-extension.c b/embed/web-extension/ephy-web-extension.c index 913308156..edde1f32b 100644 --- a/embed/web-extension/ephy-web-extension.c +++ b/embed/web-extension/ephy-web-extension.c @@ -109,7 +109,7 @@ static gboolean should_use_https_everywhere (const char *request_uri, const char *redirected_uri) { -#ifdef HAVE_LIBHTTPSEVERYWHERE +#if ENABLE_HTTPS_EVERYWHERE SoupURI *request_soup_uri; SoupURI *redirected_soup_uri; gboolean result = TRUE; diff --git a/embed/web-extension/meson.build b/embed/web-extension/meson.build new file mode 100644 index 000000000..de6be465d --- /dev/null +++ b/embed/web-extension/meson.build @@ -0,0 +1,26 @@ +web_extension_sources = [ + 'ephy-embed-form-auth.c', + 'ephy-uri-tester.c', + 'ephy-web-dom-utils.c', + 'ephy-web-extension.c', + 'ephy-web-extension-main.c', + 'ephy-web-overview.c', + 'ephy-web-overview-model.c' +] + +web_extension_deps = [ + ephymisc_dep, + webkit2gtk_web_extension_dep +] + +if get_option('enable_https_everywhere') + web_extension_deps += httpseverywhere_dep +endif + +shared_module('ephywebextension', + web_extension_sources, + dependencies: web_extension_deps, + install: true, + install_dir: webextensionsdir, + install_rpath: pkglibdir +) diff --git a/git.mk b/git.mk deleted file mode 100644 index d3c0e352f..000000000 --- a/git.mk +++ /dev/null @@ -1,350 +0,0 @@ -# git.mk, a small Makefile to autogenerate .gitignore files -# for autotools-based projects. -# -# Copyright 2009, Red Hat, Inc. -# Copyright 2010,2011,2012,2013 Behdad Esfahbod -# Written by Behdad Esfahbod -# -# Copying and distribution of this file, with or without modification, -# is permitted in any medium without royalty provided the copyright -# notice and this notice are preserved. -# -# The latest version of this file can be downloaded from: -GIT_MK_URL = https://raw.githubusercontent.com/behdad/git.mk/master/git.mk -# -# Bugs, etc, should be reported upstream at: -# https://github.com/behdad/git.mk -# -# To use in your project, import this file in your git repo's toplevel, -# then do "make -f git.mk". This modifies all Makefile.am files in -# your project to -include git.mk. Remember to add that line to new -# Makefile.am files you create in your project, or just rerun the -# "make -f git.mk". -# -# This enables automatic .gitignore generation. If you need to ignore -# more files, add them to the GITIGNOREFILES variable in your Makefile.am. -# But think twice before doing that. If a file has to be in .gitignore, -# chances are very high that it's a generated file and should be in one -# of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES. -# -# The only case that you need to manually add a file to GITIGNOREFILES is -# when remove files in one of mostlyclean-local, clean-local, distclean-local, -# or maintainer-clean-local make targets. -# -# Note that for files like editor backup, etc, there are better places to -# ignore them. See "man gitignore". -# -# If "make maintainer-clean" removes the files but they are not recognized -# by this script (that is, if "git status" shows untracked files still), send -# me the output of "git status" as well as your Makefile.am and Makefile for -# the directories involved and I'll diagnose. -# -# For a list of toplevel files that should be in MAINTAINERCLEANFILES, see -# Makefile.am.sample in the git.mk git repo. -# -# Don't EXTRA_DIST this file. It is supposed to only live in git clones, -# not tarballs. It serves no useful purpose in tarballs and clutters the -# build dir. -# -# This file knows how to handle autoconf, automake, libtool, gtk-doc, -# gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu, appdata, -# appstream. -# -# This makefile provides the following targets: -# -# - all: "make all" will build all gitignore files. -# - gitignore: makes all gitignore files in the current dir and subdirs. -# - .gitignore: make gitignore file for the current dir. -# - gitignore-recurse: makes all gitignore files in the subdirs. -# -# KNOWN ISSUES: -# -# - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the -# submodule doesn't find us. If you have configure.{in,ac} files in -# subdirs, add a proxy git.mk file in those dirs that simply does: -# "include $(top_srcdir)/../git.mk". Add more ..'s to your taste. -# And add those files to git. See vte/gnome-pty-helper/git.mk for -# example. -# - - - -############################################################################### -# Variables user modules may want to add to toplevel MAINTAINERCLEANFILES: -############################################################################### - -# -# Most autotools-using modules should be fine including this variable in their -# toplevel MAINTAINERCLEANFILES: -GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL = \ - $(srcdir)/aclocal.m4 \ - $(srcdir)/autoscan.log \ - $(srcdir)/configure.scan \ - `AUX_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_AUX_DIR:$$1' ./configure.ac); \ - test "x$$AUX_DIR" = "x$(srcdir)/" && AUX_DIR=$(srcdir); \ - for x in \ - ar-lib \ - compile \ - config.guess \ - config.rpath \ - config.sub \ - depcomp \ - install-sh \ - ltmain.sh \ - missing \ - mkinstalldirs \ - test-driver \ - ylwrap \ - ; do echo "$$AUX_DIR/$$x"; done` \ - `cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_HEADERS:$$1' ./configure.ac | \ - head -n 1 | while read f; do echo "$(srcdir)/$$f.in"; done` -# -# All modules should also be fine including the following variable, which -# removes automake-generated Makefile.in files: -GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN = \ - `cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_FILES:$$1' ./configure.ac | \ - while read f; do \ - case $$f in Makefile|*/Makefile) \ - test -f "$(srcdir)/$$f.am" && echo "$(srcdir)/$$f.in";; esac; \ - done` -# -# Modules that use libtool and use AC_CONFIG_MACRO_DIR() may also include this, -# though it's harmless to include regardless. -GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL = \ - `MACRO_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_MACRO_DIR:$$1' ./configure.ac); \ - if test "x$$MACRO_DIR" != "x$(srcdir)/"; then \ - for x in \ - libtool.m4 \ - ltoptions.m4 \ - ltsugar.m4 \ - ltversion.m4 \ - lt~obsolete.m4 \ - ; do echo "$$MACRO_DIR/$$x"; done; \ - fi` - - - -############################################################################### -# Default rule is to install ourselves in all Makefile.am files: -############################################################################### - -git-all: git-mk-install - -git-mk-install: - @echo "Installing git makefile" - @any_failed=; \ - find "`test -z "$(top_srcdir)" && echo . || echo "$(top_srcdir)"`" -name Makefile.am | while read x; do \ - if grep 'include .*/git.mk' $$x >/dev/null; then \ - echo "$$x already includes git.mk"; \ - else \ - failed=; \ - echo "Updating $$x"; \ - { cat $$x; \ - echo ''; \ - echo '-include $$(top_srcdir)/git.mk'; \ - } > $$x.tmp || failed=1; \ - if test x$$failed = x; then \ - mv $$x.tmp $$x || failed=1; \ - fi; \ - if test x$$failed = x; then : else \ - echo "Failed updating $$x"; >&2 \ - any_failed=1; \ - fi; \ - fi; done; test -z "$$any_failed" - -git-mk-update: - wget $(GIT_MK_URL) -O $(top_srcdir)/git.mk - -.PHONY: git-all git-mk-install git-mk-update - - - -############################################################################### -# Actual .gitignore generation: -############################################################################### - -$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk - @echo "git.mk: Generating $@" - @{ \ - if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \ - for x in \ - $(DOC_MODULE)-decl-list.txt \ - $(DOC_MODULE)-decl.txt \ - tmpl/$(DOC_MODULE)-unused.sgml \ - "tmpl/*.bak" \ - $(REPORT_FILES) \ - $(DOC_MODULE).pdf \ - xml html \ - ; do echo "/$$x"; done; \ - FLAVOR=$$(cd $(top_srcdir); $(AUTOCONF) --trace 'GTK_DOC_CHECK:$$2' ./configure.ac); \ - case $$FLAVOR in *no-tmpl*) echo /tmpl;; esac; \ - if echo "$(SCAN_OPTIONS)" | grep -q "\-\-rebuild-types"; then \ - echo "/$(DOC_MODULE).types"; \ - fi; \ - if echo "$(SCAN_OPTIONS)" | grep -q "\-\-rebuild-sections"; then \ - echo "/$(DOC_MODULE)-sections.txt"; \ - fi; \ - if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - for x in \ - $(SETUP_FILES) \ - $(DOC_MODULE).types \ - ; do echo "/$$x"; done; \ - fi; \ - fi; \ - if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \ - for lc in $(DOC_LINGUAS); do \ - for x in \ - $(if $(DOC_MODULE),$(DOC_MODULE).xml) \ - $(DOC_PAGES) \ - $(DOC_INCLUDES) \ - ; do echo "/$$lc/$$x"; done; \ - done; \ - for x in \ - $(_DOC_OMF_ALL) \ - $(_DOC_DSK_ALL) \ - $(_DOC_HTML_ALL) \ - $(_DOC_MOFILES) \ - $(DOC_H_FILE) \ - "*/.xml2po.mo" \ - "*/*.omf.out" \ - ; do echo /$$x; done; \ - fi; \ - if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \ - for lc in $(HELP_LINGUAS); do \ - for x in \ - $(HELP_FILES) \ - "$$lc.stamp" \ - "$$lc.mo" \ - ; do echo "/$$lc/$$x"; done; \ - done; \ - fi; \ - if test "x$(gsettings_SCHEMAS)" = x; then :; else \ - for x in \ - $(gsettings_SCHEMAS:.xml=.valid) \ - $(gsettings__enum_file) \ - ; do echo "/$$x"; done; \ - fi; \ - if test "x$(appdata_XML)" = x; then :; else \ - for x in \ - $(appdata_XML:.xml=.valid) \ - ; do echo "/$$x"; done; \ - fi; \ - if test "x$(appstream_XML)" = x; then :; else \ - for x in \ - $(appstream_XML:.xml=.valid) \ - ; do echo "/$$x"; done; \ - fi; \ - if test -f $(srcdir)/po/Makefile.in.in; then \ - for x in \ - ABOUT-NLS \ - po/Makefile.in.in \ - po/Makefile.in.in~ \ - po/Makefile.in \ - po/Makefile \ - po/Makevars.template \ - po/POTFILES \ - po/Rules-quot \ - po/stamp-it \ - po/stamp-po \ - po/.intltool-merge-cache \ - "po/*.gmo" \ - "po/*.header" \ - "po/*.mo" \ - "po/*.sed" \ - "po/*.sin" \ - po/$(GETTEXT_PACKAGE).pot \ - intltool-extract.in \ - intltool-merge.in \ - intltool-update.in \ - ; do echo "/$$x"; done; \ - fi; \ - if test -f $(srcdir)/configure; then \ - for x in \ - autom4te.cache \ - configure \ - config.h \ - stamp-h1 \ - libtool \ - config.lt \ - ; do echo "/$$x"; done; \ - fi; \ - if test "x$(DEJATOOL)" = x; then :; else \ - for x in \ - $(DEJATOOL) \ - ; do echo "/$$x.sum"; echo "/$$x.log"; done; \ - echo /site.exp; \ - fi; \ - if test "x$(am__dirstamp)" = x; then :; else \ - echo "$(am__dirstamp)"; \ - fi; \ - if test "x$(findstring libtool,$(LTCOMPILE))" = x -a "x$(findstring libtool,$(LTCXXCOMPILE))" = x -a "x$(GTKDOC_RUN)" = x; then :; else \ - for x in \ - "*.lo" \ - ".libs" "_libs" \ - ; do echo "$$x"; done; \ - fi; \ - for x in \ - .gitignore \ - $(GITIGNOREFILES) \ - $(CLEANFILES) \ - $(PROGRAMS) $(check_PROGRAMS) $(EXTRA_PROGRAMS) \ - $(LIBRARIES) $(check_LIBRARIES) $(EXTRA_LIBRARIES) \ - $(LTLIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LTLIBRARIES) \ - so_locations \ - $(MOSTLYCLEANFILES) \ - $(TEST_LOGS) \ - $(TEST_LOGS:.log=.trs) \ - $(TEST_SUITE_LOG) \ - $(TESTS:=.test) \ - "*.gcda" \ - "*.gcno" \ - $(DISTCLEANFILES) \ - $(am__CONFIG_DISTCLEAN_FILES) \ - $(CONFIG_CLEAN_FILES) \ - TAGS ID GTAGS GRTAGS GSYMS GPATH tags \ - "*.tab.c" \ - $(MAINTAINERCLEANFILES) \ - $(BUILT_SOURCES) \ - $(patsubst %.vala,%.c,$(filter %.vala,$(SOURCES))) \ - $(filter %_vala.stamp,$(DIST_COMMON)) \ - $(filter %.vapi,$(DIST_COMMON)) \ - $(filter $(addprefix %,$(notdir $(patsubst %.vapi,%.h,$(filter %.vapi,$(DIST_COMMON))))),$(DIST_COMMON)) \ - Makefile \ - Makefile.in \ - "*.orig" \ - "*.rej" \ - "*.bak" \ - "*~" \ - ".*.sw[nop]" \ - ".dirstamp" \ - ; do echo "/$$x"; done; \ - for x in \ - "*.$(OBJEXT)" \ - $(DEPDIR) \ - ; do echo "$$x"; done; \ - } | \ - sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \ - sed 's@/[.]/@/@g' | \ - LC_ALL=C sort | uniq > $@.tmp && \ - mv $@.tmp $@; - -all: $(srcdir)/.gitignore gitignore-recurse-maybe -gitignore: $(srcdir)/.gitignore gitignore-recurse - -gitignore-recurse-maybe: - @for subdir in $(DIST_SUBDIRS); do \ - case " $(SUBDIRS) " in \ - *" $$subdir "*) :;; \ - *) test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir");; \ - esac; \ - done -gitignore-recurse: - @for subdir in $(DIST_SUBDIRS); do \ - test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir"); \ - done - -maintainer-clean: gitignore-clean -gitignore-clean: - -rm -f $(srcdir)/.gitignore - -.PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe diff --git a/gvdb/Makefile.am b/gvdb/Makefile.am deleted file mode 100644 index eb98bd1f2..000000000 --- a/gvdb/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -AM_CPPFLAGS = \ - $(BUILD_CFLAGS) \ - $(GLIB_CFLAGS) - -noinst_LTLIBRARIES = libgvdb.la - -libgvdb_la_SOURCES = \ - gvdb/gvdb-builder.c \ - gvdb/gvdb-reader.c - -noinst_HEADERS = \ - gvdb/gvdb-builder.h \ - gvdb/gvdb-format.h \ - gvdb/gvdb-reader.h - -libgvdb_la_LIBADD = \ - $(BUILD_LIBS) \ - $(GLIB_LIBS) diff --git a/help/Makefile.am b/help/Makefile.am deleted file mode 100644 index 108d54eca..000000000 --- a/help/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -@YELP_HELP_RULES@ - -HELP_ID = epiphany - -HELP_FILES = \ - index.page \ - introduction.page \ - legal.xml \ - browse-local.page \ - browse-private.page \ - browse-tab.page \ - browse-web.page \ - browse-webapps.page \ - browse-webapps-del.page \ - cert.page \ - cookies.xml \ - data-cookies.page \ - data-passwords.page \ - history.page \ - history-delete.page \ - keyboard-shortcut.page \ - pref.page \ - pref-cookies.page \ - pref-css.page \ - pref-downloads.page \ - pref-do-not-track.page \ - pref-font.page \ - pref-passwords.page \ - prob-restore-closed-page.page \ - proxy.page - -HELP_MEDIA = \ - media/epiphany-3-12.png \ - media/private-browsing-3-12.png \ - media/web-browser.png - -HELP_LINGUAS = cs de el es fr hu ko pt_BR ru sv - --include $(top_srcdir)/git.mk diff --git a/help/meson.build b/help/meson.build new file mode 100644 index 000000000..f3b7800f7 --- /dev/null +++ b/help/meson.build @@ -0,0 +1,52 @@ +help_files = [ + 'index.page', + 'introduction.page', + 'legal.xml', + 'browse-local.page', + 'browse-private.page', + 'browse-tab.page', + 'browse-web.page', + 'browse-webapps.page', + 'browse-webapps-del.page', + 'cert.page', + 'cookies.xml', + 'data-cookies.page', + 'data-passwords.page', + 'history.page', + 'history-delete.page', + 'keyboard-shortcut.page', + 'pref.page', + 'pref-cookies.page', + 'pref-css.page', + 'pref-downloads.page', + 'pref-do-not-track.page', + 'pref-font.page', + 'pref-passwords.page', + 'prob-restore-closed-page.page', + 'proxy.page' +] + +help_media = [ + 'media/epiphany-3-12.png', + 'media/private-browsing-3-12.png', + 'media/web-browser.png' +] + +help_linguas = [ + 'cs', + 'de', + 'el', + 'es', + 'fr', + 'hu', + 'ko', + 'pt_BR', + 'ru', + 'sv' +] + +gnome.yelp(meson.project_name(), + sources: help_files, + media: help_media, + languages: help_linguas, +) diff --git a/lib/Makefile.am b/lib/Makefile.am deleted file mode 100644 index bd2767f29..000000000 --- a/lib/Makefile.am +++ /dev/null @@ -1,161 +0,0 @@ -SUBDIRS = widgets egg history - -pkglib_LTLIBRARIES = libephymisc.la - -TYPES_H_FILES = \ - ephy-security-levels.h \ - ephy-sqlite-connection.h - -libephymisc_la_SOURCES = \ - ephy-dbus-names.h \ - ephy-dbus-util.c \ - ephy-dbus-util.h \ - ephy-debug.c \ - ephy-debug.h \ - ephy-dnd.c \ - ephy-dnd.h \ - ephy-favicon-helpers.c \ - ephy-favicon-helpers.h \ - ephy-file-helpers.c \ - ephy-file-helpers.h \ - ephy-filters-manager.c \ - ephy-filters-manager.h \ - ephy-form-auth-data.c \ - ephy-form-auth-data.h \ - ephy-gui.c \ - ephy-gui.h \ - ephy-langs.c \ - ephy-langs.h \ - ephy-permissions-manager.c \ - ephy-permissions-manager.h \ - ephy-prefs.h \ - ephy-profile-utils.c \ - ephy-profile-utils.h \ - ephy-search-engine-manager.c \ - ephy-search-engine-manager.h \ - ephy-security-levels.c \ - ephy-security-levels.h \ - ephy-settings.c \ - ephy-settings.h \ - ephy-signal-accumulator.c \ - ephy-signal-accumulator.h \ - ephy-smaps.c \ - ephy-smaps.h \ - ephy-snapshot-service.c \ - ephy-snapshot-service.h \ - ephy-sqlite.h \ - ephy-sqlite-connection.c \ - ephy-sqlite-connection.h \ - ephy-sqlite-statement.c \ - ephy-sqlite-statement.h \ - ephy-string.c \ - ephy-string.h \ - ephy-time-helpers.c \ - ephy-time-helpers.h \ - ephy-uri-helpers.c \ - ephy-uri-helpers.h \ - ephy-uri-tester-shared.c \ - ephy-uri-tester-shared.h \ - ephy-web-app-utils.c \ - ephy-web-app-utils.h \ - ephy-zoom.c \ - ephy-zoom.h - -nodist_libephymisc_la_SOURCES = \ - $(BUILT_SOURCES) - -libephymisc_la_CPPFLAGS = \ - -DABS_TOP_BUILD_DIR=\"$(abs_top_builddir)\" \ - -DLOCALEDIR=\"$(localedir)\" \ - -DPKGDATADIR=\"$(pkgdatadir)\" \ - -DPKGLIBEXECDIR=\"$(pkglibexecdir)\" \ - -DTOP_SRC_DATADIR=\"$(top_srcdir)/data\" \ - -I$(top_builddir)/lib \ - -I$(top_srcdir)/lib/egg \ - $(CAIRO_CFLAGS) \ - $(GDK_PIXBUF_CFLAGS) \ - $(GDK_X11_CFLAGS) \ - $(GIO_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(GNOME_DESKTOP_CFLAGS) \ - $(GTK_CFLAGS) \ - $(ICU_UC_CFLAGS) \ - $(LIBSECRET_CFLAGS) \ - $(LIBSOUP_CFLAGS) \ - $(LIBXML_CFLAGS) \ - $(SQLITE3_CFLAGS) \ - $(WEBKIT2GTK_CFLAGS) - -libephymisc_la_CFLAGS = \ - $(WARN_CFLAGS) - -libephymisc_la_LDFLAGS = \ - $(WARN_LDFLAGS) -avoid-version -no-undefined - -libephymisc_la_LIBADD = \ - $(top_builddir)/lib/history/libephyhistory.la \ - $(CAIRO_LIBS) \ - $(GDK_PIXBUF_LIBS) \ - $(GDK_X11_LIBS) \ - $(GIO_LIBS) \ - $(GLIB_LIBS) \ - $(GNOME_DESKTOP_LIBS) \ - $(GTK_LIBS) \ - $(ICU_UC_LIBS) \ - $(LIBSECRET_LIBS) \ - $(LIBSOUP_LIBS) \ - $(LIBXML_LIBS) \ - $(LIBM) \ - $(SQLITE3_LIBS) \ - $(WEBKIT2GTK_LIBS) - -BUILT_SOURCES = \ - ephy-lib-type-builtins.c \ - ephy-lib-type-builtins.h - -CLEANFILES = $(stamp_files) $(BUILT_SOURCES) - -stamp_files = \ - stamp-ephy-lib-type-builtins.c \ - stamp-ephy-lib-type-builtins.h - -ephy-lib-type-builtins.c: stamp-ephy-lib-type-builtins.c Makefile - @true -stamp-ephy-lib-type-builtins.c: Makefile $(TYPES_H_FILES) - $(AM_V_GEN) $(GLIB_MKENUMS) \ - --fhead "#include <config.h>\n\n" \ - --fhead "#include \"ephy-lib-type-builtins.h\"\n\n" \ - --fprod "\n/* enumerations from \"@filename@\" */" \ - --fprod "\n#include \"@filename@\"" \ - --vhead "GType\n@enum_name@_get_type (void)\n{\n" \ - --vhead " static GType type = 0;\n\n" \ - --vhead " if (G_UNLIKELY (type == 0))\n {\n" \ - --vhead " static const G@Type@Value _@enum_name@_values[] = {" \ - --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ - --vtail " { 0, NULL, NULL }\n };\n\n" \ - --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n }\n\n" \ - --vtail " return type;\n}\n\n" \ - $(filter-out $<,$^) > xgen-$(@F) \ - && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \ - && rm -f xgen-$(@F) \ - && echo timestamp > $(@F) - -ephy-lib-type-builtins.h: stamp-ephy-lib-type-builtins.h Makefile - @true -stamp-ephy-lib-type-builtins.h: Makefile $(TYPES_H_FILES) - $(AM_V_GEN) $(GLIB_MKENUMS) \ - --fhead "#ifndef EPHY_LIB_TYPE_BUILTINS_H\n" \ - --fhead "#define EPHY_LIB_TYPE_BUILTINS_H 1\n\n" \ - --fhead "#include <glib-object.h>\n\n" \ - --fhead "G_BEGIN_DECLS\n\n" \ - --ftail "G_END_DECLS\n\n" \ - --ftail "#endif /* EPHY_LIB_TYPE_BUILTINS_H */\n" \ - --fprod "\n/* --- @filename@ --- */" \ - --eprod "#define EPHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \ - --eprod "GType @enum_name@_get_type (void);\n" \ - $(filter-out $<,$^) > xgen-$(@F) \ - && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \ - && rm -f xgen-$(@F) \ - && echo timestamp > $(@F) - --include $(top_srcdir)/git.mk diff --git a/lib/egg/Makefile.am b/lib/egg/Makefile.am deleted file mode 100644 index f56b24e76..000000000 --- a/lib/egg/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -noinst_LTLIBRARIES = libegg.la - -libegg_la_SOURCES = \ - eggtreemultidnd.c \ - eggtreemultidnd.h - -libegg_la_CPPFLAGS = \ - -DG_LOG_DOMAIN=\""Egg"\" \ - $(GTK_CFLAGS) - -libegg_la_LIBADD = $(GTK_LIBS) - --include $(top_srcdir)/git.mk diff --git a/lib/ephy-lib-type-builtins.c.in b/lib/ephy-lib-type-builtins.c.in new file mode 100644 index 000000000..83532e8e4 --- /dev/null +++ b/lib/ephy-lib-type-builtins.c.in @@ -0,0 +1,42 @@ +/*** BEGIN file-header ***/ + +#include <config.h> +#include "ephy-lib-type-builtins.h" + +/*** END file-header ***/ +/*** BEGIN file-production ***/ + +/* enumerations from "@basename@" */ +#include "@basename@" + +/*** END file-production ***/ + +/*** BEGIN value-header ***/ +GType +@enum_name@_get_type(void) { + static volatile gsize g_define_type_id__volatile = 0; + + if(g_once_init_enter(&g_define_type_id__volatile)) { + static const G@Type@Value values [] = { +/*** END value-header ***/ + +/*** BEGIN value-production ***/ + { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, +/*** END value-production ***/ + +/*** BEGIN value-tail ***/ + { 0, NULL, NULL } + }; + + GType g_define_type_id = + g_@type@_register_static(g_intern_static_string("@EnumName@"), values); + g_once_init_leave(&g_define_type_id__volatile, g_define_type_id); + } + + return g_define_type_id__volatile; +} + +/*** END value-tail ***/ + +/*** BEGIN file-tail ***/ +/*** END file-tail ***/ diff --git a/lib/ephy-lib-type-builtins.h.in b/lib/ephy-lib-type-builtins.h.in new file mode 100644 index 000000000..f36794564 --- /dev/null +++ b/lib/ephy-lib-type-builtins.h.in @@ -0,0 +1,22 @@ +/*** BEGIN file-header ***/ +#pragma once + +#include <glib-object.h> + +G_BEGIN_DECLS +/*** END file-header ***/ + +/*** BEGIN file-production ***/ + +/* enumerations from "@basename@" */ +/*** END file-production ***/ +/*** BEGIN value-header ***/ +GType @enum_name@_get_type (void) G_GNUC_CONST; +#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) +/*** END value-header ***/ + +/*** BEGIN file-tail ***/ + +G_END_DECLS + +/*** END file-tail ***/ diff --git a/lib/ephy-profile-utils.c b/lib/ephy-profile-utils.c index b6c5020b2..9bfd848c1 100644 --- a/lib/ephy-profile-utils.c +++ b/lib/ephy-profile-utils.c @@ -136,7 +136,7 @@ ephy_profile_utils_do_migration (const char *profile_directory, int test_to_run, argv[i++] = NULL; if (debug) - argv[0] = ABS_TOP_BUILD_DIR "/lib/"EPHY_PROFILE_MIGRATOR; + argv[0] = BUILD_ROOT "/src/" EPHY_PROFILE_MIGRATOR; ret = g_spawn_sync (NULL, (char **)argv, envp, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL, @@ -146,7 +146,7 @@ ephy_profile_utils_do_migration (const char *profile_directory, int test_to_run, g_strfreev (envp); if (error) { - LOG ("Failed to run migrator: %s", error->message); + g_warning ("Failed to run migrator: %s", error->message); g_error_free (error); } diff --git a/lib/history/Makefile.am b/lib/history/Makefile.am deleted file mode 100644 index ef0dce074..000000000 --- a/lib/history/Makefile.am +++ /dev/null @@ -1,87 +0,0 @@ -noinst_LTLIBRARIES = libephyhistory.la - -libephyhistory_la_SOURCES = \ - ephy-history-service.c \ - ephy-history-service.h \ - ephy-history-service-hosts-table.c \ - ephy-history-service-private.h \ - ephy-history-service-urls-table.c \ - ephy-history-service-visits-table.c \ - ephy-history-types.c \ - ephy-history-types.h - -nodist_libephyhistory_la_SOURCES = \ - $(BUILT_SOURCES) - -libephyhistory_la_CFLAGS = \ - $(WARN_CFLAGS) - -libephyhistory_la_CPPFLAGS = \ - -I$(top_builddir)/lib \ - -I$(top_builddir)/lib/history \ - -I$(top_srcdir)/lib \ - $(GLIB_CFLAGS) \ - $(GIO_CFLAGS) - -libephyhistory_la_LDFLAGS = \ - $(WARN_LDFLAGS) - -libephyhistory_la_LIBADD = \ - $(GLIB_LIBS) \ - $(GIO_LIBS) - -TYPES_H_FILES = \ - ephy-history-types.h - -BUILT_SOURCES = \ - ephy-history-type-builtins.c \ - ephy-history-type-builtins.h - -CLEANFILES = $(stamp_files) $(BUILT_SOURCES) - -stamp_files = \ - stamp-ephy-history-type-builtins.c \ - stamp-ephy-history-type-builtins.h - -ephy-history-type-builtins.c: stamp-ephy-history-type-builtins.c Makefile - @true - -stamp-ephy-history-type-builtins.c: Makefile $(TYPES_H_FILES) - $(AM_V_GEN) $(GLIB_MKENUMS) \ - --fhead "#include <config.h>\n\n" \ - --fhead "#include \"ephy-history-type-builtins.h\"\n\n" \ - --fprod "\n/* enumerations from \"@filename@\" */" \ - --fprod "\n#include \"@filename@\"" \ - --vhead "GType\n@enum_name@_get_type (void)\n{\n" \ - --vhead " static GType type = 0;\n\n" \ - --vhead " if (G_UNLIKELY (type == 0))\n {\n" \ - --vhead " static const G@Type@Value _@enum_name@_values[] = {" \ - --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ - --vtail " { 0, NULL, NULL }\n };\n\n" \ - --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n }\n\n" \ - --vtail " return type;\n}\n\n" \ - $(filter-out $<,$^) > xgen-$(@F) \ - && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \ - && rm -f xgen-$(@F) \ - && echo timestamp > $(@F) - -ephy-history-type-builtins.h: stamp-ephy-history-type-builtins.h Makefile - @true - -stamp-ephy-history-type-builtins.h: Makefile $(TYPES_H_FILES) - $(AM_V_GEN) $(GLIB_MKENUMS) \ - --fhead "#ifndef EPHY_HISTORY_TYPE_BUILTINS_H\n" \ - --fhead "#define EPHY_HISTORY_TYPE_BUILTINS_H 1\n\n" \ - --fhead "#include <glib-object.h>\n\n" \ - --fhead "G_BEGIN_DECLS\n\n" \ - --ftail "G_END_DECLS\n\n" \ - --ftail "#endif /* EPHY_HISTORY_TYPE_BUILTINS_H */\n" \ - --fprod "\n/* --- @filename@ --- */" \ - --eprod "#define EPHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \ - --eprod "GType @enum_name@_get_type (void);\n" \ - $(filter-out $<,$^) > xgen-$(@F) \ - && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \ - && rm -f xgen-$(@F) \ - && echo timestamp > $(@F) - --include $(top_srcdir)/git.mk diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c index ca003fe22..57eff46ac 100644 --- a/lib/history/ephy-history-service.c +++ b/lib/history/ephy-history-service.c @@ -23,7 +23,7 @@ #include "ephy-history-service-private.h" #include "ephy-history-types.h" -#include "ephy-history-type-builtins.h" +#include "ephy-lib-type-builtins.h" #include "ephy-sqlite-connection.h" #include <errno.h> diff --git a/lib/meson.build b/lib/meson.build new file mode 100644 index 000000000..3fdf0a5ad --- /dev/null +++ b/lib/meson.build @@ -0,0 +1,86 @@ +types_headers = [ + 'ephy-security-levels.h', + 'ephy-sqlite-connection.h', + 'history/ephy-history-types.h' +] + +enums = gnome.mkenums('ephy-lib', + sources: types_headers, + h_template: 'ephy-lib-type-builtins.h.in', + c_template: 'ephy-lib-type-builtins.c.in' +) + +libephymisc_sources = [ + 'egg/eggtreemultidnd.c', + 'ephy-dbus-util.c', + 'ephy-debug.c', + 'ephy-dnd.c', + 'ephy-favicon-helpers.c', + 'ephy-file-helpers.c', + 'ephy-filters-manager.c', + 'ephy-form-auth-data.c', + 'ephy-gui.c', + 'ephy-langs.c', + 'ephy-permissions-manager.c', + 'ephy-profile-utils.c', + 'ephy-search-engine-manager.c', + 'ephy-security-levels.c', + 'ephy-settings.c', + 'ephy-signal-accumulator.c', + 'ephy-smaps.c', + 'ephy-snapshot-service.c', + 'ephy-sqlite-connection.c', + 'ephy-sqlite-statement.c', + 'ephy-string.c', + 'ephy-time-helpers.c', + 'ephy-uri-helpers.c', + 'ephy-uri-tester-shared.c', + 'ephy-web-app-utils.c', + 'ephy-zoom.c', + 'history/ephy-history-service.c', + 'history/ephy-history-service-hosts-table.c', + 'history/ephy-history-service-urls-table.c', + 'history/ephy-history-service-visits-table.c', + 'history/ephy-history-types.c', + enums +] + +libephymisc_deps = [ + cairo_dep, + gdk_pixbuf_dep, + gio_dep, + gio_unix_dep, + glib_dep, + gnome_desktop_dep, + gtk_dep, + icu_uc_dep, + libsecret_dep, + libsoup_dep, + libxml_dep, + m_dep, + sqlite3_dep, + webkit2gtk_dep +] + +libephymisc_includes = include_directories( + '.', + '..', + 'egg', + 'history' +) + +libephymisc = shared_library('ephymisc', + libephymisc_sources, + dependencies: libephymisc_deps, + include_directories: libephymisc_includes, + install: true, + install_dir: pkglibdir +) + +ephymisc_dep = declare_dependency( + link_with: libephymisc, + include_directories: libephymisc_includes, + dependencies: libephymisc_deps +) + +subdir('widgets') diff --git a/lib/widgets/Makefile.am b/lib/widgets/Makefile.am deleted file mode 100644 index 869b1f323..000000000 --- a/lib/widgets/Makefile.am +++ /dev/null @@ -1,120 +0,0 @@ -noinst_LTLIBRARIES = libephywidgets.la - -BUILT_SOURCES = \ - ephy-widgets-type-builtins.c \ - ephy-widgets-type-builtins.h - -TYPES_H_FILES = \ - ephy-location-entry.h - -CLEANFILES = $(stamp_files) $(BUILT_SOURCES) - -stamp_files = \ - stamp-ephy-widgets-type-builtins.c \ - stamp-ephy-widgets-type-builtins.h - -ephy-widgets-type-builtins.c: stamp-ephy-widgets-type-builtins.c Makefile - @true - -stamp-ephy-widgets-type-builtins.c: Makefile $(TYPES_H_FILES) - $(AM_V_GEN) $(GLIB_MKENUMS) \ - --fhead "#include <config.h>\n\n" \ - --fhead "#include \"ephy-widgets-type-builtins.h\"\n\n" \ - --fprod "\n/* enumerations from \"@filename@\" */" \ - --fprod "\n#include \"@filename@\"" \ - --vhead "GType\n@enum_name@_get_type (void)\n{\n" \ - --vhead " static GType type = 0;\n\n" \ - --vhead " if (G_UNLIKELY (type == 0))\n {\n" \ - --vhead " static const G@Type@Value _@enum_name@_values[] = {" \ - --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ - --vtail " { 0, NULL, NULL }\n };\n\n" \ - --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n }\n\n" \ - --vtail " return type;\n}\n\n" \ - $(filter-out $<,$^) > xgen-$(@F) \ - && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \ - && rm -f xgen-$(@F) \ - && echo timestamp > $(@F) - -ephy-widgets-type-builtins.h: stamp-ephy-widgets-type-builtins.h Makefile - @true - -stamp-ephy-widgets-type-builtins.h: Makefile $(TYPES_H_FILES) - $(AM_V_GEN) $(GLIB_MKENUMS) \ - --fhead "#ifndef EPHY_WIDGETS_TYPE_BUILTINS_H\n" \ - --fhead "#define EPHY_WIDGETS_TYPE_BUILTINS_H 1\n\n" \ - --fhead "#include <glib-object.h>\n\n" \ - --fhead "G_BEGIN_DECLS\n\n" \ - --ftail "G_END_DECLS\n\n" \ - --ftail "#endif /* EPHY_WIDGETS_TYPE_BUILTINS_H */\n" \ - --fprod "\n/* --- @filename@ --- */" \ - --eprod "#define EPHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \ - --eprod "GType @enum_name@_get_type (void);\n" \ - $(filter-out $<,$^) > xgen-$(@F) \ - && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \ - && rm -f xgen-$(@F) \ - && echo timestamp > $(@F) - -nodist_libephywidgets_la_SOURCES = \ - $(BUILT_SOURCES) - -libephywidgets_la_SOURCES = \ - ephy-certificate-dialog.c \ - ephy-certificate-dialog.h \ - ephy-downloads-popover.h \ - ephy-downloads-popover.c \ - ephy-downloads-progress-icon.h \ - ephy-downloads-progress-icon.c \ - ephy-download-widget.c \ - ephy-download-widget.h \ - ephy-file-chooser.c \ - ephy-file-chooser.h \ - ephy-location-entry.c \ - ephy-location-entry.h \ - ephy-middle-clickable-button.c \ - ephy-middle-clickable-button.h \ - ephy-notification.c \ - ephy-notification.h \ - ephy-security-popover.c \ - ephy-security-popover.h \ - ephy-title-box.c \ - ephy-title-box.h \ - ephy-title-widget.c \ - ephy-title-widget.h \ - nautilus-floating-bar.c \ - nautilus-floating-bar.h - -libephywidgets_la_CFLAGS = \ - $(WARN_CFLAGS) - -libephywidgets_la_CPPFLAGS = \ - -I$(top_builddir)/lib \ - -I$(top_builddir)/lib/widgets \ - -I$(top_srcdir)/embed \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/lib/egg \ - -I$(top_srcdir)/lib/history \ - -I$(top_srcdir)/libgd \ - $(GCR_CFLAGS) \ - $(GDK_CFLAGS) \ - $(GDK_PIXBUF_CFLAGS) \ - $(GIO_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(GTK_CFLAGS) \ - $(LIBSOUP_CFLAGS) \ - $(WEBKIT2GTK_CFLAGS) - -libephywidgets_la_LDFLAGS = \ - $(WARN_LDFLAGS) - -libephywidgets_la_LIBADD = \ - $(top_builddir)/libgd/libgd.la \ - $(GCR_LIBS) \ - $(GDK_LIBS) \ - $(GDK_PIXBUF_LIBS) \ - $(GIO_LIBS) \ - $(GLIB_LIBS) \ - $(GTK_LIBS) \ - $(LIBSOUP_LIBS) \ - $(WEBKIT2GTK_LIBS) - --include $(top_srcdir)/git.mk diff --git a/lib/widgets/ephy-widgets-type-builtins.c.in b/lib/widgets/ephy-widgets-type-builtins.c.in new file mode 100644 index 000000000..5d06fd888 --- /dev/null +++ b/lib/widgets/ephy-widgets-type-builtins.c.in @@ -0,0 +1,42 @@ +/*** BEGIN file-header ***/ + +#include <config.h> +#include "ephy-widgets-type-builtins.h" + +/*** END file-header ***/ +/*** BEGIN file-production ***/ + +/* enumerations from "@basename@" */ +#include "@basename@" + +/*** END file-production ***/ + +/*** BEGIN value-header ***/ +GType +@enum_name@_get_type(void) { + static volatile gsize g_define_type_id__volatile = 0; + + if(g_once_init_enter(&g_define_type_id__volatile)) { + static const G@Type@Value values [] = { +/*** END value-header ***/ + +/*** BEGIN value-production ***/ + { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, +/*** END value-production ***/ + +/*** BEGIN value-tail ***/ + { 0, NULL, NULL } + }; + + GType g_define_type_id = + g_@type@_register_static(g_intern_static_string("@EnumName@"), values); + g_once_init_leave(&g_define_type_id__volatile, g_define_type_id); + } + + return g_define_type_id__volatile; +} + +/*** END value-tail ***/ + +/*** BEGIN file-tail ***/ +/*** END file-tail ***/ diff --git a/lib/widgets/ephy-widgets-type-builtins.h.in b/lib/widgets/ephy-widgets-type-builtins.h.in new file mode 100644 index 000000000..f36794564 --- /dev/null +++ b/lib/widgets/ephy-widgets-type-builtins.h.in @@ -0,0 +1,22 @@ +/*** BEGIN file-header ***/ +#pragma once + +#include <glib-object.h> + +G_BEGIN_DECLS +/*** END file-header ***/ + +/*** BEGIN file-production ***/ + +/* enumerations from "@basename@" */ +/*** END file-production ***/ +/*** BEGIN value-header ***/ +GType @enum_name@_get_type (void) G_GNUC_CONST; +#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) +/*** END value-header ***/ + +/*** BEGIN file-tail ***/ + +G_END_DECLS + +/*** END file-tail ***/ diff --git a/lib/widgets/meson.build b/lib/widgets/meson.build new file mode 100644 index 000000000..2de9d3d7e --- /dev/null +++ b/lib/widgets/meson.build @@ -0,0 +1,58 @@ +types_headers = [ + 'ephy-location-entry.h' +] + +enums = gnome.mkenums('ephy-widgets', + sources: types_headers, + h_template: 'ephy-widgets-type-builtins.h.in', + c_template: 'ephy-widgets-type-builtins.c.in' +) + +libephywidgets_sources = [ + 'ephy-certificate-dialog.c', + 'ephy-downloads-popover.c', + 'ephy-downloads-progress-icon.c', + 'ephy-download-widget.c', + 'ephy-file-chooser.c', + 'ephy-location-entry.c', + 'ephy-middle-clickable-button.c', + 'ephy-notification.c', + 'ephy-security-popover.c', + 'ephy-title-box.c', + 'ephy-title-widget.c', + 'nautilus-floating-bar.c', + enums +] + +libephywidgets_deps = [ + gcr_dep, + gdk_dep, + gdk_pixbuf_dep, + gio_dep, + glib_dep, + gtk_dep, + libgd_dep, + libsoup_dep, + webkit2gtk_dep +] + +libephywidgets_includes = include_directories( + '.', + '..', + '../egg', + '../history', + '../..', + '../../embed' +) + +libephywidgets = static_library('ephywidgets', + libephywidgets_sources, + dependencies: libephywidgets_deps, + include_directories: libephywidgets_includes, +) + +ephywidgets_dep = declare_dependency( + link_with: libephywidgets, + include_directories: libephywidgets_includes, + dependencies: libephywidgets_deps +) diff --git a/libgd b/libgd deleted file mode 160000 -Subproject 1f2e07409cf085b74370f8a985de849d0f6d4b5 diff --git a/make_release.sh b/make_release.sh new file mode 100755 index 000000000..67a99c2a0 --- /dev/null +++ b/make_release.sh @@ -0,0 +1,31 @@ +#!/bin/sh +test -n "$srcdir" || srcdir=$1 +test -n "$srcdir" || srcdir=. + +cd $srcdir + +VERSION=$(git describe --abbrev=0) +NAME="epiphany-$VERSION" + +echo "Updating submodules…" +git submodule update --init + +echo "Creating git tree archive…" +git archive --prefix="${NAME}/" --format=tar HEAD > epiphany.tar + +pushd subprojects/libgd + +git archive --prefix="${NAME}/subprojects/libgd/" --format=tar HEAD > libgd.tar + +popd + +rm -f "${NAME}.tar" + +tar -Af "${NAME}.tar" epiphany.tar +tar -Af "${NAME}.tar" subprojects/libgd/libgd.tar + +rm -f epiphany.tar +rm -f subprojects/libgd/libgd.tar + +echo "Compressing archive…" +xz -f "${NAME}.tar" diff --git a/meson.build b/meson.build new file mode 100644 index 000000000..0bbabd1b8 --- /dev/null +++ b/meson.build @@ -0,0 +1,104 @@ +project('epiphany', 'c', + license: 'GPL3+', + version: '3.24.1', + meson_version: '>= 0.40.0', + default_options: ['c_std=gnu11'] +) + +gnome = import('gnome') +i18n = import('i18n') + +prefix = get_option('prefix') +datadir = join_paths(prefix, get_option('datadir')) +libdir = join_paths(prefix, get_option('libdir')) +libexecdir = join_paths(prefix, get_option('libexecdir')) +localedir = join_paths(prefix, get_option('localedir')) +pkgdatadir = join_paths(datadir, 'epiphany') +pkglibdir = join_paths(libdir, 'epiphany') +pkglibexecdir = join_paths(libexecdir, 'epiphany') +webextensionsdir = join_paths(pkglibdir, 'web-extensions') + +iso_codes = dependency('iso-codes') +iso_codes_prefix = iso_codes.get_pkgconfig_variable('prefix') + +conf = configuration_data() +conf.set_quoted('BUILD_ROOT', meson.build_root()) +conf.set_quoted('DISTRIBUTOR_NAME', get_option('distributor_name')) +conf.set_quoted('EPHY_WEB_EXTENSIONS_DIR', webextensionsdir) +conf.set_quoted('GETTEXT_PACKAGE', meson.project_name()) +conf.set_quoted('ISO_CODES_PREFIX', iso_codes_prefix) +conf.set_quoted('LOCALEDIR', localedir) +conf.set_quoted('PKGDATADIR', pkgdatadir) +conf.set_quoted('PKGLIBEXECDIR', pkglibexecdir) +conf.set_quoted('SOURCE_ROOT', meson.source_root()) +conf.set_quoted('VERSION', meson.project_version()) + +conf.set10('ENABLE_NLS', true) +conf.set10('ENABLE_FIREFOX_SYNC', get_option('enable_firefox_sync')) +conf.set10('ENABLE_HTTPS_EVERYWHERE', get_option('enable_https_everywhere')) + +configure_file( + output: 'config.h', + configuration: conf +) + +gvdb = subproject('gvdb') +gvdb_dep = gvdb.get_variable('gvdb_dep') + +libgd = subproject('libgd', + default_options: [ + 'with-main-view=true', + 'with-notification=true' + ] +) +libgd_dep = libgd.get_variable('libgd_dep') + +glib_requirement = '>= 2.46.0' +gtk_requirement = '>= 3.22.0' +webkitgtk_requirement = '>= 2.16.0' + +cairo_dep = dependency('cairo', version: '>= 1.2') +gcr_dep = dependency('gcr-3', version: '>= 3.5.5') +gdk_dep = dependency('gdk-3.0', version: gtk_requirement) +gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: '>= 2.36.5') +gio_dep = dependency('gio-2.0', version: glib_requirement) +gio_unix_dep = dependency('gio-unix-2.0', version: glib_requirement) +glib_dep = dependency('glib-2.0', version: glib_requirement) +gnome_desktop_dep = dependency('gnome-desktop-3.0', version: '>= 2.91.2') +gtk_dep = dependency('gtk+-3.0', version: gtk_requirement) +gtk_unix_print_dep = dependency('gtk+-unix-print-3.0', version: gtk_requirement) +icu_uc_dep = dependency('icu-uc', version: '>= 4.6') +iso_codes_dep = dependency('iso-codes', version: '>= 0.35') +json_glib_dep = dependency('json-glib-1.0', version: '>= 1.2.0') +libnotify_dep = dependency('libnotify', version: '>= 0.5.1') +libsecret_dep = dependency('libsecret-1', version: '>= 0.14') +libsoup_dep = dependency('libsoup-2.4', version: '>= 2.48.0') +libxml_dep = dependency('libxml-2.0', version: '>= 2.6.12') +libxslt_dep = dependency('libxslt', version: '>= 1.1.7') +sqlite3_dep = dependency('sqlite3', version: '>= 3.0') +webkit2gtk_dep = dependency('webkit2gtk-4.0', version: webkitgtk_requirement) +webkit2gtk_web_extension_dep = dependency('webkit2gtk-web-extension-4.0', version: webkitgtk_requirement) + +cc = meson.get_compiler('c') +m_dep = cc.find_library('m', required: false) + +if get_option('enable_firefox_sync') + nettle_requirement = '>= 3.2' + hogweed_dep = dependency('hogweed', version: nettle_requirement) + nettle_dep = dependency('nettle', version: nettle_requirement) + gmp_dep = cc.find_library('gmp') +endif + +if get_option('enable_https_everywhere') + httpseverywhere_dep = dependency('httpseverywhere-0.2', version: '>= 0.2.2') +endif + +subdir('data') +subdir('help') +subdir('po') +subdir('lib') +subdir('embed') +subdir('src') +subdir('tests') + +meson.add_install_script('post_install.py') diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 000000000..82406ad14 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,23 @@ +option('distributor_name', + type: 'string', + value: 'GNOME Web', + description: 'Distributor name displayed on process crash page' +) + +option('enable_firefox_sync', + type: 'boolean', + value: false, + description: 'Enable experimental Firefox Sync support' +) + +option('enable_https_everywhere', + type: 'boolean', + value: false, + description: 'Enable experimental HTTPS Everywhere support' +) + +option('enable_unit_tests', + type: 'boolean', + value: true, + description: 'Enable unit tests' +) diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 000000000..e9b77d79b --- /dev/null +++ b/po/meson.build @@ -0,0 +1 @@ +i18n.gettext(meson.project_name(), preset: 'glib') diff --git a/post_install.py b/post_install.py new file mode 100644 index 000000000..c1faf093b --- /dev/null +++ b/post_install.py @@ -0,0 +1,19 @@ +#!/usr/bin/python3 + +import os +import pathlib +import subprocess + +prefix = pathlib.Path(os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')) +datadir = prefix / 'share' +destdir = os.environ.get('DESTDIR', '') + +if not destdir: + print('Compiling gsettings schemas...') + subprocess.call(['glib-compile-schemas', str(datadir / 'glib-2.0' / 'schemas')]) + + print('Updating icon cache...') + subprocess.call(['gtk-update-icon-cache', '-qtf', str(datadir / 'icons' / 'hicolor')]) + + print('Updating desktop database...') + subprocess.call(['update-desktop-database', '-q', str(datadir / 'applications')]) diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index aab514a85..000000000 --- a/src/Makefile.am +++ /dev/null @@ -1,284 +0,0 @@ -SUBDIRS = . search-provider profile-migrator - -pkglib_LTLIBRARIES = libephymain.la - -bin_PROGRAMS = epiphany - -dist_noinst_DATA = \ - resources/epiphany.gresource.xml \ - $(RESOURCE_FILES) - -TYPES_H_FILES = \ - bookmarks/ephy-bookmark-properties-grid.h \ - ephy-link.h \ - ephy-session.h \ - ephy-shell.h \ - ephy-window.h - -libephymain_la_SOURCES = \ - clear-data-dialog.c \ - clear-data-dialog.h \ - cookies-dialog.c \ - cookies-dialog.h \ - ephy-action-helper.c \ - ephy-action-helper.h \ - bookmarks/ephy-add-bookmark-popover.c \ - bookmarks/ephy-add-bookmark-popover.h \ - bookmarks/ephy-bookmark.c \ - bookmarks/ephy-bookmark.h \ - bookmarks/ephy-bookmark-properties-grid.c \ - bookmarks/ephy-bookmark-properties-grid.h \ - bookmarks/ephy-bookmark-row.c \ - bookmarks/ephy-bookmark-row.h \ - bookmarks/ephy-bookmarks-export.c \ - bookmarks/ephy-bookmarks-export.h \ - bookmarks/ephy-bookmarks-import.c \ - bookmarks/ephy-bookmarks-import.h \ - bookmarks/ephy-bookmarks-manager.c \ - bookmarks/ephy-bookmarks-manager.h \ - bookmarks/ephy-bookmarks-popover.c \ - bookmarks/ephy-bookmarks-popover.h \ - ephy-completion-model.c \ - ephy-completion-model.h \ - ephy-encoding-dialog.c \ - ephy-encoding-dialog.h \ - ephy-encoding-row.c \ - ephy-encoding-row.h \ - ephy-header-bar.c \ - ephy-header-bar.h \ - ephy-history-dialog.c \ - ephy-history-dialog.h \ - ephy-link.c \ - ephy-link.h \ - ephy-location-controller.c \ - ephy-location-controller.h \ - ephy-lockdown.c \ - ephy-lockdown.h \ - ephy-notebook.c \ - ephy-notebook.h \ - ephy-search-engine-dialog.c \ - ephy-search-engine-dialog.h \ - ephy-session.c \ - ephy-session.h \ - ephy-shell.c \ - ephy-shell.h \ - ephy-window.c \ - ephy-window.h \ - languages.h \ - passwords-dialog.c \ - passwords-dialog.h \ - popup-commands.c \ - popup-commands.h \ - prefs-dialog.c \ - prefs-dialog.h \ - window-commands.c \ - window-commands.h - -if ENABLE_SYNC -libephymain_la_SOURCES += \ - sync/ephy-sync-crypto.c \ - sync/ephy-sync-crypto.h \ - sync/ephy-sync-secret.c \ - sync/ephy-sync-secret.h \ - sync/ephy-sync-service.c \ - sync/ephy-sync-service.h \ - sync/ephy-sync-utils.c \ - sync/ephy-sync-utils.h -endif - -nodist_libephymain_la_SOURCES = \ - $(TYPES_SOURCE) - -libephymain_la_CPPFLAGS = \ - -I$(top_builddir)/embed \ - -I$(top_builddir)/lib \ - -I$(top_builddir)/lib/widgets \ - -I$(top_srcdir)/embed \ - -I$(top_srcdir)/gvdb/gvdb \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/lib/egg \ - -I$(top_srcdir)/lib/history \ - -I$(top_srcdir)/lib/widgets \ - -I$(top_srcdir)/src/bookmarks \ - -I$(top_srcdir)/src/sync \ - -DLOCALEDIR=\"$(localedir)\" \ - -DPKGDATADIR=\"$(pkgdatadir)\" \ - $(GDK_CFLAGS) \ - $(GIO_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(GTK_CFLAGS) \ - $(HOGWEED_CFLAGS) \ - $(JSON_GLIB_CFLAGS) \ - $(LIBNOTIFY_CFLAGS) \ - $(LIBSECRET_CFLAGS) \ - $(LIBSOUP_CFLAGS) \ - $(LIBXML_CFLAGS) \ - $(NETTLE_CFLAGS) \ - $(WEBKIT2GTK_CFLAGS) - -libephymain_la_CFLAGS = \ - $(WARN_CFLAGS) - -libephymain_la_LDFLAGS = \ - $(WARN_LDFLAGS) -avoid-version -no-undefined - -libephymain_la_LIBADD = \ - $(top_builddir)/embed/libephyembed.la \ - $(top_builddir)/gvdb/libgvdb.la \ - $(top_builddir)/lib/libephymisc.la \ - $(top_builddir)/lib/egg/libegg.la \ - $(top_builddir)/lib/widgets/libephywidgets.la \ - $(GDK_LIBS) \ - $(GIO_LIBS) \ - $(GLIB_LIBS) \ - $(GTK_LIBS) \ - $(HOGWEED_LIBS) \ - $(JSON_GLIB_LIBS) \ - $(LIBNOTIFY_LIBS) \ - $(LIBSECRET_LIBS) \ - $(LIBSOUP_LIBS) \ - $(LIBXML_LIBS) \ - $(NETTLE_LIBS) \ - $(WEBKIT2GTK_LIBS) - -RESOURCE_FILES = \ - resources/about.css \ - resources/about.ini \ - resources/channel-insecure-symbolic.png \ - resources/computer-fail-symbolic.png \ - resources/ephy-bookmark-tag-symbolic.svg \ - resources/ephy-bookmarks-symbolic.svg \ - resources/epiphany.css \ - resources/error.css \ - resources/error.html \ - resources/gtk/application-menu.ui \ - resources/gtk/bookmark-properties-grid.ui \ - resources/gtk/bookmark-row.ui \ - resources/gtk/bookmarks-popover.ui \ - resources/gtk/clear-data-dialog.ui \ - resources/gtk/cookies-dialog.ui \ - resources/gtk/encoding-dialog.ui \ - resources/gtk/encoding-row.ui \ - resources/gtk/history-dialog.ui \ - resources/gtk/menus.ui \ - resources/gtk/page-menu-popover.ui \ - resources/gtk/passwords-dialog.ui \ - resources/gtk/prefs-dialog.ui \ - resources/gtk/prefs-lang-dialog.ui \ - resources/gtk/search-engine-dialog.ui \ - resources/gtk/shortcuts-dialog.ui \ - resources/incognito.png \ - resources/mime-types-permissions.xml \ - resources/missing-thumbnail.png \ - resources/network-error-symbolic.png - -epiphany-resources.c: resources/epiphany.gresource.xml $(RESOURCE_FILES) - $(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir)/resources --generate-source --c-name epiphany $(srcdir)/resources/epiphany.gresource.xml - -epiphany-resources.h: resources/epiphany.gresource.xml $(RESOURCE_FILES) - $(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir)/resources --generate-header --c-name epiphany $(srcdir)/resources/epiphany.gresource.xml - -EPIPHANY_RESOURCES = \ - epiphany-resources.c \ - epiphany-resources.h - -BUILT_SOURCES = \ - $(EPIPHANY_RESOURCES) \ - $(TYPES_SOURCE) - -epiphany_SOURCES = ephy-main.c \ - $(EPIPHANY_RESOURCES) - -epiphany_CFLAGS = \ - $(WARN_CFLAGS) - -epiphany_CPPFLAGS = \ - -I$(top_builddir)/lib \ - -I$(top_srcdir)/embed \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/lib/egg \ - -I$(top_srcdir)/lib/history \ - -I$(top_srcdir)/lib/widgets \ - -I$(top_builddir)/lib/widgets \ - -I$(top_srcdir)/src/bookmarks \ - -I$(top_srcdir)/src/sync \ - -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \ - -DLOCALEDIR=\"$(localedir)\" \ - $(GLIB_CFLAGS) \ - $(GTK_CFLAGS) \ - $(HOGWEED_CFLAGS) \ - $(JSON_GLIB_CFLAGS) \ - $(LIBNOTIFY_CFLAGS) \ - $(LIBXML_CFLAGS) \ - $(NETTLE_CFLAGS) \ - $(WEBKIT2GTK_CFLAGS) - -epiphany_LDADD = \ - $(top_builddir)/lib/libephymisc.la \ - libephymain.la \ - $(GLIB_LIBS) \ - $(GTK_LIBS) \ - $(HOGWEED_LIBS) \ - $(JSON_GLIB_LIBS) \ - $(LIBNOTIFY_LIBS) \ - $(LIBXML_LIBS) \ - $(NETTLE_LIBS) \ - $(WEBKIT2GTK_LIBS) - -epiphany_LDFLAGS = \ - -dlopen self \ - $(WARN_LDFLAGS) - -TYPES_SOURCE = \ - ephy-type-builtins.c \ - ephy-type-builtins.h - -stamp_files = \ - stamp-ephy-type-builtins.c \ - stamp-ephy-type-builtins.h - -ephy-type-builtins.c: stamp-ephy-type-builtins.c Makefile - @true -stamp-ephy-type-builtins.c: Makefile $(TYPES_H_FILES) - $(AM_V_GEN) $(GLIB_MKENUMS) \ - --fhead "#include <config.h>\n\n" \ - --fhead "#include \"ephy-type-builtins.h\"\n\n" \ - --fprod "\n/* enumerations from \"@filename@\" */" \ - --fprod "\n#include \"@filename@\"" \ - --vhead "GType\n@enum_name@_get_type (void)\n{\n" \ - --vhead " static GType type = 0;\n\n" \ - --vhead " if (G_UNLIKELY (type == 0))\n {\n" \ - --vhead " static const G@Type@Value _@enum_name@_values[] = {" \ - --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ - --vtail " { 0, NULL, NULL }\n };\n\n" \ - --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n }\n\n" \ - --vtail " return type;\n}\n\n" \ - $(filter-out $<,$^) > xgen-$(@F) \ - && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \ - && rm -f xgen-$(@F) \ - && echo timestamp > $(@F) - -ephy-type-builtins.h: stamp-ephy-type-builtins.h Makefile - @true -stamp-ephy-type-builtins.h: Makefile $(TYPES_H_FILES) - $(AM_V_GEN) $(GLIB_MKENUMS) \ - --fhead "#ifndef EPHY_TYPE_BUILTINS_H\n" \ - --fhead "#define EPHY_TYPE_BUILTINS_H 1\n\n" \ - --fhead "#include <glib-object.h>\n\n" \ - --fhead "G_BEGIN_DECLS\n\n" \ - --ftail "G_END_DECLS\n\n" \ - --ftail "#endif /* EPHY_TYPE_BUILTINS_H */\n" \ - --fprod "\n/* --- @filename@ --- */" \ - --eprod "#define EPHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \ - --eprod "GType @enum_name@_get_type (void);\n" \ - $(filter-out $<,$^) > xgen-$(@F) \ - && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \ - && rm -f xgen-$(@F) \ - && echo timestamp > $(@F) - -CLEANFILES = \ - $(stamp_files) \ - $(BUILT_SOURCES) \ - resources/.sass-cache - --include $(top_srcdir)/git.mk diff --git a/src/bookmarks/ephy-bookmark-properties-grid.c b/src/bookmarks/ephy-bookmark-properties-grid.c index a7b5c7aff..5b8d22cf0 100644 --- a/src/bookmarks/ephy-bookmark-properties-grid.c +++ b/src/bookmarks/ephy-bookmark-properties-grid.c @@ -32,7 +32,7 @@ #include <libsoup/soup.h> #include <string.h> -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC #include "ephy-sync-service.h" #endif @@ -245,14 +245,14 @@ ephy_bookmarks_properties_grid_actions_remove_bookmark (GSimpleAction *action, GVariant *value, gpointer user_data) { -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC EphySyncService *service; #endif EphyBookmarkPropertiesGrid *self = user_data; g_assert (EPHY_IS_BOOKMARK_PROPERTIES_GRID (self)); -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC service = ephy_shell_get_sync_service (ephy_shell_get_default ()); ephy_sync_service_delete_bookmark (service, self->bookmark, FALSE); #endif diff --git a/src/bookmarks/ephy-bookmark.c b/src/bookmarks/ephy-bookmark.c index ff0239b9f..adc5b2578 100644 --- a/src/bookmarks/ephy-bookmark.c +++ b/src/bookmarks/ephy-bookmark.c @@ -26,7 +26,7 @@ #include <string.h> -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC #include "ephy-sync-crypto.h" #include "ephy-sync-utils.h" #endif @@ -204,7 +204,7 @@ ephy_bookmark_class_init (EphyBookmarkClass *klass) static void ephy_bookmark_init (EphyBookmark *self) { -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC self->id = g_malloc0 (ID_LEN + 1); ephy_sync_crypto_random_hex_gen (NULL, ID_LEN, (guint8 *)self->id); #else @@ -542,7 +542,7 @@ ephy_bookmark_tags_compare (const char *tag1, const char *tag2) return result; } -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC char * ephy_bookmark_to_bso (EphyBookmark *self) { diff --git a/src/bookmarks/ephy-bookmark.h b/src/bookmarks/ephy-bookmark.h index 1f49f0433..6811c46e8 100644 --- a/src/bookmarks/ephy-bookmark.h +++ b/src/bookmarks/ephy-bookmark.h @@ -70,7 +70,7 @@ int ephy_bookmark_bookmarks_compare_func (EphyBookmark *bookm int ephy_bookmark_tags_compare (const char *tag1, const char *tag2); -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC char *ephy_bookmark_to_bso (EphyBookmark *self); EphyBookmark *ephy_bookmark_from_bso (JsonObject *bso); #endif diff --git a/src/ephy-main.c b/src/ephy-main.c index 2d5f8430d..9c4687e16 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -206,7 +206,7 @@ main (int argc, */ LIBXML_TEST_VERSION; - notify_init (PACKAGE); + notify_init ("epiphany"); /* If we're given -remote arguments, translate them */ if (argc >= 2 && strcmp (argv[1], "-remote") == 0) { @@ -346,7 +346,7 @@ main (int argc, if (!(private_instance && profile_directory == NULL) && incognito_mode == FALSE) { /* If the migration fails we don't really want to continue. */ if (!ephy_profile_utils_do_migration ((const char *)profile_directory, -1, FALSE)) { - g_print ("Failed to run the migrator process, Web will now abort."); + g_print ("Failed to run the migrator process, Web will now abort.\n"); exit (1); } } diff --git a/src/ephy-shell.c b/src/ephy-shell.c index decc08b4a..ace9ac186 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -47,7 +47,7 @@ #include <gdk/gdkx.h> #include <gtk/gtk.h> -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC #include "ephy-notification.h" #endif @@ -55,7 +55,7 @@ struct _EphyShell { EphyEmbedShell parent_instance; EphySession *session; -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC EphySyncService *sync_service; #endif GList *windows; @@ -312,7 +312,7 @@ download_started_cb (WebKitWebContext *web_context, g_object_unref (ephy_download); } -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC static void sync_tokens_load_finished_cb (EphySyncService *service, GError *error, @@ -373,7 +373,7 @@ ephy_shell_startup (GApplication *application) G_BINDING_SYNC_CREATE); } -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC /* Create the sync service. */ ephy_shell->sync_service = ephy_sync_service_new (); g_signal_connect (ephy_shell->sync_service, @@ -647,7 +647,7 @@ ephy_shell_dispose (GObject *object) g_clear_pointer (&shell->history_dialog, gtk_widget_destroy); g_clear_object (&shell->prefs_dialog); g_clear_object (&shell->network_monitor); -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC g_clear_object (&shell->sync_service); #endif g_clear_object (&shell->bookmarks_manager); @@ -802,7 +802,7 @@ ephy_shell_get_session (EphyShell *shell) return shell->session; } -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC /** * ephy_shell_get_sync_service: * @shell: the #EphyShell diff --git a/src/ephy-shell.h b/src/ephy-shell.h index 9e86fa6ac..e81c07474 100644 --- a/src/ephy-shell.h +++ b/src/ephy-shell.h @@ -32,7 +32,7 @@ #include <glib-object.h> #include <glib.h> -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC #include "ephy-sync-service.h" #endif @@ -105,7 +105,7 @@ GNetworkMonitor *ephy_shell_get_net_monitor (EphyShell *shell); EphyBookmarksManager *ephy_shell_get_bookmarks_manager (EphyShell *shell); -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC EphySyncService *ephy_shell_get_sync_service (EphyShell *shell); #endif diff --git a/src/ephy-type-builtins.c.in b/src/ephy-type-builtins.c.in new file mode 100644 index 000000000..f5929d48e --- /dev/null +++ b/src/ephy-type-builtins.c.in @@ -0,0 +1,42 @@ +/*** BEGIN file-header ***/ + +#include <config.h> +#include "ephy-type-builtins.h" + +/*** END file-header ***/ +/*** BEGIN file-production ***/ + +/* enumerations from "@basename@" */ +#include "@basename@" + +/*** END file-production ***/ + +/*** BEGIN value-header ***/ +GType +@enum_name@_get_type(void) { + static volatile gsize g_define_type_id__volatile = 0; + + if(g_once_init_enter(&g_define_type_id__volatile)) { + static const G@Type@Value values [] = { +/*** END value-header ***/ + +/*** BEGIN value-production ***/ + { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, +/*** END value-production ***/ + +/*** BEGIN value-tail ***/ + { 0, NULL, NULL } + }; + + GType g_define_type_id = + g_@type@_register_static(g_intern_static_string("@EnumName@"), values); + g_once_init_leave(&g_define_type_id__volatile, g_define_type_id); + } + + return g_define_type_id__volatile; +} + +/*** END value-tail ***/ + +/*** BEGIN file-tail ***/ +/*** END file-tail ***/ diff --git a/src/ephy-type-builtins.h.in b/src/ephy-type-builtins.h.in new file mode 100644 index 000000000..f36794564 --- /dev/null +++ b/src/ephy-type-builtins.h.in @@ -0,0 +1,22 @@ +/*** BEGIN file-header ***/ +#pragma once + +#include <glib-object.h> + +G_BEGIN_DECLS +/*** END file-header ***/ + +/*** BEGIN file-production ***/ + +/* enumerations from "@basename@" */ +/*** END file-production ***/ +/*** BEGIN value-header ***/ +GType @enum_name@_get_type (void) G_GNUC_CONST; +#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) +/*** END value-header ***/ + +/*** BEGIN file-tail ***/ + +G_END_DECLS + +/*** END file-tail ***/ diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 000000000..8767b9a42 --- /dev/null +++ b/src/meson.build @@ -0,0 +1,140 @@ +types_headers = [ + 'bookmarks/ephy-bookmark-properties-grid.h', + 'ephy-link.h', + 'ephy-session.h', + 'ephy-shell.h', + 'ephy-window.h' +] + +enums = gnome.mkenums('ephy', + sources: types_headers, + h_template: 'ephy-type-builtins.h.in', + c_template: 'ephy-type-builtins.c.in' +) + +libephymain_sources = [ + 'bookmarks/ephy-add-bookmark-popover.c', + 'bookmarks/ephy-bookmark.c', + 'bookmarks/ephy-bookmark-properties-grid.c', + 'bookmarks/ephy-bookmark-row.c', + 'bookmarks/ephy-bookmarks-export.c', + 'bookmarks/ephy-bookmarks-import.c', + 'bookmarks/ephy-bookmarks-manager.c', + 'bookmarks/ephy-bookmarks-popover.c', + 'clear-data-dialog.c', + 'cookies-dialog.c', + 'ephy-action-helper.c', + 'ephy-completion-model.c', + 'ephy-encoding-dialog.c', + 'ephy-encoding-row.c', + 'ephy-header-bar.c', + 'ephy-history-dialog.c', + 'ephy-link.c', + 'ephy-location-controller.c', + 'ephy-lockdown.c', + 'ephy-notebook.c', + 'ephy-search-engine-dialog.c', + 'ephy-session.c', + 'ephy-shell.c', + 'ephy-window.c', + 'passwords-dialog.c', + 'popup-commands.c', + 'prefs-dialog.c', + 'window-commands.c', + enums +] + +libephymain_deps = [ + ephyembed_dep, + ephymisc_dep, + ephywidgets_dep, + gvdb_dep, + json_glib_dep, + libnotify_dep +] + +libephymain_includes = include_directories( + '.', + 'bookmarks', + 'sync' +) + +if get_option('enable_firefox_sync') + libephymain_sources += [ + 'sync/ephy-sync-crypto.c', + 'sync/ephy-sync-secret.c', + 'sync/ephy-sync-service.c', + 'sync/ephy-sync-utils.c' + ] + + libephymain_deps += [ + gmp_dep, + hogweed_dep, + nettle_dep + ] +endif + +libephymain = shared_library('ephymain', + libephymain_sources, + dependencies: libephymain_deps, + include_directories: libephymain_includes, + install: true, + install_dir: pkglibdir, + install_rpath: pkglibdir +) + +ephymain_dep = declare_dependency( + link_with: libephymain, + include_directories: libephymain_includes, + dependencies: libephymain_deps +) + + +executable('ephy-profile-migrator', + 'profile-migrator/ephy-profile-migrator.c', + dependencies: ephymain_dep, + install: true, + install_dir: pkglibexecdir, + install_rpath: pkglibdir +) + + +codegen = gnome.gdbus_codegen('ephy-shell-search-provider-generated', + 'search-provider/org.gnome.ShellSearchProvider2.xml', + interface_prefix: 'org.gnome', + namespace: 'Ephy' +) + +search_provider_sources = [ + 'search-provider/ephy-search-provider.c', + 'search-provider/ephy-search-provider-main.c', + codegen +] + +executable('epiphany-search-provider', + search_provider_sources, + dependencies: ephymain_dep, + install: true, + install_dir: libexecdir, + install_rpath: pkglibdir +) + + +resource_files = files('resources/epiphany.gresource.xml') +resources = gnome.compile_resources('epiphany-resources', + resource_files, + c_name: 'epiphany', + source_dir: 'resources' +) + +epiphany_sources = [ + 'ephy-main.c', + resources +] + +executable('epiphany', + epiphany_sources, + dependencies: ephymain_dep, + install: true, + install_rpath: pkglibdir +) diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c index 6151d702b..c72f02311 100644 --- a/src/prefs-dialog.c +++ b/src/prefs-dialog.c @@ -50,7 +50,7 @@ #include <json-glib/json-glib.h> #include <string.h> -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC #include "ephy-sync-crypto.h" #include "ephy-sync-secret.h" #include "ephy-sync-service.h" @@ -115,7 +115,7 @@ struct _PrefsDialog { GHashTable *iso_639_table; GHashTable *iso_3166_table; -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC /* sync */ GtkWidget *sync_authenticate_box; GtkWidget *sync_sign_in_box; @@ -132,7 +132,7 @@ struct _PrefsDialog { GtkWidget *notebook; }; -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC typedef struct { PrefsDialog *dialog; char *email; @@ -155,7 +155,7 @@ enum { G_DEFINE_TYPE (PrefsDialog, prefs_dialog, GTK_TYPE_DIALOG) -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC static FxACallbackData * fxa_callback_data_new (PrefsDialog *dialog, const char *email, @@ -224,7 +224,7 @@ prefs_dialog_finalize (GObject *object) g_hash_table_destroy (dialog->iso_639_table); g_hash_table_destroy (dialog->iso_3166_table); -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC if (dialog->fxa_web_view != NULL) { webkit_user_content_manager_unregister_script_message_handler (dialog->fxa_manager, "accountsCommandHandler"); @@ -241,7 +241,7 @@ prefs_dialog_finalize (GObject *object) G_OBJECT_CLASS (prefs_dialog_parent_class)->finalize (object); } -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC static void hide_fxa_iframe (PrefsDialog *dialog, const char *email) @@ -638,7 +638,7 @@ prefs_dialog_class_init (PrefsDialogClass *klass) gtk_widget_class_bind_template_child (widget_class, PrefsDialog, lang_down_button); gtk_widget_class_bind_template_child (widget_class, PrefsDialog, enable_spell_checking_checkbutton); -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC /* sync */ gtk_widget_class_bind_template_child (widget_class, PrefsDialog, sync_authenticate_box); gtk_widget_class_bind_template_child (widget_class, PrefsDialog, sync_sign_in_box); @@ -1632,7 +1632,7 @@ setup_language_page (PrefsDialog *dialog) create_language_section (dialog); } -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC static void setup_sync_page (PrefsDialog *dialog) { @@ -1688,7 +1688,7 @@ prefs_dialog_init (PrefsDialog *dialog) setup_fonts_page (dialog); setup_stored_data_page (dialog); setup_language_page (dialog); -#ifdef ENABLE_SYNC +#if ENABLE_FIREFOX_SYNC if (mode != EPHY_EMBED_SHELL_MODE_APPLICATION) { setup_sync_page (dialog); diff --git a/src/profile-migrator/Makefile.am b/src/profile-migrator/Makefile.am deleted file mode 100644 index 8cf59bd4a..000000000 --- a/src/profile-migrator/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -pkglibexec_PROGRAMS = ephy-profile-migrator - -ephy_profile_migrator_SOURCES = \ - ephy-profile-migrator.c - -ephy_profile_migrator_CFLAGS = \ - $(WARN_CFLAGS) - -ephy_profile_migrator_CPPFLAGS = \ - -I$(top_builddir)/lib \ - -I$(top_srcdir)/embed \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/lib/history \ - -I$(top_srcdir)/src/ \ - -I$(top_srcdir)/src/bookmarks \ - -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \ - -DLOCALEDIR=\"$(localedir)\" \ - $(GLIB_CFLAGS) \ - $(GTK_CFLAGS) \ - $(HOGWEED_CFLAGS) \ - $(JSON_GLIB_CFLAGS) \ - $(LIBSECRET_CFLAGS) \ - $(LIBSOUP_CFLAGS) \ - $(LIBXML_CFLAGS) \ - $(NETTLE_CFLAGS) \ - $(WEBKIT2GTK_CFLAGS) - -ephy_profile_migrator_LDADD = \ - $(top_builddir)/lib/libephymisc.la \ - $(top_builddir)/src/libephymain.la \ - $(GLIB_LIBS) \ - $(GTK_LIBS) \ - $(HOGWEED_LIBS) \ - $(JSON_GLIB_LIBS) \ - $(LIBSECRET_LIBS) \ - $(LIBSOUP_LIBS) \ - $(LIBXML_LIBS) \ - $(NETTLE_LIBS) \ - $(WEBKIT2GTK_LIBS) - -ephy_profile_migrator_LDFLAGS = \ - $(WARN_LDFLAGS) - -CLEANFILES = $(BUILT_SOURCES) - --include $(top_srcdir)/git.mk diff --git a/src/search-provider/Makefile.am b/src/search-provider/Makefile.am deleted file mode 100644 index 814152716..000000000 --- a/src/search-provider/Makefile.am +++ /dev/null @@ -1,74 +0,0 @@ -BUILT_SOURCES = \ - ephy-shell-search-provider-generated.stamp \ - ephy-shell-search-provider-generated.c \ - ephy-shell-search-provider-generated.h - -dist_noinst_DATA = org.gnome.ShellSearchProvider2.xml - -libexec_PROGRAMS = epiphany-search-provider - -epiphany_search_provider_SOURCES = \ - ephy-search-provider.h \ - ephy-search-provider.c \ - ephy-search-provider-main.c \ - ephy-shell-search-provider-generated.c \ - ephy-shell-search-provider-generated.h - -epiphany_search_provider_CFLAGS = \ - $(WARN_CFLAGS) - -epiphany_search_provider_CPPFLAGS = \ - -I$(top_builddir)/lib \ - -I$(top_srcdir)/embed \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/lib/history \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/bookmarks \ - -I$(top_srcdir)/src/sync \ - -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \ - -DLOCALEDIR=\"$(localedir)\" \ - $(GIO_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(GTK_CFLAGS) \ - $(HOGWEED_CFLAGS) \ - $(JSON_GLIB_CFLAGS) \ - $(LIBSECRET_CFLAGS) \ - $(LIBSOUP_CFLAGS) \ - $(LIBXML_CFLAGS) \ - $(NETTLE_CFLAGS) \ - $(WEBKIT2GTK_CFLAGS) - -epiphany_search_provider_LDADD = \ - $(top_builddir)/lib/libephymisc.la \ - $(top_builddir)/src/libephymain.la \ - $(GIO_LIBS) \ - $(GLIB_LIBS) \ - $(GTK_LIBS) \ - $(HOGWEED_LIBS) \ - $(JSON_GLIB_LIBS) \ - $(LIBSECRET_LIBS) \ - $(LIBSOUP_LIBS) \ - $(LIBXML_LIBS) \ - $(NETTLE_LIBS) \ - $(WEBKIT2GTK_LIBS) - -epiphany_search_provider_LDFLAGS = \ - -dlopen self \ - $(WARN_LDFLAGS) - -ephy-shell-search-provider-generated.c: ephy-shell-search-provider-generated.stamp -ephy-shell-search-provider-generated.h: ephy-shell-search-provider-generated.stamp - -# The upstream for the DBus interface definition is -# at http://git.gnome.org/browse/gnome-shell/plain/data/org.gnome.ShellSearchProvider2.xml -ephy-shell-search-provider-generated.stamp: Makefile $(srcdir)/org.gnome.ShellSearchProvider2.xml - $(AM_V_GEN) gdbus-codegen \ - --interface-prefix org.gnome. \ - --c-namespace Ephy \ - --generate-c-code ephy-shell-search-provider-generated \ - $(srcdir)/org.gnome.ShellSearchProvider2.xml \ - && touch ephy-shell-search-provider-generated.stamp - -CLEANFILES = $(BUILT_SOURCES) - --include $(top_srcdir)/git.mk diff --git a/src/sync/ephy-sync-service.c b/src/sync/ephy-sync-service.c index 13d2effdf..99d512dcb 100644 --- a/src/sync/ephy-sync-service.c +++ b/src/sync/ephy-sync-service.c @@ -853,7 +853,7 @@ ephy_sync_service_start_sign_in (EphySyncService *self, guint8 *tokenID, guint8 *reqHMACkey) { - JsonNode *node; + JsonNode *node = NULL; JsonObject *json; char *tokenID_hex; char *bundle = NULL; diff --git a/subprojects/gvdb/README.epiphany b/subprojects/gvdb/README.epiphany new file mode 100644 index 000000000..6c6a80829 --- /dev/null +++ b/subprojects/gvdb/README.epiphany @@ -0,0 +1,3 @@ +GVariant Database + +Copied from https://git.gnome.org/browse/gvdb diff --git a/gvdb/gvdb/gvdb-builder.c b/subprojects/gvdb/gvdb-builder.c index c63d1171e..16a5283dd 100644 --- a/gvdb/gvdb/gvdb-builder.c +++ b/subprojects/gvdb/gvdb-builder.c @@ -342,7 +342,7 @@ file_builder_allocate_for_hash (FileBuilder *fb, memset (*bloom_filter, 0, n_bloom_words * sizeof (guint32_le)); /* NOTE - the code to actually fill in the bloom filter here is missing. - * Patches welcome! + * Patches welcome! * * http://en.wikipedia.org/wiki/Bloom_filter * http://0pointer.de/blog/projects/bloom.html diff --git a/gvdb/gvdb/gvdb-builder.h b/subprojects/gvdb/gvdb-builder.h index 797626ef6..797626ef6 100644 --- a/gvdb/gvdb/gvdb-builder.h +++ b/subprojects/gvdb/gvdb-builder.h diff --git a/gvdb/gvdb/gvdb-format.h b/subprojects/gvdb/gvdb-format.h index 886aa5697..886aa5697 100644 --- a/gvdb/gvdb/gvdb-format.h +++ b/subprojects/gvdb/gvdb-format.h diff --git a/gvdb/gvdb/gvdb-reader.c b/subprojects/gvdb/gvdb-reader.c index 8ccfc8f5f..8ccfc8f5f 100644 --- a/gvdb/gvdb/gvdb-reader.c +++ b/subprojects/gvdb/gvdb-reader.c diff --git a/gvdb/gvdb/gvdb-reader.h b/subprojects/gvdb/gvdb-reader.h index 5980925ec..5980925ec 100644 --- a/gvdb/gvdb/gvdb-reader.h +++ b/subprojects/gvdb/gvdb-reader.h diff --git a/subprojects/gvdb/meson.build b/subprojects/gvdb/meson.build new file mode 100644 index 000000000..a21ac7485 --- /dev/null +++ b/subprojects/gvdb/meson.build @@ -0,0 +1,22 @@ +project('gvdb', 'c', + meson_version: '>= 0.40.0', + default_options: ['static=true'], +) + +gvdb_sources = [ + 'gvdb-builder.c', + 'gvdb-reader.c' +] + +glib_dep = dependency('glib-2.0') + +gvdb_lib = static_library('gvdb', + gvdb_sources, + dependencies: glib_dep +) + +gvdb_dep = declare_dependency( + link_with: gvdb_lib, + include_directories: include_directories('.'), + dependencies: glib_dep +) diff --git a/subprojects/libgd b/subprojects/libgd new file mode 160000 +Subproject a4928d0f5e7aebe7d0670fb65d5b6c1bcbe5dd6 diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index a9960627c..000000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,200 +0,0 @@ -SUBDIRS = data - -noinst_PROGRAMS = \ - test-ephy-completion-model \ - test-ephy-embed-utils \ - test-ephy-encodings \ - test-ephy-file-helpers \ - test-ephy-history \ - test-ephy-location-entry \ - test-ephy-migration \ - test-ephy-sqlite \ - test-ephy-string \ - test-ephy-uri-helpers - -# Mostly copied from Makefile.decl in glib -GTESTER = gtester -GTESTER_REPORT = gtester-report - -# initialize variables for unconditional += appending -TEST_PROGS = ${noinst_PROGRAMS} - -### testing rules - -# test: run all tests in cwd and subdirs -test: test-nonrecursive - @for subdir in $(SUBDIRS) . ; do \ - test "$$subdir" = "." -o "$$subdir" = "po" || \ - ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \ - done - -# test-nonrecursive: run tests only in cwd -test-nonrecursive: ${TEST_PROGS} - @test -z "${TEST_PROGS}" || G_DEBUG=gc-friendly MALLOC_CHECK_=2 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256)) ${GTESTER} --verbose ${TEST_PROGS} - -# test-report: run tests in subdirs and generate report -# perf-report: run tests in subdirs with -m perf and generate report -# full-report: like test-report: with -m perf and -m slow -test-report perf-report full-report: ${TEST_PROGS} - @test -z "${TEST_PROGS}" || { \ - case $@ in \ - test-report) test_options="-k";; \ - perf-report) test_options="-k -m=perf";; \ - full-report) test_options="-k -m=perf -m=slow";; \ - esac ; \ - if test -z "$$GTESTER_LOGDIR" ; then \ - ${GTESTER} --verbose $$test_options -o test-report.xml ${TEST_PROGS} ; \ - elif test -n "${TEST_PROGS}" ; then \ - ${GTESTER} --verbose $$test_options -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ${TEST_PROGS} ; \ - fi ; \ - } - @ ignore_logdir=true ; \ - if test -z "$$GTESTER_LOGDIR" ; then \ - GTESTER_LOGDIR=`mktemp -d "\`pwd\`/.testlogs-XXXXXX"`; export GTESTER_LOGDIR ; \ - ignore_logdir=false ; \ - fi ; \ - if test -d "$(top_srcdir)/.git" ; then \ - REVISION=`git describe` ; \ - else \ - REVISION=$(VERSION) ; \ - fi ; \ - for subdir in $(SUBDIRS) . ; do \ - test "$$subdir" = "." -o "$$subdir" = "po" || \ - ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \ - done ; \ - $$ignore_logdir || { \ - echo '<?xml version="1.0"?>' > $@.xml ; \ - echo '<report-collection>' >> $@.xml ; \ - echo '<info>' >> $@.xml ; \ - echo ' <package>$(PACKAGE)</package>' >> $@.xml ; \ - echo ' <version>$(VERSION)</version>' >> $@.xml ; \ - echo " <revision>$$REVISION</revision>" >> $@.xml ; \ - echo '</info>' >> $@.xml ; \ - for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \ - sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \ - done ; \ - echo >> $@.xml ; \ - echo '</report-collection>' >> $@.xml ; \ - rm -rf "$$GTESTER_LOGDIR"/ ; \ - ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \ - } -.PHONY: test test-report perf-report full-report test-nonrecursive - -# run tests in cwd as part of make check -check-local: test-nonrecursive - -AM_CPPFLAGS = \ - -I$(top_srcdir)/embed \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/lib/history \ - -I$(top_srcdir)/lib/widgets \ - -I$(top_builddir)/lib/widgets \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/bookmarks \ - -I$(top_srcdir)/src/sync \ - -DTEST_DIR=\"$(srcdir)\" \ - $(GDK_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(GTK_CFLAGS) \ - $(HOGWEED_CFLAGS) \ - $(JSON_GLIB_CFLAGS) \ - $(LIBSOUP_CFLAGS) \ - $(NETTLE_CFLAGS) \ - $(WEBKIT2GTK_CFLAGS) - -AM_CFLAGS = \ - $(WARN_CFLAGS) - -AM_LDFLAGS = \ - $(WARN_LDFLAGS) - -LDADD = \ - $(top_builddir)/src/libephymain.la \ - $(top_builddir)/lib/libephymisc.la \ - $(GDK_LIBS) \ - $(GLIB_LIBS) \ - $(GTK_LIBS) \ - $(HOGWEED_LIBS) \ - $(JSON_GLIB_LIBS) \ - $(LIBSOUP_LIBS) \ - $(NETTLE_LIBS) \ - $(WEBKIT2GTK_LIBS) - -test_ephy_completion_model_SOURCES = \ - ephy-completion-model-test.c - -# https://bugzilla.gnome.org/show_bug.cgi?id=778153 -#test_ephy_download_SOURCES = \ -# ephy-download-test.c - -# https://bugzilla.gnome.org/show_bug.cgi?id=773448 -#test_ephy_embed_shell_SOURCES = \ -# ephy-embed-shell-test.c - -test_ephy_embed_utils_SOURCES = \ - ephy-embed-utils-test.c - -test_ephy_encodings_SOURCES = \ - ephy-encodings-test.c - -test_ephy_file_helpers_SOURCES = \ - ephy-file-helpers-test.c -test_ephy_file_helpers_CPPFLAGS = \ - -DTOP_SRC_DIR=\"$(abs_top_srcdir)\" \ - $(AM_CPPFLAGS) - -test_ephy_history_SOURCES = \ - ephy-history-test.c - -test_ephy_location_entry_SOURCES = \ - ephy-location-entry-test.c - -test_ephy_migration_SOURCES = \ - ephy-migration-test.c - -# https://bugzilla.gnome.org/show_bug.cgi?id=707220 -# test_ephy_session_SOURCES = \ -# ephy-session-test.c \ -# ephy-test-utils.c \ -# ephy-test-utils.h \ -# $(top_builddir)/src/epiphany-resources.c \ -# $(top_builddir)/src/epiphany-resources.h - -# https://bugzilla.gnome.org/show_bug.cgi?id=693369 -# https://bugzilla.gnome.org/show_bug.cgi?id=695703 -# https://bugzilla.gnome.org/show_bug.cgi?id=707217 -# test_ephy_shell_SOURCES = \ -# $(top_builddir)/src/epiphany-resources.c \ -# $(top_builddir)/src/epiphany-resources.h \ -# ephy-shell-test.c \ -# ephy-test-utils.c \ -# ephy-test-utils.h - -# https://bugzilla.gnome.org/show_bug.cgi?id=762753 -#test_ephy_snapshot_service_SOURCES = \ -# ephy-snapshot-service-test.c - -test_ephy_sqlite_SOURCES = \ - ephy-sqlite-test.c - -test_ephy_string_SOURCES = \ - ephy-string-test.c - -test_ephy_uri_helpers_SOURCES = \ - ephy-uri-helpers-test.c - -# https://bugzilla.gnome.org/show_bug.cgi?id=759256 -# test_ephy_web_app_utils_SOURCES = \ -# ephy-web-app-utils-test.c - -# https://bugzilla.gnome.org/show_bug.cgi?id=780280 -#test_ephy_web_view_SOURCES = \ -# $(top_builddir)/src/epiphany-resources.c \ -# ephy-web-view-test.c - -dist_noinst_DATA = \ - data/test.html \ - applications/epiphany.desktop \ - applications/defaults.list - --include $(top_srcdir)/git.mk diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am deleted file mode 100644 index e57e6f491..000000000 --- a/tests/data/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -dist_noinst_DATA = user-dirs.dirs - --include $(top_srcdir)/git.mk diff --git a/tests/ephy-file-helpers-test.c b/tests/ephy-file-helpers-test.c index 6b8c3d3c2..41f4a1084 100644 --- a/tests/ephy-file-helpers-test.c +++ b/tests/ephy-file-helpers-test.c @@ -323,7 +323,7 @@ main (int argc, char *argv[]) /* Set our custom user-dirs.dirs, to control the output of * g_get_user_special_dir. The values there are the ones we should * check for in the test. */ - g_setenv ("XDG_CONFIG_HOME", TOP_SRC_DIR "/tests/data/", TRUE); + g_setenv ("XDG_CONFIG_HOME", SOURCE_ROOT "/tests/data/", TRUE); gtk_test_init (&argc, &argv); diff --git a/tests/meson.build b/tests/meson.build new file mode 100644 index 000000000..8fa8161a9 --- /dev/null +++ b/tests/meson.build @@ -0,0 +1,123 @@ +if get_option('enable_unit_tests') + # FIXME: The tests that need ephy-test-utils are all disabled.... + # + # libephytestutils = static_library('ephytestutils', + # 'ephy-test-utils.c', + # dependencies: ephymain_dep + # ) + # + # ephytestutils_dep = declare_dependency( + # link_with: libephytestutils + # ) + + completion_model_test = executable('test-ephy-completion-model', + 'ephy-completion-model-test.c', + dependencies: ephymain_dep + ) + test('Completion model test', completion_model_test) + + # FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=778153 + # download_test = executable('test-ephy-download', + # 'ephy-download-test.c', + # dependencies: ephymain_dep + # ) + # test('Download test', download_test) + + # FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=773448 + # embed_shell_test = executable('test-ephy-embed-shell', + # 'ephy-embed-shell-test.c', + # dependencies: ephymain_dep + # ) + # test('Embed shell test', embed_shell_test) + + embed_utils_test = executable('test-ephy-embed-utils', + 'ephy-embed-utils-test.c', + dependencies: ephymain_dep + ) + test('Embed utils test', embed_utils_test) + + encodings_test = executable('test-ephy-encodings', + 'ephy-encodings-test.c', + dependencies: ephymain_dep + ) + test('Encodings test', encodings_test) + + file_helpers_test = executable('test-ephy-file-helpers', + 'ephy-file-helpers-test.c', + dependencies: ephymain_dep + ) + test('File helpers test', file_helpers_test) + + history_test = executable('test-ephy-history', + 'ephy-history-test.c', + dependencies: ephymain_dep + ) + test('History test', history_test) + + location_entry_test = executable('test-location-entry', + 'ephy-location-entry-test.c', + dependencies: ephymain_dep + ) + test('Location entry test', location_entry_test) + + migration_test = executable('test-ephy-migration', + 'ephy-migration-test.c', + dependencies: ephymain_dep + ) + test('Migration test', migration_test) + + # FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=707220 + # session_test = executable('test-ephy-session', + # 'ephy-session-test.c', + # dependencies: ephytestutils_dep + # ) + # test('Session test', session_test) + + # FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=693369 + # FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=695703 + # FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=707217 + # shell_test = executable('test-ephy-shell', + # 'ephy-shell-test.c', + # dependencies: ephytestutils_dep + # ) + # test('Shell test', shell_test) + + # FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=762753 + # snapshot_service_test = executable('test-snapshot-service', + # 'ephy-snapshot-service-test.c', + # dependencies: ephymain_dep + # ) + # test('Snapshot service test', snapshot_service_test) + + sqlite_test = executable('test-ephy-sqlite', + 'ephy-sqlite-test.c', + dependencies: ephymain_dep + ) + test('SQLite test', sqlite_test) + + string_test = executable('test-ephy-string', + 'ephy-string-test.c', + dependencies: ephymain_dep + ) + test('String test', string_test) + + uri_helpers_test = executable('test-ephy-uri-helpers', + 'ephy-uri-helpers-test.c', + dependencies: ephymain_dep + ) + test('URI helpers test', uri_helpers_test) + + # FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=759256 + # web_app_utils_test = executable('test-ephy-web-app-utils', + # 'ephy-web-app-utils-test.c', + # dependencies: ephymain_dep + # ) + # test('Web app utils test', web_app_utils_test) + + # FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=780280 + # web_view_test = executable('test-ephy-web-view', + # 'ephy-web-view-test.c', + # dependencies: ephymain_dep + # ) + # test('Web view test', web_view_test) +endif |