pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils



Module Name:    pkgsrc
Committed By:   hauke
Date:           Mon Apr 28 12:16:35 UTC 2025

Modified Files:
        pkgsrc/sysutils: Makefile
Added Files:
        pkgsrc/sysutils/qtl866: DESCR Makefile PLIST distinfo
        pkgsrc/sysutils/qtl866/patches: patch-binhexedit patch-mainwindow.cpp
            patch-mainwindow.h patch-miniprohex

Log Message:
Qtl866 provides a GUI for the MiniPRO TL866, MiniPRO TL866CS and
MiniPRO TL866A programmers.

It utilizes the command-line based minipro tool and supports more than
13000 target devices, including AVRs, PICs, various BIOSes and EEPROMs.


To generate a diff of this commit:
cvs rdiff -u -r1.1156 -r1.1157 pkgsrc/sysutils/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/qtl866/DESCR \
    pkgsrc/sysutils/qtl866/Makefile pkgsrc/sysutils/qtl866/PLIST \
    pkgsrc/sysutils/qtl866/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/qtl866/patches/patch-binhexedit \
    pkgsrc/sysutils/qtl866/patches/patch-mainwindow.cpp \
    pkgsrc/sysutils/qtl866/patches/patch-mainwindow.h \
    pkgsrc/sysutils/qtl866/patches/patch-miniprohex

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/Makefile
diff -u pkgsrc/sysutils/Makefile:1.1156 pkgsrc/sysutils/Makefile:1.1157
--- pkgsrc/sysutils/Makefile:1.1156     Mon Apr 21 15:59:40 2025
+++ pkgsrc/sysutils/Makefile    Mon Apr 28 12:16:35 2025
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1156 2025/04/21 15:59:40 wiz Exp $
+# $NetBSD: Makefile,v 1.1157 2025/04/28 12:16:35 hauke Exp $
 #
 
 COMMENT=       System utilities
@@ -640,6 +640,7 @@ SUBDIR+=    qlogtools
 SUBDIR+=       qmail-dovecot-checkpassword
 SUBDIR+=       qmediamanager
 SUBDIR+=       qpasswd
+SUBDIR+=       qtl866
 SUBDIR+=       radeontool
 SUBDIR+=       radmind
 SUBDIR+=       rcm

Added files:

Index: pkgsrc/sysutils/qtl866/DESCR
diff -u /dev/null pkgsrc/sysutils/qtl866/DESCR:1.1
--- /dev/null   Mon Apr 28 12:16:35 2025
+++ pkgsrc/sysutils/qtl866/DESCR        Mon Apr 28 12:16:35 2025
@@ -0,0 +1,5 @@
+Qtl866 provides a GUI for the MiniPRO TL866, MiniPRO TL866CS and
+MiniPRO TL866A programmers.
+
+It utilizes the command-line based minipro tool and supports more than
+13000 target devices, including AVRs, PICs, various BIOSes and EEPROMs.
Index: pkgsrc/sysutils/qtl866/Makefile
diff -u /dev/null pkgsrc/sysutils/qtl866/Makefile:1.1
--- /dev/null   Mon Apr 28 12:16:35 2025
+++ pkgsrc/sysutils/qtl866/Makefile     Mon Apr 28 12:16:35 2025
@@ -0,0 +1,66 @@
+# $NetBSD: Makefile,v 1.1 2025/04/28 12:16:35 hauke Exp $
+
+DISTNAME=      ${GITHUB_PROJECT}-${PKGVER}
+PKGVER=                0.3.0.53
+CATEGORIES=    x11
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=wd5gnr/}
+GITHUB_PROJECT=        qtl866
+GITHUB_TAG=    1173c3e048c9b777611b379892f397dd5c64a261
+EXTRACT_SUFX=  .zip
+
+MAINTAINER=    hauke%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/wd5gnr/qtl866/
+COMMENT=       GUI driver for minipro EPROM/Device programmer software
+LICENSE=       gnu-gpl-v3
+
+WRKSRC=                ${WRKDIR}/${GITHUB_PROJECT}-${GITHUB_TAG}
+USE_LANGUAGES= c++
+
+TOOL_DEPENDS+= qt5-qttools-[0-9]*:../../x11/qt5-qttools
+DEPENDS+=      minipro-[0-9]*:../../sysutils/minipro
+DEPENDS+=      ghex-[0-9]*:../../editors/ghex
+#DEPENDS+=     hexedit-[0-9]*:../../editors/hexedit
+
+# Since we do not have bless in pkgsrc
+HEXEDIT=       ghex
+
+REPLACE_SH=    binhexedit miniprohex
+
+ICONDIR=               share/icons/hicolor/scalable/apps
+DOCDIR=                        share/doc/qtl866
+
+INSTALLATION_DIRS+=    bin share/applications ${DOCDIR} ${ICONDIR}
+
+SUBST_CLASSES=         hexedit
+SUBST_STAGE.hexedit=   pre-configure
+SUBST_MESSAGE.hexedit= Setting hex editor
+SUBST_FILES.hexedit=   binhexedit
+SUBST_VARS.hexedit=    HEXEDIT
+
+.include "../../mk/bsd.prefs.mk"
+
+# Apparently, USE_TOOLS+=qmake is not a thing
+pre-configure:
+       ${LN} -sf ${QTDIR}/bin/qmake ${BUILDLINK_DIR}/bin/qmake
+
+do-configure:
+       cd ${WRKSRC} && qmake
+
+do-install:
+.for ff in qtl866 binhexedit miniprohex
+       ${INSTALL_PROGRAM} ${WRKSRC}/${ff} \
+               ${DESTDIR}${PREFIX}/bin/${ff}
+.endfor
+       ${INSTALL_DATA} ${WRKSRC}/qtl866.svg \
+               ${DESTDIR}${PREFIX}/${ICONDIR}/qtl866.svg
+       ${INSTALL_DATA} ${WRKSRC}/qtl866.desktop \
+               ${DESTDIR}${PREFIX}/share/applications/qtl866.desktop
+.for ff in LICENSE README.md screenshot.png
+       ${INSTALL_DATA} ${WRKSRC}/${ff} \
+               ${DESTDIR}${PREFIX}/${DOCDIR}/${ff}
+.endfor
+
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../x11/qt5-qtbase/buildlink3.mk"
+
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/sysutils/qtl866/PLIST
diff -u /dev/null pkgsrc/sysutils/qtl866/PLIST:1.1
--- /dev/null   Mon Apr 28 12:16:35 2025
+++ pkgsrc/sysutils/qtl866/PLIST        Mon Apr 28 12:16:35 2025
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1 2025/04/28 12:16:35 hauke Exp $
+bin/binhexedit
+bin/miniprohex
+bin/qtl866
+share/applications/qtl866.desktop
+share/doc/qtl866/LICENSE
+share/doc/qtl866/README.md
+share/doc/qtl866/screenshot.png
+share/icons/hicolor/scalable/apps/qtl866.svg
Index: pkgsrc/sysutils/qtl866/distinfo
diff -u /dev/null pkgsrc/sysutils/qtl866/distinfo:1.1
--- /dev/null   Mon Apr 28 12:16:35 2025
+++ pkgsrc/sysutils/qtl866/distinfo     Mon Apr 28 12:16:35 2025
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1 2025/04/28 12:16:35 hauke Exp $
+
+BLAKE2s (qtl866-0.3.0.53-1173c3e048c9b777611b379892f397dd5c64a261.zip) = ac3c594f4cc10a4c66c97c2b4cc29df6910452bd7cb666e68d38044ac7aa9ce5
+SHA512 (qtl866-0.3.0.53-1173c3e048c9b777611b379892f397dd5c64a261.zip) = 
5234645d0702d3f8d1d636f8408c4a4b57ce5cff8bb3db856e2509a7f8e31e474df984b3941ed8c76dd46259799dc3ef3f2522dc8283b7edbace29aaa8505e39
+Size (qtl866-0.3.0.53-1173c3e048c9b777611b379892f397dd5c64a261.zip) = 128502 bytes
+SHA1 (patch-binhexedit) = a2ce11b6421445f370806c177da05b0a484f756a
+SHA1 (patch-mainwindow.cpp) = b769436c0d66ea623234671e4129d637122265f5
+SHA1 (patch-mainwindow.h) = cb9cebe2920e9c591749e536ce73a2a3f6a5ce67
+SHA1 (patch-miniprohex) = 6db521e78d6b71af472045b297323e65e0a36a14

Index: pkgsrc/sysutils/qtl866/patches/patch-binhexedit
diff -u /dev/null pkgsrc/sysutils/qtl866/patches/patch-binhexedit:1.1
--- /dev/null   Mon Apr 28 12:16:35 2025
+++ pkgsrc/sysutils/qtl866/patches/patch-binhexedit     Mon Apr 28 12:16:35 2025
@@ -0,0 +1,85 @@
+$NetBSD: patch-binhexedit,v 1.1 2025/04/28 12:16:35 hauke Exp $
+
+Un-bashify
+
+Make hex editor configurable - upstream's choice bless has not been
+packaged, yet
+
+--- binhexedit.orig    2017-04-05 04:34:13.000000000 +0000
++++ binhexedit
+@@ -1,5 +1,5 @@
+ #!/bin/bash
+-if [ $# == 0 ]
++if [ $# = 0 ]
+ then
+    cat << EOF
+ binedit by Al Williams http://www.awce.com
+@@ -25,8 +25,8 @@ all will work! See https://bugs.launchpa
+ EOF
+ fi
+ 
+-BEDITOR=bless
+-# Options for bless
++BEDITOR=@HEXEDIT@
++# Options for @HEXEDIT@
+ OPTS=
+ # The -r or -w
+ RWOPT=
+@@ -43,7 +43,7 @@ TMPDIR=/tmp
+ while [ $# != 0 ]
+ do
+ # note --obs x becomes --obs=x
+-  if [ "$1" == "--obs" ]
++  if [ "$1" = "--obs" ]
+   then
+       SRECOPTS="$SRECOPTS $1=$2"
+       shift
+@@ -51,11 +51,11 @@ do
+       continue
+   fi
+ # note --line-length x becomes --line-length=x
+-  if [ "$1" == "--line-length" ]
++  if [ "$1" = "--line-length" ]
+   then
+       SRECOPTS="$SRECOPTS $1=$2"
+   fi
+-  if [ "$1" == "--unfill" ]
++  if [ "$1" = "--unfill" ]
+   then
+       SRECOPTS="$SRECOPTS $1 $2 $3"
+       shift
+@@ -63,14 +63,14 @@ do
+       shift
+       continue
+   fi
+-  if [ "$1" == "--offset" ] 
++  if [ "$1" = "--offset" ] 
+   then
+       SRECOPTS="$SRECOPTS $1 $2"
+       shift
+       shift
+       continue
+   fi
+-  if [ "$1" == "-r" ] 
++  if [ "$1" = "-r" ] 
+   then
+     RWOPT=-r
+     shift
+@@ -106,7 +106,7 @@ PRECVT="srec_cat $FN --motorola -o $SREC
+ POSTCVT="srec_cat $RFILE --binary $SRECOPTS -o $FN --motorola"
+ ;;
+ txt)  # special case
+-exec ${EDITOR:-nano} "$FN"
++exec ${EDITOR:-vi} "$FN"
+ ;;
+ *) 
+ # Who knows?
+@@ -115,7 +115,7 @@ PRECVT=
+ POSTCVT=
+ esac
+ $PRECVT
+-bless $OPTS $RFILE
++${BEDITOR} $OPTS $RFILE
+ $POSTCVT
+ 
+ 
Index: pkgsrc/sysutils/qtl866/patches/patch-mainwindow.cpp
diff -u /dev/null pkgsrc/sysutils/qtl866/patches/patch-mainwindow.cpp:1.1
--- /dev/null   Mon Apr 28 12:16:35 2025
+++ pkgsrc/sysutils/qtl866/patches/patch-mainwindow.cpp Mon Apr 28 12:16:35 2025
@@ -0,0 +1,93 @@
+$NetBSD: patch-mainwindow.cpp,v 1.1 2025/04/28 12:16:35 hauke Exp $
+
+Get devices list directly from minipro tool 
+From <https://github.com/wd5gnr/qtl866/pull/15>
+
+fix: signal and slot name, from 
+<https://github.com/wd5gnr/qtl866/commit/a5ce75138005a799562e353ec0fcc7cf31b6b268>
+
+--- mainwindow.cpp.orig        2017-04-05 04:34:13.000000000 +0000
++++ mainwindow.cpp
+@@ -45,13 +45,20 @@ MainWindow::MainWindow(QWidget *parent) 
+     QMainWindow(parent),
+     ui(new Ui::MainWindow)
+ {
+-    unsigned int i;
+     QString selected;
+     QSettings settings;
+-    selected=settings.value("session/seldevice","PIC16F886").toString();
++    QString cmd=settings.value("options/command","minipro").toString();
++    selected=settings.value("session/seldevice","PIC16F88").toString();
+     ui->setupUi(this);
+-    for (i=0;i<sizeof(devnames)/sizeof(devnames[0]);i++)
+-        ui->device->addItem(devnames[i],devnames[i]);
++    QProcess proc(this);
++    proc.setReadChannel(QProcess::StandardOutput);
++    proc.start(cmd, QStringList() << "-l");
++    proc.waitForFinished();
++    devices=QString(proc.readAllStandardOutput()).split("\n");
++    if(devices.empty()){
++        QMessageBox::critical(this,tr("Error"),tr("Can't get supported devices from minipro"));
++    }
++    ui->device->addItems(devices);
+     ui->device->setCurrentText(selected);
+     ui->filename->setText(settings.value("session/filename","").toString());
+     ui->useisp->setChecked(settings.value("session/isp",false).toBool());
+@@ -124,17 +131,17 @@ void MainWindow::shellAppend(QString col
+     statusBar()->showMessage(text.split('\n').last());
+ }
+ 
+-void MainWindow::on_process_stderr()
++void MainWindow::onProcessStderr()
+ {
+     shellAppend("red", slave->readAllStandardError());
+ }
+ 
+-void MainWindow::on_process_stdout()
++void MainWindow::onProcessStdout()
+ {
+     shellAppend("black", slave->readAllStandardOutput());
+ }
+ 
+-void MainWindow::on_process_error(QProcess::ProcessError)
++void MainWindow::onProcessError(QProcess::ProcessError)
+ {
+     QProcess *process = qobject_cast<QProcess*>(sender());
+     QMessageBox error(this);
+@@ -147,7 +154,6 @@ void MainWindow::on_process_error(QProce
+ 
+ void MainWindow::on_exec_clicked()
+ {
+-    unsigned int i;
+     bool found=false;
+     bool reading=true;
+     QSettings settings;
+@@ -163,13 +169,8 @@ void MainWindow::on_exec_clicked()
+     }
+     // TODO: detect .hex .srec etc and convert to temporary file on write (or could do this in script)
+     devname=ui->device->currentText();
+-    for (i=0;i<sizeof(devnames)/sizeof(devnames[0]);i++)
+-    {
+-        if (!strcmp(devname.toStdString().c_str(),devnames[i]))
+-        {
+-            found=true;
+-            break;
+-        }
++    if(devices.contains(devname)){
++        found=true;
+     }
+     if (!found)
+     {
+@@ -231,9 +232,9 @@ void MainWindow::on_exec_clicked()
+     ui->controls->setEnabled(false);
+     slave=new QProcess(this);
+     connect(slave,SIGNAL(finished(int)),this,SLOT(on_finished(int)));
+-    connect(slave, SIGNAL(error(QProcess::ProcessError)), this, SLOT(on_process_error(QProcess::ProcessError)));
+-    connect(slave, SIGNAL(readyReadStandardOutput()), this, SLOT(on_process_stdout()));
+-    connect(slave, SIGNAL(readyReadStandardError()), this, SLOT(on_process_stderr()));
++    connect(slave, SIGNAL(errorOccurred(QProcess::ProcessError)), this, SLOT(onProcessError(QProcess::ProcessError)));
++    connect(slave, SIGNAL(readyReadStandardOutput()), this, SLOT(onProcessStdout()));
++    connect(slave, SIGNAL(readyReadStandardError()), this, SLOT(onProcessStderr()));
+ 
+     qDebug() << "Executing" << cmd << args;
+     slave->start(cmd, args, QProcess::ReadWrite|QProcess::Unbuffered);
Index: pkgsrc/sysutils/qtl866/patches/patch-mainwindow.h
diff -u /dev/null pkgsrc/sysutils/qtl866/patches/patch-mainwindow.h:1.1
--- /dev/null   Mon Apr 28 12:16:35 2025
+++ pkgsrc/sysutils/qtl866/patches/patch-mainwindow.h   Mon Apr 28 12:16:35 2025
@@ -0,0 +1,32 @@
+$NetBSD: patch-mainwindow.h,v 1.1 2025/04/28 12:16:35 hauke Exp $
+
+fix: signal and slot name, from 
+<https://github.com/wd5gnr/qtl866/commit/a5ce75138005a799562e353ec0fcc7cf31b6b268>
+
+Get devices list directly from minipro tool 
+From <https://github.com/wd5gnr/qtl866/pull/15>
+
+--- mainwindow.h.orig  2017-04-05 04:34:13.000000000 +0000
++++ mainwindow.h
+@@ -42,10 +42,10 @@ private slots:
+ 
+     void on_exec_clicked();
+ 
+-    void on_process_error(QProcess::ProcessError);
++    void onProcessError(QProcess::ProcessError);
+     void on_finished(int code);
+-    void on_process_stdout();
+-    void on_process_stderr();
++    void onProcessStdout();
++    void onProcessStderr();
+ 
+     void on_action_About_triggered();
+ 
+@@ -61,6 +61,7 @@ private:
+ 
+     Ui::MainWindow *ui;
+     QProcess *slave;
++    QStringList devices;
+ };
+ 
+ #endif // MAINWINDOW_H
Index: pkgsrc/sysutils/qtl866/patches/patch-miniprohex
diff -u /dev/null pkgsrc/sysutils/qtl866/patches/patch-miniprohex:1.1
--- /dev/null   Mon Apr 28 12:16:35 2025
+++ pkgsrc/sysutils/qtl866/patches/patch-miniprohex     Mon Apr 28 12:16:35 2025
@@ -0,0 +1,75 @@
+$NetBSD: patch-miniprohex,v 1.1 2025/04/28 12:16:35 hauke Exp $
+
+Un-bashify
+
+--- miniprohex.orig    2017-04-05 04:34:13.000000000 +0000
++++ miniprohex
+@@ -1,6 +1,6 @@
+ #!/bin/bash
+ 
+-if [ $# == 0 ]
++if [ $# = 0 ]
+ then
+    cat << EOF
+ miniprohex by Al Williams http://www.awce.com
+@@ -38,7 +38,7 @@ SRECOPTS=
+ while [ $# != 0 ]
+ do
+ # note --obs x becomes --obs=x
+-  if [ "$1" == "--obs" ]
++  if [ "$1" = "--obs" ]
+   then
+       SRECOPTS="$SRECOPTS $1=$2"
+       shift
+@@ -46,11 +46,11 @@ do
+       continue
+   fi
+ # note --line-length x becomes --line-length=x
+-  if [ "$1" == "--line-length" ]
++  if [ "$1" = "--line-length" ]
+   then
+       SRECOPTS="$SRECOPTS $1=$2"
+   fi
+-  if [ "$1" == "--unfill" ]
++  if [ "$1" = "--unfill" ]
+   then
+       SRECOPTS="$SRECOPTS $1 $2 $3"
+       shift
+@@ -58,24 +58,24 @@ do
+       shift
+       continue
+   fi
+-  if [ "$1" == "--offset" ] 
++  if [ "$1" = "--offset" ] 
+   then
+       SRECOPTS="$SRECOPTS $1 $2"
+       shift
+       shift
+       continue
+   fi
+-  if [ "$1" == "-r" ] 
++  if [ "$1" = "-r" ] 
+   then
+     RWOPT=-r
+     shift
+     FN=$1
+-  elif [ "$1" == "-w" ]
++  elif [ "$1" = "-w" ]
+   then
+     RWOPT=-w
+     shift
+     FN=$1
+-  elif [ "$1" == "-p" ]
++  elif [ "$1" = "-p" ]
+   then
+       DEV=$2
+       shift
+@@ -124,7 +124,7 @@ PRECVT=
+ POSTCVT=
+ esac
+ # If we write, do PRECMD and execute
+-if [ "$RWOPT" == -w ]
++if [ "$RWOPT" = -w ]
+ then
+ $PRECVT
+ minipro $OPTS -p "$DEV" $RWOPT $RFILE



Home | Main Index | Thread Index | Old Index