Package Details: dia-git 6823.8737d0f51-2

Git Clone URL: https://aur.archlinux.org/dia-git.git (read-only, click to copy)
Package Base: dia-git
Description: A GTK+ based diagram creation program (GIT VERSION)
Upstream URL: http://live.gnome.org/Dia
Licenses: GPL
Conflicts: dia
Provides: dia
Submitter: lilac
Maintainer: heavysink (lilac)
Last Packager: lilac
Votes: 1
Popularity: 0.000000
First Submitted: 2019-05-08 01:07 (UTC)
Last Updated: 2023-10-06 04:30 (UTC)

Latest Comments

1 2 3 Next › Last »

a821 commented on 2024-03-25 17:45 (UTC)

@marek22k I reported the dblatex bug today. It may take some time for it to get fixed. I posted a workaround in the comment below.

marek22k commented on 2024-03-25 17:19 (UTC)

Doesn't work for me:

[540/558] Generating doc/en/en-dia.pdf with a custom command
FAILED: doc/en/dia.pdf 
/usr/bin/dblatex -t pdf -q -o doc/en/dia.pdf ../doc/en/dia.xml
warning: failed to load external entity "/usr/xsl/latex_book_fast.xsl"
compilation error: file /tmp/tmpu15u78lu/custom.xsl line 6 element import
xsl:import : unable to load /usr/xsl/latex_book_fast.xsl
warning: failed to load external entity "/usr/xsl/common/mkdoclist.xsl"
compilation error: file doclist.xsl line 7 element import
xsl:import : unable to load /usr/xsl/common/mkdoclist.xsl
Unexpected error occured
Error: xsltproc failed
[544/558] Generating doc/eu/eu-dia_html with a custom command
Writing ch01.html for chapter(intro-chapter)
Writing ch02s02.html for sect1(starting-dia)
Writing ch02s03.html for sect1(quickstart-intro)
Writing ch02s04.html for sect1(creating-canvas)
Writing ch02s05.html for sect1(making-diagram)
Writing ch02s06.html for sect1(save-print-diagram)
Writing ch02s07.html for sect1(who-appeal-too)
Writing ch02.html for chapter(quickstart-chapter)
Writing ch03s02.html for sect1(gridlines)
Writing ch03s03.html for sect1(Rulers)
Writing ch03s04.html for sect1(background-color)
Writing ch03s05.html for sect1(zooming)
Writing ch03.html for chapter(canvas-chapter)
Writing ch04s02.html for sect1(using-objects)
Writing ch04s03.html for sect1(object-properties)
Writing ch04s04.html for sect1(colors)
Writing ch04.html for chapter(objects-chapter)
Writing ch05.html for chapter(basic-objects-chapter)
Writing ch06s02.html for sect1(special-object-categories)
Writing ch06.html for chapter(special-objects-chapter)
Writing ch07s02.html for sect1(how-to-select)
Writing ch07.html for chapter(selecting-chapter)
Writing ch08s02.html for sect1(loadsave-filetypes)
Writing ch08.html for chapter(loadsave-chapter)
Writing ch09.html for chapter(usage-customization)
Writing ch10s02.html for sect1(layers-basics)
Writing ch10s03.html for sect1(viewing-layers)
Writing ch10.html for chapter(layers-chapter)
Writing ch11.html for chapter(authors-chap)
Writing ch12.html for chapter(license-chapter)
Writing index.html for book(index)
[547/558] Generating doc/de/de-dia_html with a custom command
Writing ch01.html for chapter(intro-chapter)
Writing ch02s02.html for sect1(starting-dia)
Writing ch02s03.html for sect1(creating-canvas)
Writing ch02s04.html for sect1(making-diagram)
Writing ch02s05.html for sect1(save-print-diagram)
Writing ch02s06.html for sect1(quickstart-commandline)
Writing ch02s07.html for sect1(who-appeal-too)
Writing ch02.html for chapter(quickstart-chapter)
Writing ch03s02.html for sect1(gridlines)
Writing ch03s03.html for sect1(Rulers)
Writing ch03s04.html for sect1(background-color)
Writing ch03s05.html for sect1(zooming)
Writing ch03s06.html for sect1(view-menu)
Writing ch03s07.html for sect1(undo-redo)
Writing ch03.html for chapter(canvas-chapter)
Writing ch04s02.html for sect1(using-objects)
Writing ch04s03.html for sect1(object-properties)
Writing ch04s04.html for sect1(colors)
Writing ch04s05.html for sect1(diagram-tree)
Writing ch04.html for chapter(objects-chapter)
Writing ch05.html for chapter(basic-objects-chapter)
Writing ch06.html for chapter(special-objects-chapter)
Writing ch07s02.html for sect1(how-to-select)
Writing ch07s03.html for sect1(working-with-selected)
Writing ch07.html for chapter(selecting-chapter)
Writing ch08s02.html for sect1(loadsave-filetypes)
Writing ch08.html for chapter(loadsave-chapter)
Writing ch09.html for chapter(authors-chap)
Writing ch10.html for chapter(license-chapter)
Writing apa.html for appendix(gfdl)
Writing index.html for book(index)
[551/558] Generating doc/en/en-dia_html with a custom command
Writing ch01s02.html for sect1(news)
Writing ch01.html for chapter(intro-chapter)
Writing ch02s02.html for sect1(starting-dia)
Writing ch02s03.html for sect1(creating-canvas)
Writing ch02s04.html for sect1(making-diagram)
Writing ch02s05.html for sect1(save-print-diagram)
Writing ch02s06.html for sect1(quickstart-commandline)
Writing ch02s07.html for sect1(who-appeal-too)
Writing ch02.html for chapter(quickstart-chapter)
Writing ch03s02.html for sect1(gridlines)
Writing ch03s03.html for sect1(Rulers)
Writing ch03s04.html for sect1(background-color)
Writing ch03s05.html for sect1(zooming)
Writing ch03s06.html for sect1(view-menu)
Writing ch03s07.html for sect1(undo-redo)
Writing ch03.html for chapter(canvas-chapter)
Writing ch04s02.html for sect1(using-objects)
Writing ch04s03.html for sect1(object-properties)
Writing ch04s04.html for sect1(colors)
Writing ch04s05.html for sect1(diagram-tree)
Writing ch04.html for chapter(objects-chapter)
Writing ch05.html for chapter(basic-objects-chapter)
Writing ch06.html for chapter(special-objects-chapter)
Writing ch07s02.html for sect1(how-to-select)
Writing ch07s03.html for sect1(working-with-selected)
Writing ch07.html for chapter(selecting-chapter)
Writing ch08s02.html for sect1(loadsave-filetypes)
Writing ch08.html for chapter(loadsave-chapter)
Writing ch09.html for chapter(usage-customization)
Writing ch10s02.html for sect1(layers-basics)
Writing ch10s03.html for sect1(viewing-layers)
Writing ch10.html for chapter(layers-chapter)
Writing ch11s02.html for sect1(custom-shapes-shapes)
Writing ch11s03.html for sect1(custom-chapes-shape-desc)
Writing ch11s04.html for sect1
Writing ch11s05.html for sect1
Writing ch11s06.html for sect1(custom-shapes-sheets)
Writing ch11s07.html for sect1(custom-shapes-managing)
Writing ch11s08.html for sect1(custom-shapes-code)
Writing ch11.html for chapter(custom-shapes-chapter)
Writing re01.html for refentry
Writing ch12s02.html for sect1(commandline-manpage)
Writing ch12.html for chapter(commandline)
Writing ch13.html for chapter(authors-chap)
Writing ch14.html for chapter(license-chapter)
Writing index.html for book(index)
[557/558] Merging translations for sheets/EDPC.sheet
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: dia-git-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
dia-git - exit status 4

a821 commented on 2024-03-23 11:44 (UTC)

@Richardk2n is correct. The issue/regression seems to be dblatex. I found two workarounds:

  1. Downgrade dblatex and use version 0.3.12-7 (can be found in the archive) or
  2. patch /usr/bin/dblatex: line 5 should be package_base = os.path.join(os.path.dirname(sys.argv[0]), "../share/dblatex")

RAMChYLD commented on 2024-03-10 09:49 (UTC)

@Richardk2n Thanks for the heads up!

Richardk2n commented on 2024-03-08 09:26 (UTC)

@RAMChYLD The package shipping latex_book_fast.xsl and mkdoclist.xsl is dblatex, which recently got updated. The files still exist but on a different path (/usr/share/dblatex/xsl/ instead of /usr/xsl/)

RAMChYLD commented on 2024-03-07 21:01 (UTC)

I found two issues with the current dia upstream. This might not be necessary in the future once it is future once it is fixed but I hope it will come in handy for those who needs Dia but run into trouble building it.

The first issue is it's not compatible with the current version of OGDF, Elderberry. Apparently Elderberry no longer ships with some headers that Dia wants to use, breaking it. I have yet to investigate what is the last version of OGDF Dia will build with, but what I can see is that it can be built without OGDF as a workaround for the time being.

The second issue is that the docs depend on some xsl files that no longer exists. For this I edited the PKGBUILD manually to set -Ddoc=false. I'm not sure what packages holds those files.

hildigerr commented on 2023-10-22 20:17 (UTC) (edited on 2023-10-24 00:27 (UTC) by hildigerr)

Here are a couple patches to enable XDG Base Directory Specification compliance.

0-the_asnwer_is_no.patch:

diff --git a/app/app_procs.c b/app/app_procs.c
index 3199a8dea..86964f7e0 100644
--- a/app/app_procs.c
+++ b/app/app_procs.c
@@ -1041,24 +1041,10 @@ create_user_dirs (void)
 {
   gchar *dir, *subdir;

-#ifdef G_OS_WIN32
-  /* not necessary to quit the program with g_error, everywhere else
-   * dia_config_filename appears to be used. Spit out a warning ...
-   */
-  if (!g_get_home_dir ()) {
-    g_warning (_("Could not create per-user Dia configuration directory"));
-    return; /* ... and return. Probably removes my one and only FAQ. --HB */
-  }
-#endif
-  dir = g_strconcat (g_get_home_dir (), G_DIR_SEPARATOR_S ".dia", NULL);
+  dir = dia_config_filename (NULL);
   if (g_mkdir (dir, 0755) && errno != EEXIST) {
-#ifndef G_OS_WIN32
-    g_critical (_("Could not create per-user Dia configuration directory"));
-    exit (1);
-#else /* HB: it this really a reason to exit the program on *nix ? */
-    g_warning (_("Could not create per-user Dia configuration directory. Please make "
-                 "sure that the environment variable HOME points to an existing directory."));
-#endif
+    g_warning (_("Could not create per-user Dia configuration directory"));
+    return;
   }

   /* it is no big deal if these directories can't be created */

1-xdg_data_home.patch:

index 6440f9e71..162d15a81 100644
--- a/lib/dia_dirs.c
+++ b/lib/dia_dirs.c
@@ -119,7 +119,7 @@ dia_get_locale_directory (void)
  * dia_config_filename:
  * @subfile: Name of the subfile.
  *
- * Get the name of a file under the Dia config directory. If no home
+ * Get the name of a file under the Dia config directory. If no config
  * directory can be found, uses a temporary directory.
  *
  * Returns: A string with the full path of the desired file. This string
@@ -132,12 +132,12 @@ dia_config_filename (const char *subfile)
 {
   const char *homedir;

-  homedir = g_get_home_dir ();
+  homedir = g_get_user_data_dir ();
   if (!homedir) {
     homedir = g_get_tmp_dir (); /* put config stuff in /tmp -- not ideal, but
                                  * we should not reach this state */
   }
-  return g_build_filename (homedir, ".dia", subfile, NULL);
+  return g_build_filename (homedir, "dia", subfile, NULL);
 }

mistersmee commented on 2023-09-28 12:58 (UTC) (edited on 2023-09-28 13:00 (UTC) by mistersmee)

It makes no sense to flag a -git package out of date, without there needing changes to fix sources moving or actual breakage fixing, which in this case, it doesn't, the package builds fine as of 2023-09-28, so can it please be unflagged?

bertieb commented on 2023-09-22 13:11 (UTC) (edited on 2023-09-22 13:49 (UTC) by bertieb)

This currently fails nearly the end of the ninja build process:

Writing index.html for book(index)
[563/565] Generating sheets/BPMN.sheet with a custom command
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
    Aborting...
:: Unable to build dia-git - makepkg exited with code: 4

It does not report what failed in the subcommand, which seems to be defined in build.ninja as (I am using trizen as an AUR helper, datadirs may be different):

build sheets/BPMN.sheet: CUSTOM_COMMAND ../sheets/BPMN.sheet
 COMMAND = /usr/bin/meson --internal msgfmthelper --msgfmt=/usr/bin/msgfmt --datadirs=/tmp/trizen-bertieb/dia-git/src/dia/po ../sheets/BPMN.sheet sheets/BPMN.sheet xml /tmp/trizen-bertieb/dia-git/src/dia/po
 description = Generating$ sheets/BPMN.sheet$ with$ a$ custom$ command

Interestingly, running that command by itself seems to work- it generates sheets/BPMN.sheet and exits with status 0.

The issue /seems/ to be building dia.pdf, dblatex seems broken (running it gives "ModuleNotFoundError: No module named 'dbtexmf').

I decided it wasn't worth the time figuring out how to fix dblatex (a gentoo bug implies later python versions break it: https://bugs.gentoo.org/723412), so I decided to skip building the docs by adding the following to the prepare() step in PKGBUILD sed -i '159,161d' meson.build.

There's probably a better way of doing this as 'docs' are an option that meson should check for, but no option (I tried removing the 'docs' option or setting '!docs' (followed by meson setup --wipe) could persuade meson not to build it.

haawda commented on 2022-11-01 15:30 (UTC)

I thing the line numbers are partially wrong, try this:

--- plug-ins/pdf/pdf-import.cpp 2022-05-25 17:35:28.000000000 +0200
+++ plug-ins/pdf/pdf-import.cpp 2022-09-27 20:25:47.183817900 +0200
@@ -152,13 +152,12 @@ public :
   void
   updateLineDash (GfxState *state)
   {
-    double *dashPattern;
-    int dashLength;
-    double dashStart;
-
-    state->getLineDash (&dashPattern, &dashLength, &dashStart);
-    this->dash_length = dashLength ? dashPattern[0] * scale : 1.0;
-
+    const double *dashPattern=NULL;
+    int dashLength=0;
+    double dashStart=0;
+    const std::vector<double> &dash = state->getLineDash(&dashStart);  // > Poppler 22.09 ...
+    dashPattern = dash.data();
+    dashLength = dash.size();
     if (dashLength == 0)
       this->line_style = DIA_LINE_STYLE_SOLID;
     else if (dashLength > 5)
@@ -318,10 +317,10 @@ public :
     //FIXME: Dia is really unhappy about zero size fonts
     if (!(state->getFontSize() > 0.0))
       return;
-    GfxFont *f = state->getFont();
-
+   const std::shared_ptr<GfxFont> f = state->getFont();  // poppler 22.05 ... header changed
+   gconstpointer f1 = &f;  // GLib typedef const void * gconstpointer;
     // instead of building the same font over and over again
-    if (g_hash_table_lookup (this->font_map, f)) {
+    if (g_hash_table_lookup (this->font_map, f1)) {
       ++font_map_hits;
       return;
     }
@@ -333,8 +332,9 @@ public :
     gchar *family = g_strdup (f->getFamily() ? f->getFamily()->c_str() : "sans");

     // we are (not anymore) building the same font over and over again
+    f1  = &f;
     g_print ("Font 0x%x: '%s' size=%g (* %g)\n",
-        GPOINTER_TO_INT (f), family, state->getTransformedFontSize(), scale);
+        GPOINTER_TO_INT (f1), family, state->getTransformedFontSize(), scale);

     // now try to make a fontname Dia/Pango can cope with
     // strip style postfix - we already have extracted the style bits above
@@ -353,8 +353,9 @@ public :
     if (fm[0] != 0)
       fsize *= fabs(fm[3] / fm[0]);
     font = dia_font_new (family, style, fsize * scale / 0.8);
-
-    g_hash_table_insert (this->font_map, f, font);
+   f1  = &f;
+   gpointer f2 = (gpointer)f1;  // GLib typedef void* gpointer;
+    g_hash_table_insert (this->font_map, f2, font);
     g_free (family);
   }
   void updateTextShift(GfxState *state, double shift)
@@ -721,11 +722,15 @@ DiaOutputDev::drawString(GfxState *state
     return;
   if (!(state->getFontSize() > 0.0))
     return;
-  font = (DiaFont *)g_hash_table_lookup (this->font_map, state->getFont());
+gconstpointer f_1 = &state->getFont();
+// g_print ("f_1 %p\n", f_1);
+font = (DiaFont *)g_hash_table_lookup (this->font_map, f_1);
+//  font = (DiaFont *)g_hash_table_lookup (this->font_map, &(state->getFont()));

   // we have to decode the string data first
   {
-    GfxFont *f = state->getFont();
+//    GfxFont *f = state->getFont();
+   const std::shared_ptr<GfxFont> f = state->getFont();
     const char *p = s->c_str();
     CharCode code;
     int   j = 0, m, n;
@@ -870,8 +875,10 @@ import_pdf(const gchar *filename, Diagra
   std::unique_ptr<PDFDoc> doc;
   GooString *fileName = new GooString(filename);
   // no passwords yet
-  GooString *ownerPW = NULL;
-  GooString *userPW = NULL;
+  //GooString *ownerPW = NULL;
+  //GooString *userPW = NULL;
+  const std::optional<GooString> ownerPW;
+  const std::optional<GooString> userPW;
   gboolean ret = FALSE;

   // without this we will get strange crashes (at least with /O2 build)
@@ -899,7 +906,8 @@ import_pdf(const gchar *filename, Diagra
     delete diaOut;
     ret = TRUE;
   }
-  delete fileName;
+ doc.reset();
+ delete fileName;

   return ret;
 }