pkgsrc-Changes archive

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

CVS commit: pkgsrc/emulators/simulavr



Module Name:    pkgsrc
Committed By:   wiz
Date:           Tue Sep 15 08:59:37 UTC 2026

Modified Files:
        pkgsrc/emulators/simulavr: Makefile distinfo
        pkgsrc/emulators/simulavr/patches: patch-configure
            patch-src_cmd_gdbserver.cpp
Added Files:
        pkgsrc/emulators/simulavr/patches: patch-src_cmd_main.cpp

Log Message:
simulavr: fix build with compilers defaulting to c++17

They have std::byte in the namespace (due to 'using namespace std),
which conflicts with the local byte typedef.

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 pkgsrc/emulators/simulavr/Makefile
cvs rdiff -u -r1.16 -r1.17 pkgsrc/emulators/simulavr/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/emulators/simulavr/patches/patch-configure \
    pkgsrc/emulators/simulavr/patches/patch-src_cmd_gdbserver.cpp
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/emulators/simulavr/patches/patch-src_cmd_main.cpp

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

Modified files:

Index: pkgsrc/emulators/simulavr/Makefile
diff -u pkgsrc/emulators/simulavr/Makefile:1.37 pkgsrc/emulators/simulavr/Makefile:1.38
--- pkgsrc/emulators/simulavr/Makefile:1.37     Mon Aug 14 05:24:22 2023
+++ pkgsrc/emulators/simulavr/Makefile  Tue Sep 15 08:59:37 2026
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.37 2023/08/14 05:24:22 wiz Exp $
+# $NetBSD: Makefile,v 1.38 2026/09/15 08:59:37 wiz Exp $
 #
 DISTNAME=              simulavr-1.0.0
-PKGREVISION=           7
+PKGREVISION=           8
 CATEGORIES=            emulators
 MASTER_SITES=          https://download.savannah.gnu.org/releases/simulavr/
 

Index: pkgsrc/emulators/simulavr/distinfo
diff -u pkgsrc/emulators/simulavr/distinfo:1.16 pkgsrc/emulators/simulavr/distinfo:1.17
--- pkgsrc/emulators/simulavr/distinfo:1.16     Tue Oct 26 10:24:00 2021
+++ pkgsrc/emulators/simulavr/distinfo  Tue Sep 15 08:59:37 2026
@@ -1,15 +1,16 @@
-$NetBSD: distinfo,v 1.16 2021/10/26 10:24:00 nia Exp $
+$NetBSD: distinfo,v 1.17 2026/09/15 08:59:37 wiz Exp $
 
 BLAKE2s (simulavr-1.0.0.tar.gz) = 2727f79b2fe02834472a6a88825cc55b3aeeea26a1eadf296da36282a3b69f53
 SHA512 (simulavr-1.0.0.tar.gz) = d6649c2c61730beacbab01f882517fbbc8d9b8bdd7356e16dcdb02efa09f284fb633fe2d6e2d1bbe868648aa11685eaa6531540e6007eb9aeafd09da0b4af49f
 Size (simulavr-1.0.0.tar.gz) = 1013014 bytes
-SHA1 (patch-configure) = 8fe7c24d17ded8a5b53688f5d35b4aaf55e6c830
+SHA1 (patch-configure) = b4f41f35e5a62194a4161c6797fa33cbd12ee605
 SHA1 (patch-doc_simulavr_texinfo) = b2d169f24623c090038a6d4196f284ae9a611831
 SHA1 (patch-examples_atmel_key_StdDefs_c) = 73a89da0144d1d0cc2c678476270ea1f79300089
 SHA1 (patch-examples_atmel_key_scancodes.h) = f7f6d3f2da8eec4cf9b52800a499bd8300545bc0
 SHA1 (patch-regress_timertest_timer_16bit.c) = 81ee86847fd4d40817b2f4bf01e03aca86856f3c
 SHA1 (patch-src_Makefile.in) = 4db5a6b72180958466cd46979cb3ad40f45ab9ed
-SHA1 (patch-src_cmd_gdbserver.cpp) = 29156d12667eaa1545628f64737766b75a4e92ed
+SHA1 (patch-src_cmd_gdbserver.cpp) = cfc92909c9a2323016d199ce9b451bbfedff3c31
+SHA1 (patch-src_cmd_main.cpp) = d4b4d60c92e9befa6001d01c2da5b072c5b74fa3
 SHA1 (patch-src_systemclock_cpp) = 91535a11446dade72752dd0d549d4a605c5e90bc
 SHA1 (patch-src_systemclock_h) = fce9df95336b02b3152ec9b162a085c8c4b20283
 SHA1 (patch-src_traceval_cpp) = a92597bd935916fa0ec366b9187df33f075a7c83

Index: pkgsrc/emulators/simulavr/patches/patch-configure
diff -u pkgsrc/emulators/simulavr/patches/patch-configure:1.2 pkgsrc/emulators/simulavr/patches/patch-configure:1.3
--- pkgsrc/emulators/simulavr/patches/patch-configure:1.2       Fri Aug 29 04:40:06 2014
+++ pkgsrc/emulators/simulavr/patches/patch-configure   Tue Sep 15 08:59:37 2026
@@ -1,11 +1,11 @@
-$NetBSD: patch-configure,v 1.2 2014/08/29 04:40:06 mef Exp $
+$NetBSD: patch-configure,v 1.3 2026/09/15 08:59:37 wiz Exp $
 
 => Checking for portability problems in extracted files
 ERROR: [check-portability.awk] => Found test ... == ...:
 
---- configure.orig     2013-07-06 17:58:39.000000000 +0900
-+++ configure  2013-07-06 18:00:22.000000000 +0900
-@@ -15283,7 +15283,7 @@ $as_echo_n "checking for Python library 
+--- configure.orig     2012-02-12 15:26:50.000000000 +0000
++++ configure
+@@ -15283,7 +15283,7 @@ $as_echo_n "checking for Python library path... " >&6;
                py_version=`$PYTHON -c "from distutils.sysconfig import *; \
                        from string import join; \
                        print(join(get_config_vars('VERSION')))"`
@@ -14,7 +14,7 @@ ERROR: [check-portability.awk] => Found 
                        if test -n "$PYTHON_VERSION"; then
                                py_version=$PYTHON_VERSION
                        else
-@@ -16684,7 +16684,7 @@ else
+@@ -16684,7 +16684,7 @@ fi
    USE_FAB_FALSE=
  fi
  
Index: pkgsrc/emulators/simulavr/patches/patch-src_cmd_gdbserver.cpp
diff -u pkgsrc/emulators/simulavr/patches/patch-src_cmd_gdbserver.cpp:1.2 pkgsrc/emulators/simulavr/patches/patch-src_cmd_gdbserver.cpp:1.3
--- pkgsrc/emulators/simulavr/patches/patch-src_cmd_gdbserver.cpp:1.2   Sun May 31 14:11:42 2020
+++ pkgsrc/emulators/simulavr/patches/patch-src_cmd_gdbserver.cpp       Tue Sep 15 08:59:37 2026
@@ -1,10 +1,21 @@
-$NetBSD: patch-src_cmd_gdbserver.cpp,v 1.2 2020/05/31 14:11:42 mef Exp $
+$NetBSD: patch-src_cmd_gdbserver.cpp,v 1.3 2026/09/15 08:59:37 wiz Exp $
+
+Avoid 'using namespace std'. This introduces a conflict between
+std::byte and the local typedef.
 
 Use BSD bind, not STL bind.
 
---- src/cmd/gdbserver.cpp.orig 2020-05-26 01:36:49.070961229 +0000
+--- src/cmd/gdbserver.cpp.orig 2012-02-12 15:26:38.000000000 +0000
 +++ src/cmd/gdbserver.cpp
-@@ -183,7 +183,7 @@ GdbServerSocketUnix::GdbServerSocketUnix
+@@ -24,7 +24,6 @@
+  */
+ 
+ #include <iostream>
+-using namespace std;
+ 
+ #include <assert.h>
+ #include <stdio.h>
+@@ -183,7 +182,7 @@ GdbServerSocketUnix::GdbServerSocketUnix(int port) {
      address->sin_port = htons(port);
      memset(&address->sin_addr, 0, sizeof(address->sin_addr));
  
@@ -13,3 +24,39 @@ Use BSD bind, not STL bind.
          avr_error("Can not bind socket: %s", strerror(errno));
  
      if(listen(sock, 1) < 0)
+@@ -310,7 +309,7 @@ GdbServer::GdbServer(AvrDevice *c, int _port, int debu
+ }
+ 
+ //make the instance of static list of all gdb servers here
+-vector<GdbServer*> GdbServer::allGdbServers;
++std::vector<GdbServer*> GdbServer::allGdbServers;
+ 
+ GdbServer::~GdbServer() {
+     server->Close();
+@@ -1439,7 +1438,7 @@ void GdbServer::IdleStep() {
+ 
+ void GdbServer::IdleStep() {
+     int gdbRet=gdb_receive_and_process_packet(GDB_BLOCKING_OFF);
+-    cout << "IdleStep Instance" << this << " RunMode:" << dec << runMode << endl;
++    std::cout << "IdleStep Instance" << this << " RunMode:" << std::dec << runMode << std::endl;
+ 
+     if (lastCoreStepFinished) {
+         switch(gdbRet) {
+@@ -1459,7 +1458,7 @@ void GdbServer::IdleStep() {
+                 break;
+ 
+             default:
+-                cout << "wondering" << endl;
++                std::cout << "wondering" << std::endl;
+         }
+     }
+ }
+@@ -1516,7 +1515,7 @@ int GdbServer::InternalStep(bool &untilCoreStepFinishe
+             if(!leave) { //we can�t leave the loop so we have to request the other gdb instances now!
+                 // step through all gdblist members WITHOUT my self!
+                 //cout << "we do not leave and check for gdb events" << endl;
+-                vector<GdbServer*>::iterator ii;
++                std::vector<GdbServer*>::iterator ii;
+                 for (ii=allGdbServers.begin(); ii!=allGdbServers.end(); ii++) {
+                     if (*ii!=this) { //run other instances but not me 
+                         (*ii)->IdleStep();

Added files:

Index: pkgsrc/emulators/simulavr/patches/patch-src_cmd_main.cpp
diff -u /dev/null pkgsrc/emulators/simulavr/patches/patch-src_cmd_main.cpp:1.1
--- /dev/null   Tue Sep 15 08:59:37 2026
+++ pkgsrc/emulators/simulavr/patches/patch-src_cmd_main.cpp    Tue Sep 15 08:59:37 2026
@@ -0,0 +1,279 @@
+$NetBSD: patch-src_cmd_main.cpp,v 1.1 2026/09/15 08:59:37 wiz Exp $
+
+Avoid 'using namespace std'. This introduces a conflict between
+std::byte and the local typedef.
+
+--- src/cmd/main.cpp.orig      2026-09-15 08:53:05.702267801 +0000
++++ src/cmd/main.cpp
+@@ -27,7 +27,6 @@
+ #include <sstream>
+ #include <string>
+ #include <map>
+-using namespace std;
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -66,21 +65,21 @@ const char *SplitOffsetFile(const char *arg,
+     char *end;
+     
+     if(!StringToUnsignedLong(arg, offset, &end, base)) {
+-        cerr << name << ": offset is not a number" << endl;
++        std::cerr << name << ": offset is not a number" << std::endl;
+         exit(1);
+     }
+     //position behind the "," or any other delimiter for the offset
+     if(!*end) {
+-        cerr << name << ": argument ends before filename" << endl;
++        std::cerr << name << ": argument ends before filename" << std::endl;
+         exit(1);
+     }
+     if(*end != ',') {
+-        cerr << name << ": argument does not have comma before filename" << endl;
++        std::cerr << name << ": argument does not have comma before filename" << std::endl;
+         exit(1);
+     }
+     ++end;
+     if(!*end) {
+-        cerr << name << ": argument has comma but no filename" << endl;
++        std::cerr << name << ": argument has comma but no filename" << std::endl;
+         exit(1);
+     }
+     
+@@ -133,9 +132,9 @@ int main(int argc, char *argv[]) {
+ int main(int argc, char *argv[]) {
+     int c;
+     bool gdbserver_flag = 0;
+-    string filename("unknown");
+-    string devicename("unknown");
+-    string tracefilename("unknown");
++    std::string filename("unknown");
++    std::string devicename("unknown");
++    std::string tracefilename("unknown");
+     long global_gdbserver_port = 1212;
+     int global_gdb_debug = 0;
+     bool globalWaitForGdbConnection = true; //please wait for gdb connection
+@@ -148,14 +147,14 @@ int main(int argc, char *argv[]) {
+     unsigned long readFromPipeOffset = 0x21;
+     unsigned long writeToAbort = 0;
+     unsigned long writeToExit = 0;
+-    string readFromPipeFileName = "";
+-    string writeToPipeFileName = "";
++    std::string readFromPipeFileName = "";
++    std::string writeToPipeFileName = "";
+     
+-    vector<string> terminationArgs;
++    std::vector<std::string> terminationArgs;
+     
+-    vector<string> tracer_opts;
++    std::vector<std::string> tracer_opts;
+     bool tracer_dump_avail = false;
+-    string tracer_avail_out;
++    std::string tracer_avail_out;
+     
+     while (1) {
+         //int this_option_optind = optind ? optind : 1;
+@@ -209,25 +208,25 @@ int main(int argc, char *argv[]) {
+             
+             case 'a': // write to abort
+                 if(!StringToUnsignedLong(optarg, &writeToAbort, NULL, 16)) {
+-                    cerr << "writeToAbort is not a number" << endl;
++                    std::cerr << "writeToAbort is not a number" << std::endl;
+                     exit(1);
+                 }
+                 break;
+             
+             case 'e': // write to exit
+                 if(!StringToUnsignedLong(optarg, &writeToExit, NULL, 16)) {
+-                    cerr << "writeToExit is not a number" << endl;
++                    std::cerr << "writeToExit is not a number" << std::endl;
+                     exit(1);
+                 }
+                 break;
+             
+             case 'F':
+                 if(!StringToUnsignedLongLong(optarg, &fcpu, NULL, 10)) {
+-                    cerr << "frequency is not a number" << endl;
++                    std::cerr << "frequency is not a number" << std::endl;
+                     exit(1);
+                 }
+                 if(fcpu == 0) {
+-                    cerr << "frequency is zero" << endl;
++                    std::cerr << "frequency is zero" << std::endl;
+                     exit(1);
+                 }
+                 if(global_verbose_on)
+@@ -237,73 +236,73 @@ int main(int argc, char *argv[]) {
+             
+             case 'm':
+                 if(!StringToUnsignedLongLong( optarg, &maxRunTime, NULL, 10)) {
+-                    cerr << "maxRunTime is not a number" << endl;
++                    std::cerr << "maxRunTime is not a number" << std::endl;
+                     exit(1);
+                 }
+                 if(maxRunTime == 0) {
+-                    cerr << "maxRunTime is zero" << endl;
++                    std::cerr << "maxRunTime is zero" << std::endl;
+                     exit(1);
+                 }
+                 if(global_verbose_on)
+-                    cout << "Maximum Run Time: " << maxRunTime << endl;
++                    std::cout << "Maximum Run Time: " << maxRunTime << std::endl;
+                 break;
+             
+             case 'u':
+                 if(global_verbose_on)
+-                    cout << "Run with User Interface at Port 7777" << endl;
++                    std::cout << "Run with User Interface at Port 7777" << std::endl;
+                 userinterface_flag = 1;
+                 break;
+             
+             case 'f':
+                 if(global_verbose_on)
+-                    cout << "File to load: " << optarg << endl;
++                    std::cout << "File to load: " << optarg << std::endl;
+                 filename = optarg;
+                 break;
+             
+             case 'd':
+                 if(global_verbose_on)
+-                    cout << "Device to simulate: " << optarg << endl;
++                    std::cout << "Device to simulate: " << optarg << std::endl;
+                 devicename = optarg;
+                 break;
+             
+             case 'g':
+                 if(global_verbose_on)
+-                    cout << "Running as gdb-server" << endl;
++                    std::cout << "Running as gdb-server" << std::endl;
+                 gdbserver_flag = 1;
+                 break;
+             
+             case 'G':
+                 if(global_verbose_on)
+-                    cout << "Running with debug information from gdbserver" << endl;
++                    std::cout << "Running with debug information from gdbserver" << std::endl;
+                 global_gdb_debug = 1;
+                 gdbserver_flag = 1;
+                 break;
+             
+             case 'p':
+                 if(!StringToLong( optarg, &global_gdbserver_port, NULL, 10)) {
+-                    cerr << "GDB Server Port is not a number" << endl;
++                    std::cerr << "GDB Server Port is not a number" << std::endl;
+                     exit(1);
+                 }
+                 if(global_verbose_on)
+-                    cout << "Running on port: " << optarg << endl;
++                    std::cout << "Running on port: " << optarg << std::endl;
+                 break;
+             
+             case 't':
+                 if(global_verbose_on)
+-                    cout << "Running in Trace Mode" << endl;
++                    std::cout << "Running in Trace Mode" << std::endl;
+                 sysConHandler.SetTraceFile(optarg, 1000000);
+                 break;
+             
+             case 'v':
+-                cout << "SimulAVR " << VERSION << endl
+-                     << "See documentation for copyright and distribution terms" << endl
+-                     << endl;
++                std::cout << "SimulAVR " << VERSION << std::endl
++                     << "See documentation for copyright and distribution terms" << std::endl
++                     << std::endl;
+                 exit(0);
+                 break;
+             
+             case 'n':
+-                cout << "We will NOT wait for a gdb connection, "
+-                        "simulation starts now!" << endl;
++                std::cout << "We will NOT wait for a gdb connection, "
++                        "simulation starts now!" << std::endl;
+                 globalWaitForGdbConnection = false;
+                 break;
+             
+@@ -321,9 +320,9 @@ int main(int argc, char *argv[]) {
+                 break;
+             
+             default:
+-                cout << Usage
+-                     << "Supported devices:" << endl
+-                     << AvrFactory::supportedDevices() << endl;
++                std::cout << Usage
++                     << "Supported devices:" << std::endl
++                     << AvrFactory::supportedDevices() << std::endl;
+                 exit(0);
+         }
+     }
+@@ -346,39 +345,39 @@ int main(int argc, char *argv[]) {
+     SetDumpTraceArgs(tracer_opts, dev1);
+     
+     if(!gdbserver_flag && filename == "unknown") {
+-        cerr << "Specify either --file <executable> or --gdbserver (or --gdb-stdin)" << endl;
++        std::cerr << "Specify either --file <executable> or --gdbserver (or --gdb-stdin)" << std::endl;
+         exit(1);
+     }
+     
+     //if we want to insert some special "pipe" Registers we could do this here:
+     if(readFromPipeFileName != "") {
+         if(global_verbose_on)
+-            cout << "Add ReadFromPipe-Register at 0x"
+-                 << hex << readFromPipeOffset
+-                 << " and read from file: " << readFromPipeFileName << endl;
++            std::cout << "Add ReadFromPipe-Register at 0x"
++                 << std::hex << readFromPipeOffset
++                 << " and read from file: " << readFromPipeFileName << std::endl;
+         dev1->ReplaceIoRegister(readFromPipeOffset,
+             new RWReadFromFile(dev1, "FREAD", readFromPipeFileName.c_str()));
+     }
+     
+     if(writeToPipeFileName != "") {
+         if(global_verbose_on)
+-            cout << "Add WriteToPipe-Register at 0x"
+-                 << hex << writeToPipeOffset
+-                 << " and write to file: " << writeToPipeFileName << endl;
++            std::cout << "Add WriteToPipe-Register at 0x"
++                 << std::hex << writeToPipeOffset
++                 << " and write to file: " << writeToPipeFileName << std::endl;
+         dev1->ReplaceIoRegister(writeToPipeOffset,
+             new RWWriteToFile(dev1, "FWRITE", writeToPipeFileName.c_str()));
+     }
+     
+     if(writeToAbort) {
+         if(global_verbose_on)
+-            cout << "Add WriteToAbort-Register at 0x" << hex
+-                 << writeToAbort << endl;
++            std::cout << "Add WriteToAbort-Register at 0x" << std::hex
++                 << writeToAbort << std::endl;
+         dev1->ReplaceIoRegister(writeToAbort, new RWAbort(dev1, "ABORT"));
+     }
+     
+     if(writeToExit) {
+         if(global_verbose_on)
+-            cout << "Add WriteToExit-Register at 0x" << hex << writeToExit << endl;
++            std::cout << "Add WriteToExit-Register at 0x" << std::hex << writeToExit << std::endl;
+         dev1->ReplaceIoRegister(writeToExit, new RWExit(dev1, "EXIT"));
+     }
+     
+@@ -387,10 +386,10 @@ int main(int argc, char *argv[]) {
+     }
+     
+     //if we have a file we can check out for termination lines.
+-    vector<string>::iterator ii;
++    std::vector<std::string>::iterator ii;
+     for(ii = terminationArgs.begin(); ii != terminationArgs.end(); ii++) {
+         if(global_verbose_on)
+-            cout << "Termination or Breakpoint Symbol: " << *ii << endl;
++            std::cout << "Termination or Breakpoint Symbol: " << *ii << std::endl;
+         dev1->RegisterTerminationSymbol((*ii).c_str());
+     }
+     
+@@ -413,7 +412,7 @@ int main(int argc, char *argv[]) {
+         }
+     } else { // gdb should be activated
+         if(global_verbose_on)
+-            cout << "Going to gdb..." << endl;
++            std::cout << "Going to gdb..." << std::endl;
+         GdbServer gdb1(dev1, global_gdbserver_port, global_gdb_debug, globalWaitForGdbConnection);
+         SystemClock::Instance().Add(&gdb1);
+         SystemClock::Instance().Endless();



Home | Main Index | Thread Index | Old Index