Skip to content

Commit

Permalink
Add manifest for GnuCash
Browse files Browse the repository at this point in the history
  • Loading branch information
barthalion committed Jun 26, 2017
1 parent 746ea89 commit d00d11b
Show file tree
Hide file tree
Showing 3 changed files with 243 additions and 0 deletions.
49 changes: 49 additions & 0 deletions goffice-0.8-use-pkgconfig-for-pcre.patch
@@ -0,0 +1,49 @@
diff --git a/configure.in b/configure.in
index fd40d53b..32ceee6d 100644
--- a/configure.in
+++ b/configure.in
@@ -512,12 +512,30 @@ if test $gtk_disable_deprecated = yes; then
fi

if test "x$glib_has_G_REGEX_ERROR_STRAY_BACKSLASH" = "xno"; then
- dnl Check for working pcre
- AC_CHECK_HEADER(pcre.h,[], AC_MSG_ERROR([Header files for PCRE were not found]))
- AC_CHECK_LIB(pcre,pcre_compile2,[], AC_MSG_ERROR([The PCRE library is missing or too old]))
- AC_MSG_CHECKING([for UTF-8 support in pcre])
- if (pcretest -C 2>&1) | grep -i "^ *UTF-8 support" >/dev/null; then
- AC_MSG_RESULT(yes)
+ PKG_CHECK_MODULES(PCRE, libpcre)
+ AC_CACHE_CHECK([for Unicode support in PCRE],goffice_cv_pcre_has_unicode,[
+ goffice_save_CFLAGS="$CFLAGS"
+ goffice_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $PCRE_CFLAGS" LIBS="$PCRE_LIBS"
+ AC_TRY_RUN([#include <pcre.h>
+ int main () {
+ int support;
+ pcre_config (PCRE_CONFIG_UTF8, &support);
+ if (!support)
+ return 1;
+ pcre_config (PCRE_CONFIG_UNICODE_PROPERTIES, &support);
+ if (!support)
+ return 1;
+ return 0;
+ }],
+ goffice_cv_pcre_has_unicode=yes,
+ goffice_cv_pcre_has_unicode=no,
+ goffice_cv_pcre_has_unicode=yes)
+ CFLAGS="$goffice_save_CFLAGS"
+ LIBS="$goffice_save_LIBS"
+ ])
+
+ if test "$goffice_cv_pcre_has_unicode" = "yes"; then
LIBS="$LIBS -lpcre"
EXTRA_LIBS="$EXTRA_LIBS -lpcre"
else
@@ -525,7 +543,6 @@ if test "x$glib_has_G_REGEX_ERROR_STRAY_BACKSLASH" = "xno"; then
fi
fi

-
AC_DEFUN([GOFFICE_CHECK_FUNC],
[AC_CHECK_FUNC([$1],
[],
168 changes: 168 additions & 0 deletions org.gnucash.GnuCash.json
@@ -0,0 +1,168 @@
{
"app-id": "org.gnucash.GnuCash",
"runtime": "org.gnome.Platform",
"runtime-version": "3.24",
"sdk": "org.gnome.Sdk",
"command": "gnucash",
"rename-icon": "gnucash",
"rename-desktop-file": "gnucash.desktop",
"finish-args": [
"--share=ipc",
"--socket=x11",
"--socket=wayland",
"--socket=pulseaudio",
"--env=DCONF_USER_CONFIG_DIR=.config/dconf"
],
"modules": [
{
"name": "gc",
"sources": [
{
"type": "archive",
"url": "http://www.hboehm.info/gc/gc_source/gc-7.6.0.tar.gz",
"sha256": "a14a28b1129be90e55cd6f71127ffc5594e1091d5d54131528c24cd0c03b7d90"
}
]
},
{
"name": "libunistring",
"sources": [
{
"type": "archive",
"url": "https://ftp.gnu.org/gnu/libunistring/libunistring-0.9.7.tar.xz",
"sha256": "2e3764512aaf2ce598af5a38818c0ea23dedf1ff5460070d1b6cee5c3336e797"
}
]
},
{
"name": "guile",
"sources": [
{
"type": "archive",
"url": "https://ftp.gnu.org/gnu/guile/guile-2.0.14.tar.xz",
"sha256": "e8442566256e1be14e51fc18839cd799b966bc5b16c6a1d7a7c35155a8619d82"
}
]
},
{
"name": "libdbi",
"sources": [
{
"type": "archive",
"url": "http://downloads.sourceforge.net/project/libdbi/libdbi/libdbi-0.9.0/libdbi-0.9.0.tar.gz",
"sha256": "dafb6cdca524c628df832b6dd0bf8fabceb103248edb21762c02d3068fca4503"
}
]
},
{
"name": "libdbi-drivers",
"config-opts": [
"--with-dbi-libdir=/app/lib/",
"--with-dbi-incdir=/app/include/",
"--with-sqlite3"
],
"sources": [
{
"type": "archive",
"url": "http://downloads.sourceforge.net/project/libdbi-drivers/libdbi-drivers/libdbi-drivers-0.9.0/libdbi-drivers-0.9.0.tar.gz",
"sha256": "43d2eacd573a4faff296fa925dd97fbf2aedbf1ae35c6263478210c61004c854"
}
]
},
{
"name": "libart-gpl",
"sources": [
{
"type": "archive",
"url": "http://ftp.gnome.org/pub/GNOME/sources/libart_lgpl/2.3/libart_lgpl-2.3.21.tar.bz2",
"sha256": "fdc11e74c10fc9ffe4188537e2b370c0abacca7d89021d4d303afdf7fd7476fa"
}
]
},
{
"name": "libglade",
"sources": [
{
"type": "archive",
"url": "https://download.gnome.org/sources/libglade/2.6/libglade-2.6.4.tar.bz2",
"sha256": "64361e7647839d36ed8336d992fd210d3e8139882269bed47dc4674980165dec"
}
]
},
{
"name": "libgnomecanvas",
"sources": [
{
"type": "archive",
"url": "https://download.gnome.org/sources/libgnomecanvas/2.30/libgnomecanvas-2.30.3.tar.bz2",
"sha256": "859b78e08489fce4d5c15c676fec1cd79782f115f516e8ad8bed6abcb8dedd40"
}
]
},
{
"name": "libgsf",
"sources": [
{
"type": "archive",
"url": "https://ftp.gnome.org/pub/gnome/sources/libgsf/1.14/libgsf-1.14.41.tar.xz",
"sha256": "150b98586a1021d5c49b3d4d065d0aa3e3674ae31db131af5372499d2d3f08d3"
}
]
},
{
"name": "goffice",
"sources": [
{
"type": "archive",
"url": "https://download.gnome.org/sources/goffice/0.8/goffice-0.8.17.tar.xz",
"sha256": "165070beb67b84580afe80a8a100b674a81d553ab791acd72ac0c655f4fadb15"
},
{
"type": "patch",
"path": "goffice-0.8-use-pkgconfig-for-pcre.patch"
},
{
"type": "shell",
"commands": [
"rm -f configure"
]
},
{
"type": "script",
"commands": [
"autoconf"
],
"dest-filename": "autogen.sh"
}
]
},
{
"name": "webkitgtk",
"config-opts": [
"--disable-webkit2",
"--with-gtk=2.0"
],
"sources": [
{
"type": "archive",
"url": "https://webkitgtk.org/releases/webkitgtk-2.4.11.tar.xz",
"sha256": "588aea051bfbacced27fdfe0335a957dca839ebe36aa548df39c7bbafdb65bf7"
},
{
"type": "patch",
"path": "webkitgtk-2.4.9-abs.patch"
}
]
},
{
"name": "gnucash",
"sources": [
{
"type": "archive",
"url": "http://downloads.sourceforge.net/sourceforge/gnucash/gnucash-2.6.16.tar.gz",
"sha256": "84c79c333937ccfdcc0b94f9eec78b707e27043402560c3fbc85a3eefa211c56"
}
]
}
]
}
26 changes: 26 additions & 0 deletions webkitgtk-2.4.9-abs.patch
@@ -0,0 +1,26 @@
diff -Nur webkitgtk-2.4.9.orig/Source/WebCore/platform/gtk/GtkClickCounter.cpp webkitgtk-2.4.9/Source/WebCore/platform/gtk/GtkClickCounter.cpp
--- webkitgtk-2.4.9.orig/Source/WebCore/platform/gtk/GtkClickCounter.cpp 2015-05-20 03:03:24.000000000 -0600
+++ webkitgtk-2.4.9/Source/WebCore/platform/gtk/GtkClickCounter.cpp 2016-02-07 11:30:42.392686308 -0700
@@ -85,8 +85,8 @@
guint32 eventTime = getEventTime(event);

if ((event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS)
- || ((abs(buttonEvent->x - m_previousClickPoint.x()) < doubleClickDistance)
- && (abs(buttonEvent->y - m_previousClickPoint.y()) < doubleClickDistance)
+ || ((fabs(buttonEvent->x - m_previousClickPoint.x()) < doubleClickDistance)
+ && (fabs(buttonEvent->y - m_previousClickPoint.y()) < doubleClickDistance)
&& (eventTime - m_previousClickTime < static_cast<guint>(doubleClickTime))
&& (buttonEvent->button == m_previousClickButton)))
m_currentClickCount++;
diff -Nur webkitgtk-2.4.9.orig/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp webkitgtk-2.4.9/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp
--- webkitgtk-2.4.9.orig/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp 2015-05-20 03:03:24.000000000 -0600
+++ webkitgtk-2.4.9/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp 2016-02-07 11:49:36.384691005 -0700
@@ -659,7 +659,7 @@
if (!std::isfinite(time))
return String::fromUTF8(_("indefinite time"));

- int seconds = static_cast<int>(abs(time));
+ int seconds = static_cast<int>(fabs(time));
int days = seconds / (60 * 60 * 24);
int hours = seconds / (60 * 60);
int minutes = (seconds / 60) % 60;

0 comments on commit d00d11b

Please sign in to comment.