commit:     fb4417aeb39704734b1e1ff0563f381dbb963d8a
Author:     Victor Kustov <ktrace <AT> yandex <DOT> ru>
AuthorDate: Thu May  8 16:55:04 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun May 18 13:48:38 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb4417ae

dev-embedded/ponyprog: add 3.1.4_p20250501

add Qt6-only version with qhexedit2-0.8.x depends

Signed-off-by: Victor Kustov <ktrace <AT> yandex.ru>
Part-of: https://github.com/gentoo/gentoo/pull/41991
Closes: https://github.com/gentoo/gentoo/pull/41991
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-embedded/ponyprog/Manifest                     |  1 +
 .../files/ponyprog-3.1.4_p20250501-cyrillic.patch  | 39 ++++++++++++
 ...ponyprog-3.1.4_p20250501-fix-build-system.patch | 71 ++++++++++++++++++++++
 .../ponyprog-3.1.4_p20250501-usbwatcher-qt6.patch  | 41 +++++++++++++
 .../ponyprog/ponyprog-3.1.4_p20250501.ebuild       | 50 +++++++++++++++
 5 files changed, 202 insertions(+)

diff --git a/dev-embedded/ponyprog/Manifest b/dev-embedded/ponyprog/Manifest
index 2c76d4063274..d5cec76d1522 100644
--- a/dev-embedded/ponyprog/Manifest
+++ b/dev-embedded/ponyprog/Manifest
@@ -1 +1,2 @@
 DIST ponyprog-3.1.3.tar.gz 11479313 BLAKE2B 
56704b28877687c356c72b1f28f28115cb11f40c701e207f5d3ec4aa4fa7194991162f0940400016d9ee5d42ff0a7e7da5b252f9b76417d0d8272638989fedec
 SHA512 
09e702f3f98e65799e8c59b9c8eca6f477db3f36a2648a1fab3797f91d56c7c4e9533e32bef1fe4c641512e31828a39df4d3d83639b7541714a3cc9050cd4e67
+DIST ponyprog-3.1.4_p20250501.tar.gz 11832067 BLAKE2B 
78de11392f3790e8e7c34b1be3bd76a3a6a11606dcfc07ecd1e5acb405e03a7b06029fea11c20d699b8ef26e8670e3abfd300053c833e5d87dfd7354b04f7a1a
 SHA512 
9c489559960188a2ddae57eb2ca55bfc4e0411cf3837ae84b92d9b2b6c419d5eeaece5d2b6acab73befd3401ee965c4da3bc52510c7145d1379dd2be6b62d408

diff --git 
a/dev-embedded/ponyprog/files/ponyprog-3.1.4_p20250501-cyrillic.patch 
b/dev-embedded/ponyprog/files/ponyprog-3.1.4_p20250501-cyrillic.patch
new file mode 100644
index 000000000000..4ff25a703d29
--- /dev/null
+++ b/dev-embedded/ponyprog/files/ponyprog-3.1.4_p20250501-cyrillic.patch
@@ -0,0 +1,39 @@
+From 88a738338de271a8784c1fac4b213494a64b8cc4 Mon Sep 17 00:00:00 2001
+From: Eduard Kalinowski <[email protected]>
+Date: Fri, 9 May 2025 10:25:38 +0200
+Subject: [PATCH] Hotfix for text locations, report #43
+
+See https://github.com/lancos/ponyprog/issues/43
+---
+ CMakeLists.txt         | 1 -
+ SrcPony/Translator.cpp | 5 -----
+ 2 files changed, 6 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5e46672..52db2ab 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -86,7 +86,6 @@ ELSE()
+   MESSAGE(FATAL_ERROR "-- LibUSB version ${LIBUSB_VERSION} TOO OLD! Please 
Install this library newer as 1.0.16")
+ ENDIF()
+ 
+-
+ # SET(APP_VERSION "3.1.4")
+ #
+ # Set the PonyProg version
+diff --git a/SrcPony/Translator.cpp b/SrcPony/Translator.cpp
+index 8079e59..cb1a963 100644
+--- a/SrcPony/Translator.cpp
++++ b/SrcPony/Translator.cpp
+@@ -595,11 +595,6 @@ bool cTranslator::loadTranslation(const QString fname)
+               if (llEng == "LANGUAGE_CHARSET")
+               {
+                       llEng = stream.readLine();
+-#if USE_QT_VERSION == 6
+-                      stream.setEncoding(QStringConverter::Latin1);
+-#else
+-                      stream.setCodec(llEng.toLatin1());
+-#endif
+                       continue;
+               }
+ 

diff --git 
a/dev-embedded/ponyprog/files/ponyprog-3.1.4_p20250501-fix-build-system.patch 
b/dev-embedded/ponyprog/files/ponyprog-3.1.4_p20250501-fix-build-system.patch
new file mode 100644
index 000000000000..fcf46ac5b260
--- /dev/null
+++ 
b/dev-embedded/ponyprog/files/ponyprog-3.1.4_p20250501-fix-build-system.patch
@@ -0,0 +1,71 @@
+Fix gentoo-specific build and fix some CMake warnings
+Some of that merged to upstream, see
+https://github.com/lancos/ponyprog/pull/44
+---
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5e46672..7d8eb67 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,16 +1,16 @@
+-PROJECT(ponyprog)
+-
+ # Configure CMake ...
+-CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
++CMAKE_MINIMUM_REQUIRED(VERSION 3.5 FATAL_ERROR)
+ # CMAKE_POLICY(SET CMP0003 OLD)
+ # CMAKE_POLICY(SET CMP0015 OLD)
+ 
++PROJECT(ponyprog)
++
+ IF(WIN32)
+     CMAKE_POLICY(SET CMP0020 NEW)
+ ENDIF()
+ 
+ # set the Qt version to 6 or 5
+-OPTION (USE_QT5 "Using of Qt5 version for compiling" ON)
++OPTION (USE_QT5 "Using of Qt5 version for compiling" OFF)
+ 
+ IF(${USE_QT5})
+     SET(USE_QT_VERSION 5)
+@@ -45,15 +45,7 @@ OPTION (USE_DEBUGGER "Include in binary file debug 
information" OFF)
+ 
+ OPTION (USE_PROFILER "Include in binary file profiling information" OFF)
+ 
+-
+-IF(${USE_DEBUGGER})
+-  SET(CMAKE_BUILD_TYPE Debug)
+-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} -Wall")
+-ELSE()
+-  SET(CMAKE_BUILD_TYPE Release)
+-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -Wall")
+-ENDIF()
+-
++ADD_COMPILE_OPTIONS("-Wall")
+ MESSAGE(STATUS "CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}")
+ 
+ INCLUDE(CheckIncludeFile)
+@@ -269,11 +261,12 @@ SET ( MOC_DIR temp )
+ SET ( UI_HEADERS_DIR temp )
+ SET ( UI_SOURCES_DIR temp )
+ 
+-ADD_SUBDIRECTORY(qhexedit2/src)
+ ADD_SUBDIRECTORY(SrcPony)
+ 
+-INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/qhexedit2/src/ 
${CMAKE_CURRENT_SOURCE_DIR}/SrcPony/ )
++find_library(QHexEdit_LIBRARY NAMES qhexedit)
++set(QHexEdit_LIBRARIES "${QHexEdit_LIBRARY}")
+ 
++INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/SrcPony/ )
+ 
+ IF(${USE_QT_VERSION} MATCHES "5")
+ #     QT5_ADD_TRANSLATION(APP_TRANSLATIONS ${TRANSLATION})
+@@ -346,7 +339,7 @@ IF(${USE_QT_VERSION} MATCHES "6")
+   #MESSAGE(STATUS "QT LIBRARIES: ${QT_LIBRARIES} ${Qt6Widgets_LIBRARIES} 
${Qt6Multimedia_LIBRARIES} ${Qt6Xml_LIBRARIES} ${Qt6PrintSupport_LIBRARIES} 
${Qt6Core_LIBRARIES}")
+ ENDIF()
+ 
+-TARGET_LINK_LIBRARIES(${CMAKE_PROJECT_NAME} ${LIBFTDI_LIBRARY} 
${LIBUSB_LIBRARIES})
++TARGET_LINK_LIBRARIES(${CMAKE_PROJECT_NAME} ${LIBFTDI_LIBRARY} 
${LIBUSB_LIBRARIES} ${QHexEdit_LIBRARIES})
+ 
+ ADD_CUSTOM_TARGET (tags
+     COMMAND  ctags -R -f tags ${CMAKE_SOURCE_DIR}/SrcPony

diff --git 
a/dev-embedded/ponyprog/files/ponyprog-3.1.4_p20250501-usbwatcher-qt6.patch 
b/dev-embedded/ponyprog/files/ponyprog-3.1.4_p20250501-usbwatcher-qt6.patch
new file mode 100644
index 000000000000..e66405ac5ce8
--- /dev/null
+++ b/dev-embedded/ponyprog/files/ponyprog-3.1.4_p20250501-usbwatcher-qt6.patch
@@ -0,0 +1,41 @@
+See https://github.com/lancos/ponyprog/issues/42
+---
+
+diff --git a/SrcPony/usbwatcher.h b/SrcPony/usbwatcher.h
+index eeb0163..d7ab2c5 100644
+--- a/SrcPony/usbwatcher.h
++++ b/SrcPony/usbwatcher.h
+@@ -51,20 +51,22 @@ class USBWatcher : public QObject
+ 
+       void hotplug_notify(bool connected, quint16 vid, quint16 pid)
+       {
++              VidPid *vObj = new VidPid(vid, pid);
+               if (connected)
+               {
+-                      vUSB.append(VidPid(vid, pid));
++                      vUSB.append(vObj);
+                       emit notify(true, vid, pid);
+               }
+               else
+               {
+-                      int idx = vUSB.indexOf(VidPid(vid, pid));
++                      int idx = vUSB.indexOf(vObj);
+                       if (idx != -1)
+                       {
+                               vUSB.remove(idx);
+                       }
+                       emit notify(false, vid, pid);
+               }
++              delete vObj;
+       }
+ 
+   signals:
+@@ -76,7 +78,7 @@ class USBWatcher : public QObject
+   private:
+       void hotplug_deregister();
+ 
+-      QVector <VidPid> vUSB;
++      QVector <VidPid *> vUSB;
+       libusb_hotplug_callback_handle cbHandle;
+       libusb_context *usb_ctx;
+       QTimer *timer;

diff --git a/dev-embedded/ponyprog/ponyprog-3.1.4_p20250501.ebuild 
b/dev-embedded/ponyprog/ponyprog-3.1.4_p20250501.ebuild
new file mode 100644
index 000000000000..6e1e3db544e1
--- /dev/null
+++ b/dev-embedded/ponyprog/ponyprog-3.1.4_p20250501.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake udev
+
+EGIT_COMMIT="5a4ef795b297ed1eaf6b4d4e71b3ce7a1bb63481"
+
+DESCRIPTION="EEPROM and microcontroller programmer/flasher"
+HOMEPAGE="https://github.com/lancos/ponyprog/";
+SRC_URI="https://github.com/lancos/${PN}/archive/${EGIT_COMMIT}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND="
+       >=app-editors/qhexedit2-0.8.10
+       <app-editors/qhexedit2-0.9.0
+       dev-embedded/libftdi:1[cxx]
+       dev-qt/qtbase:6[gui,widgets]
+       dev-qt/qtmultimedia:6
+       virtual/libusb:1
+"
+
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-cyrillic.patch
+       "${FILESDIR}"/${P}-fix-build-system.patch
+       "${FILESDIR}"/${P}-usbwatcher-qt6.patch
+)
+
+pkg_postinst() {
+       udev_reload
+
+       elog "To use the COM port in user mode (not as root), you need to"
+       elog "be in the 'uucp' group."
+       elog
+       elog "To use the LPT port in user mode (not as root) you need a kernel 
with"
+       elog "ppdev, parport and parport_pc compiled in or as modules. You need 
the"
+       elog "rights to write to /dev/parport? devices."
+}
+
+pkg_postrm() {
+       udev_reload
+}

Reply via email to