Package Details: fldigi 4.2.05-1

Git Clone URL: https://aur.archlinux.org/fldigi.git (read-only, click to copy)
Package Base: fldigi
Description: Digital Modem Program for Amateur Radio
Upstream URL: http://w1hkj.com
Keywords: ham radio
Licenses: GPL-2.0-or-later
Submitter: Allan
Maintainer: not_anonymous
Last Packager: not_anonymous
Votes: 57
Popularity: 1.46
First Submitted: 2008-12-19 03:37 (UTC)
Last Updated: 2024-04-28 16:54 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 .. 14 Next › Last »

dviktor commented on 2020-07-09 09:18 (UTC) (edited on 2020-07-09 09:19 (UTC) by dviktor)

Well, I've found something interesting. Actually splitting package to examples and base doesn't break fldigi. But exclusion of some dependencies breaks it completely. I've compared lddtree output of /usr/bin/fldigi executable with fltk-1.3.5-1 and fltk-1.3.5-2 installed and that's the difference between two outputs (fldigi lacks these libs when fltk-1.3.5-2 is installed):

        libXinerama.so.1 => /usr/lib/libXinerama.so.1
        libXcursor.so.1 => /usr/lib/libXcursor.so.1
        libXrender.so.1 => /usr/lib/libXrender.so.1
        libXft.so.2 => /usr/lib/libXft.so.2
            libfreetype.so.6 => /usr/lib/libfreetype.so.6
                libbz2.so.1.0 => /usr/lib/libbz2.so.1.0
                libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0
                libfreetype.so.6 => !!! circular loop !!!
                    libgraphite2.so.3 => /usr/lib/libgraphite2.so.3
                    libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0
                        libpcre.so.1 => /usr/lib/libpcre.so.1
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1
            libexpat.so.1 => /usr/lib/libexpat.so.1

And this is modified PKGBUILD which works just fine (you could try it):

# Maintainer: David Runge <dvzrv@archlinux.org>

pkgbase=fltk
pkgname=('fltk' 'fltk-docs' 'fltk-examples')
pkgver=1.3.5
pkgrel=3
pkgdesc="Graphical user interface toolkit for X"
arch=('x86_64')
license=('custom' 'LGPL')
url="https://www.fltk.org/"
makedepends=('alsa-lib' 'cairo' 'cmake' 'desktop-file-utils' 'doxygen' 'glu' 'libjpeg'
'libxcursor' 'libxft' 'libxinerama' 'mesa' 'shared-mime-info')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${pkgbase}/${pkgbase}/archive/release-${pkgver}.tar.gz"
        "${pkgname}-fix-lib-mess.patch")
sha512sums=('35732df4d66573fdabf95f57069c5a2df63b0029d7b904d4ac02bd4c3ab3e5b287d4f06998b67129e8195c42c0b39e137e5d4f10baf4d73992077bb5ae0bef6c'
            '14592ba5616483df1b36f6e2b8309a3d1e898c5c4dcf0ddfbb374bbd1332eca6ba3490569fc8f903023a069b7771ed06baddef36140253e2e81eb409892bbba5')

prepare() {
  mv -v "${pkgbase}-release-${pkgver}" "${pkgbase}-${pkgver}"
  cd "${pkgbase}-${pkgver}"
  # fix bizarre renaming of shared libraries
  # https://github.com/fltk/fltk/issues/20
  patch -Np1 -i ../${pkgname}-fix-lib-mess.patch
}

build() {
  cd "${pkgbase}-${pkgver}"
  cmake -DCMAKE_INSTALL_PREFIX=/usr \
        -DFLTK_LIBDIR=/usr/lib \
        -DCMAKE_BUILD_TYPE=None \
        -DOPTION_CREATE_LINKS=ON \
        -DOPTION_BUILD_EXAMPLES=OFF \
        -DOPTION_BUILD_SHARED_LIBS=ON \
        -DOPTION_BUILD_HTML_DOCUMENTATION=ON \
        -DOPTION_INSTALL_HTML_DOCUMENTATION=ON \
        -Wno-dev \
        -B build \
        -S .
  make VERBOSE=1 -C build
  make -C build/documentation html
  cmake -DCMAKE_INSTALL_PREFIX=/usr \
        -DFLTK_LIBDIR=/usr/lib \
        -DCMAKE_BUILD_TYPE=None \
        -DOPTION_BUILD_EXAMPLES=ON \
        -Wno-dev \
        -B build-examples \
        -S .
  make VERBOSE=1 -C build-examples
}

package_fltk() {
  pkgdesc="Graphical user interface toolkit for X"
  depends=('cairo' 'desktop-file-utils' 'glu' 'hicolor-icon-theme' 'libjpeg'
  'libxcursor' 'libxft' 'libxinerama' 'shared-mime-info' 'xdg-utils')
  provides=('libfltk_images.so' 'libfltk_gl.so' 'libfltk_forms.so' 'libfltk.so')
  options=('!docs' 'staticlibs')
  cd "${pkgbase}-${pkgver}"
  make DESTDIR="${pkgdir}/" install -C build
  install -vDm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}/"
  # removing man pages of examples
  rm -rvf "${pkgdir}/usr/share/man/man6"
}

package_fltk-docs() {
  pkgdesc="Graphical user interface toolkit for X (documentation)"
  cd "${pkgbase}-${pkgver}"
  make DESTDIR="$pkgdir" install -C build/documentation html
  install -vDm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_fltk-examples() {
  pkgdesc="Graphical user interface toolkit for X (examples)"
  depends=('gcc-libs' 'glibc' 'hicolor-icon-theme' 'libasound.so' 'libjpeg'
  'libpng' 'libx11' 'libxext' 'libxfixes')
  options=('!docs')
  cd "${pkgbase}-${pkgver}"
  make DESTDIR="$pkgdir" install -C build-examples
  # example apps and integration files, that are not covered by make install
  for app in {blocks,checkers,sudoku}; do
    install -vDm 755 "build-examples/bin/examples/$app" -t "${pkgdir}/usr/bin/"
    install -vDm 644 "test/desktop/$app.desktop" \
      -t "${pkgdir}/usr/share/applications/"
    install -vDm 644 "test/desktop/$app-32.png" \
      "${pkgdir}/usr/share/icons/hicolor/32x32/apps/$app.png"
    install -vDm 644 "test/desktop/$app-128.png" \
      "${pkgdir}/usr/share/icons/hicolor/128x128/apps/$app.png"
  done
  install -vDm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}/"
  # removing any non-examples files
  rm -rfv "${pkgdir}/usr/bin/fltk-config" \
          "${pkgdir}/usr/include" \
          "${pkgdir}/usr/lib" \
          "${pkgdir}/usr/share/applications/fluid.desktop" \
          "${pkgdir}/usr/share/man/man"{1,3} \
          "${pkgdir}/usr/share/fltk" \
          "${pkgdir}/usr/share/icons/hicolor/"{48,64}* \
          "${pkgdir}/usr/share/mime"
  find "${pkgdir}" -type f -iname "*fluid*" -exec rm -rvf {} \;
}

I've requested re-opening of bug mentioned by @Dieter9 so will see if David will try to fix it

Dieter9 commented on 2020-07-09 08:08 (UTC)

I had the same problems like dviktor. It was clearly related to the update of the packet fltk. I wrote a bug-report for fltk: https://bugs.archlinux.org/task/67089?string=fltk&project=0&search_name=&type%5B0%5D=&sev%5B0%5D=&pri%5B0%5D=&due%5B0%5D=&reported%5B0%5D=&cat%5B0%5D=&status%5B0%5D=&percent%5B0%5D=&opened=&dev=&closed=&duedatefrom=&duedateto=&changedfrom=&changedto=&openedfrom=2020-06-01&openedto=&closedfrom=&closedto= But the Project Manager has denied the request. Later I fond the solution to compile the fltk package with makepkg on my computer. I informed the Project Manager of fltk again, but he does not care about. Perhaps someone can prove this correlation and could open a new Bug-Report for fltk.

not_anonymous commented on 2020-07-07 22:54 (UTC)

Um, since this DOES turn out to be an upstream issue and not (apparently) something to do the the current PKGBUILDs (both this one AND the fldigi-git); I un-flagged the "out-of-date". i.e The current PKGBUILD is correct v/v the upstream repo's indication of the current package. Anything else is either an ALPHA package or from the author's git repo; which is to say a TESTING version and NOT something I should be using for the "release" PKGBUILD.

Since this appears to be an issue that only affects SOME of the users (which have numerous ttf packages loaded up), I would suggest either using the fldigi-git PKGBUILD OR simply editing this PKGBUILD as you need for testing UNTIL SUCH TIME as the patching/corrections are FULLY tested.

mh00h commented on 2020-07-07 22:39 (UTC)

agreed not working for me either

dviktor commented on 2020-07-07 22:37 (UTC)

@mh00h I've backported patch but it doesn't solve the problem =\

--- src/dialogs/font_browser.cxx    2019-08-06 16:59:30.000000000 +0300
+++ src/dialogs/font_browser.cxx    2020-07-08 01:23:01.409752324 +0300
@@ -22,11 +22,16 @@

 #include <string>
 #include <cstdlib>
 #include <cstring>
 #include <cstdio>
+#include <iostream>
+#include <list>
+
+#include <stdlib.h>
 #include <stdint.h>
+#include <string.h>

 #include <FL/Fl.H>
 #include <FL/Fl_Color_Chooser.H>
 #include <FL/fl_draw.H>

@@ -36,10 +41,29 @@

 using namespace std;

 Font_Browser* font_browser;

+struct font_pair {
+    int  nbr;
+    std::string *name;
+    font_pair() {
+        nbr = 0;
+        name = 0;
+    }
+    ~font_pair() {
+        if (name) delete name;
+    }
+};
+
+static int  font_compare(const void *p1, const void *p2)
+{
+    std::string s1 = *((const font_pair *)p1)->name;
+    std::string s2 = *((const font_pair *)p2)->name;
+    return strcasecmp( s1.c_str(), s2.c_str() );
+}
+
 // Font Color selected

 void Font_Browser::ColorSelect()
 {
     unsigned char r, g, b;
@@ -71,20 +95,10 @@
    fb->fontsize = static_cast<int>(fb->txt_Size->value());
     }
     fb->box_Example->SetFont(fb->fontnbr, fb->fontsize, fb->fontcolor);
 }

-// Sort the font list
-void Font_Browser::FontSort()
-{
-    int size = lst_Font->size();
-     for ( int t = 1; t <= size - 1; t++ )
-         for ( int r = t+1; r <= size; r++ )
-             if ( strcasecmp(lst_Font->text(t), lst_Font->text(r)) > 0 ) 
-                lst_Font->swap(t,r);
-}
-
 // Font Name changed callback
 void Font_Browser::FontNameSelect()
 {
     int fn = lst_Font->value();
     if (!fn)
@@ -142,13 +156,16 @@
     btn_Color->down_box(FL_BORDER_BOX);
     btn_Color->color(FL_FOREGROUND_COLOR);
     btn_Color->labelcolor( fl_contrast(FL_BLACK, FL_FOREGROUND_COLOR));
     btn_Color->callback(fb_callback, this);

-    box_Example = new Preview_Box(5, 145, 420, 75, _("That crazy fox jumped over the dog again!\n"
-                 "ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789\n"
-                 "!\"#$%&'()*+,-./:;<=>?@@[\\]^_`{|}~"));
+    box_Example = new Preview_Box(5, 145, 420, 75, 
+            _(
+                "The quick red fox jumped over the lazy dog!\n\
+                ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789\n\
+                !\"#$%&'()*+,-./:;<=>?@@[\\]^_`{|}~"
+             ) );
     box_Example->box(FL_DOWN_BOX);
     box_Example->align(FL_ALIGN_WRAP|FL_ALIGN_CLIP|FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
     resizable(box_Example);

     set_modal();
@@ -157,31 +174,54 @@
 // Initializations 

     this->callback_ = 0;  // Initialize Widgets callback 
     this->data_ = 0;      // And the data

+    std::string fntname;
+    bool ok = true;
     numfonts =   Fl::set_fonts(0); // Nr of fonts available on the server

-    const char* name;
-    for(int i = 0; i < numfonts; i++) {
-   name = Fl::get_font_name((Fl_Font)i);
-   if (isalpha(*name))
-       lst_Font->add(name, reinterpret_cast<void *>(i));
+    font_pair *font_pairs = new font_pair[numfonts];
+
+    int j = 0;
+    for (int i = 0; i < numfonts; i++) {
+        fntname = Fl::get_font_name((Fl_Font)i);
+        ok = true;
+        for (size_t k = 0; k < fntname.length(); k++) {
+            if (fntname[k] <= ' ' || fntname[k] >= '~' || fntname[k] == '\\') { // disallowed chars in browser widget
+                ok = false;
+                break;
+            }
+        }
+        if (ok) {
+            font_pairs[j].name = new std::string;
+            *(font_pairs[j].name) = fntname;
+            font_pairs[j].nbr = i;
+            j++;
+        }
+    }
+
+    numfonts = j;
+    qsort(&font_pairs[0], numfonts, sizeof(font_pair), font_compare);
+
+    for (int i = 0; i < numfonts; i++) {
+        if ((*(font_pairs[i].name)).length()) {
+            lst_Font->add((*(font_pairs[i].name)).c_str(), reinterpret_cast<void *>(font_pairs[i].nbr));
+            //std::cout << *(font_pairs[i].name) << std::endl;
+        }
     }
-    FontSort();

     fontnbr = FL_HELVETICA;;
     fontsize = FL_NORMAL_SIZE; // Font Size to be used
     fontcolor = FL_FOREGROUND_COLOR;
     filter = ALL_TYPES;

     lst_Font->value(1);
     FontNameSelect();

-//!    Fl::focus(lst_Font);
-
     xclass(PACKAGE_NAME);
+    delete [] font_pairs;
 }

 void Font_Browser::fontNumber(Fl_Font n)
 {
     fontnbr = n;

mh00h commented on 2020-07-07 22:05 (UTC)

Maybe it's in alpha. http://www.w1hkj.com/alpha/fldigi/

dviktor commented on 2020-07-07 21:57 (UTC)

@mhooh could you please provide a link? I can't find any info in git...

mh00h commented on 2020-07-07 21:52 (UTC)

A new release came out today that is supposed to fix the font issue (4.1.13.24). Please could someone update this PKGBUILD to assist us with confirming the patch?

mh00h commented on 2020-07-07 17:01 (UTC)

I have the same problem and have traced it back to having too many fonts. Someone else has run into this too (https://primalcortex.wordpress.com/2019/03/02/fldigi-slow-startup-on-linux/?unapproved=18496&moderation-hash=4ce7ad0633dd1678f01be7050c5122c2#comment-18496). Can you confirm if this applies to you?