extra/libgda to 5.2.9-4

This commit is contained in:
Kevin Mihelich 2020-06-10 12:40:45 +00:00
parent 77df100164
commit 8dc6e50228
2 changed files with 79 additions and 5 deletions

View file

@ -0,0 +1,68 @@
diff --git a/libgda-report/RML/gda-report-rml-document.c b/libgda-report/RML/gda-report-rml-document.c
index 7bb13bc..3f905e5 100644
--- a/libgda-report/RML/gda-report-rml-document.c
+++ b/libgda-report/RML/gda-report-rml-document.c
@@ -189,61 +189,11 @@ gda_report_rml_document_new (GdaReportEngine *engine)
static gboolean
gda_report_rml_document_run_as_html (GdaReportDocument *doc, const gchar *filename, GError **error)
{
- static GMutex init_mutex;
- static gchar *converter = NULL;
-
- g_return_val_if_fail (GDA_IS_REPORT_RML_DOCUMENT (doc), FALSE);
- g_return_val_if_fail (filename && *filename, FALSE);
-
- g_mutex_lock (&init_mutex);
- if (!converter) {
- converter = g_find_program_in_path ("trml2html.py");
- if (!converter) {
- converter = gda_gbr_get_file_path (GDA_DATA_DIR, LIBGDA_ABI_NAME, "gda_trml2html", "trml2html.py", NULL);
- if (!g_file_test (converter, G_FILE_TEST_IS_EXECUTABLE)) {
- g_free (converter);
- converter = NULL;
- }
- }
- if (!converter) {
- g_set_error (error, 0, 0,
- _("Could not find the '%s' program"), "trml2html.py");
- g_mutex_unlock (&init_mutex);
- return FALSE;
- }
- }
- g_mutex_unlock (&init_mutex);
-
- return _gda_report_document_run_converter_path (doc, filename, converter, "trml2html", error);
+ return TRUE;
}
static gboolean
gda_report_rml_document_run_as_pdf (GdaReportDocument *doc, const gchar *filename, GError **error)
{
- static GMutex init_mutex;
- static gchar *converter = NULL;
-
- g_return_val_if_fail (GDA_IS_REPORT_RML_DOCUMENT (doc), FALSE);
- g_return_val_if_fail (filename && *filename, FALSE);
-
- g_mutex_lock (&init_mutex);
- if (!converter) {
- converter = g_find_program_in_path ("trml2pdf.py");
- if (!converter) {
- converter = gda_gbr_get_file_path (GDA_DATA_DIR, LIBGDA_ABI_NAME, "gda_trml2pdf", "trml2pdf.py", NULL);
- if (!g_file_test (converter, G_FILE_TEST_IS_EXECUTABLE)) {
- g_free (converter);
- converter = NULL;
- }
- }
- if (!converter) {
- g_set_error (error, 0, 0,
- _("Could not find the '%s' program"), "trml2pdf.py");
- g_mutex_unlock (&init_mutex);
- return FALSE;
- }
- }
- g_mutex_unlock (&init_mutex);
-
- return _gda_report_document_run_converter_path (doc, filename, converter, "trml2pdf", error);
+ return TRUE;
}

View file

@ -7,19 +7,21 @@
pkgname=(libgda libgda-{jdbc,mysql,postgres}) pkgname=(libgda libgda-{jdbc,mysql,postgres})
pkgver=5.2.9 pkgver=5.2.9
pkgrel=3 pkgrel=4
pkgdesc="Database access library" pkgdesc="Database access library"
url="https://www.gnome-db.org/" url="https://www.gnome-db.org/"
arch=(x86_64) arch=(x86_64)
license=(GPL) license=(GPL)
depends=(gtksourceview3 libxslt python2 libsecret graphviz goocanvas iso-codes libgee openssl) depends=(gtksourceview3 libxslt libsecret graphviz goocanvas iso-codes libgee openssl)
makedepends=(glade mariadb-libs postgresql-libs jdk8-openjdk intltool makedepends=(glade mariadb-libs postgresql-libs jdk8-openjdk intltool
gobject-introspection gtk-doc vala itstool gnome-common git) gobject-introspection gtk-doc vala itstool gnome-common git)
_commit=295fa78d29eee6dbbc5d07fd6884cb95f48d92e0 # tags/LIBGDA_5_2_9^0 _commit=295fa78d29eee6dbbc5d07fd6884cb95f48d92e0 # tags/LIBGDA_5_2_9^0
source=("git+https://gitlab.gnome.org/GNOME/libgda.git#commit=$_commit" source=("git+https://gitlab.gnome.org/GNOME/libgda.git#commit=$_commit"
fix-crash.diff) fix-crash.diff
0001-libgda-report-remove-trml2pdf-trml2html-functionalit.patch)
sha256sums=('SKIP' sha256sums=('SKIP'
'7eab1c7f5c11a87ce7a3e47c5c9058595f14c0b601daa6e0a32d797b708d97ba') '7eab1c7f5c11a87ce7a3e47c5c9058595f14c0b601daa6e0a32d797b708d97ba'
'd74a70bd7b8a7750049b123c8fc8e38c9b9c85b51f63c061998cf06b3cfc65af')
_apiver=5.0 _apiver=5.0
@ -36,7 +38,8 @@ prepare() {
cd $pkgname cd $pkgname
patch -Np1 -i ../fix-crash.diff patch -Np1 -i ../fix-crash.diff
find -name '*.py' -exec sed -i '1s/python$/&2/' {} + # remove converter functionality that relies on eight-year-old python2 scripts/taken from Fedora
patch -Np1 -i ../0001-libgda-report-remove-trml2pdf-trml2html-functionalit.patch
NOCONFIGURE=1 ./autogen.sh NOCONFIGURE=1 ./autogen.sh
} }
@ -71,6 +74,9 @@ package_libgda() {
mv "$pkgdir"/usr/lib/libgda-$_apiver/providers/gdaprovider-${_apiver}.jar \ mv "$pkgdir"/usr/lib/libgda-$_apiver/providers/gdaprovider-${_apiver}.jar \
"$pkgdir"/usr/bin/gda-list-jdbc-providers-${_apiver} \ "$pkgdir"/usr/bin/gda-list-jdbc-providers-${_apiver} \
"$srcdir/providers" "$srcdir/providers"
# remove eight-year-old python2 report converter scripts
rm -r "$pkgdir"/usr/share/libgda-5.0/gda_trml2{html,pdf}
} }
_packageprovider() { _packageprovider() {