pkgsrc-WIP-changes archive

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

brain-mesh-builder: Update to 1.1



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Sun Nov 13 11:09:16 2022 -0600
Changeset:	be3929168d3a394838803a6ae2ef23fb77919ecf

Modified Files:
	brain-mesh-builder/Makefile
	brain-mesh-builder/distinfo
	brain-mesh-builder/patches/patch-Makefile
Added Files:
	brain-mesh-builder/patches/patch-src_bead.cpp
	brain-mesh-builder/patches/patch-src_bead3d.cpp
	brain-mesh-builder/patches/patch-src_fnet.cpp
	brain-mesh-builder/patches/patch-src_fnet3d.cpp
	brain-mesh-builder/patches/patch-src_img.cpp
	brain-mesh-builder/patches/patch-src_img3d.cpp
	brain-mesh-builder/patches/patch-src_io_bead3d__cmd.cpp
	brain-mesh-builder/patches/patch-src_io_fnet3d__cmd.cpp
	brain-mesh-builder/patches/patch-src_io_img3d__cmd.cpp
	brain-mesh-builder/patches/patch-src_matvec.cpp
	brain-mesh-builder/patches/patch-src_surface.cpp
Removed Files:
	brain-mesh-builder/patches/patch-inc_globals.h

Log Message:
brain-mesh-builder: Update to 1.1

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=be3929168d3a394838803a6ae2ef23fb77919ecf

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

diffstat:
 brain-mesh-builder/Makefile                        |   9 +-
 brain-mesh-builder/distinfo                        |  20 +++-
 brain-mesh-builder/patches/patch-Makefile          | 101 ++++++++-----------
 brain-mesh-builder/patches/patch-inc_globals.h     |  14 ---
 brain-mesh-builder/patches/patch-src_bead.cpp      |  15 +++
 brain-mesh-builder/patches/patch-src_bead3d.cpp    |  15 +++
 brain-mesh-builder/patches/patch-src_fnet.cpp      |  33 ++++++
 brain-mesh-builder/patches/patch-src_fnet3d.cpp    | 111 +++++++++++++++++++++
 brain-mesh-builder/patches/patch-src_img.cpp       |  61 +++++++++++
 brain-mesh-builder/patches/patch-src_img3d.cpp     |  15 +++
 .../patches/patch-src_io_bead3d__cmd.cpp           |  15 +++
 .../patches/patch-src_io_fnet3d__cmd.cpp           |  15 +++
 .../patches/patch-src_io_img3d__cmd.cpp            |  15 +++
 brain-mesh-builder/patches/patch-src_matvec.cpp    |  19 ++++
 brain-mesh-builder/patches/patch-src_surface.cpp   |  17 ++++
 15 files changed, 391 insertions(+), 84 deletions(-)

diffs:
diff --git a/brain-mesh-builder/Makefile b/brain-mesh-builder/Makefile
index 8e68fd30c2..74a9014d6d 100644
--- a/brain-mesh-builder/Makefile
+++ b/brain-mesh-builder/Makefile
@@ -11,10 +11,10 @@
 #USE_XORG=	ice sm x11 xext
 #USE_GNOME=	libxml2
 
-DISTNAME=	brain-mesh-builder-1.0
+DISTNAME=	brain-mesh-builder-1.1
 CATEGORIES=	biology
 MASTER_SITES=	${MASTER_SITE_GITHUB:=hwm2746/}
-GITHUB_TAG=	v.${PKGVERSION_NOREV}
+GITHUB_TAG=	${PKGVERSION_NOREV}
 
 MAINTAINER=	bacon%NetBSD.org@localhost
 HOMEPAGE=	https://github.com/hwm2746/brain-mesh-builder
@@ -27,10 +27,5 @@ USE_TOOLS+=	gmake
 WRKSRC=		${WRKDIR}/${PKGBASE}-${GITHUB_TAG}
 CXXFLAGS+=	-std=c++11
 
-post-extract:
-	${RM} ${WRKSRC}/bin/* ${WRKSRC}/obj/*.o ${WRKSRC}/obj/io/*.o
-
 .include "../../graphics/GraphicsMagick/buildlink3.mk"
-# CentOS doesn't have zlib in the base, so uncomment if needed.
-# .include "../../devel/zlib/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/brain-mesh-builder/distinfo b/brain-mesh-builder/distinfo
index a31459da9d..564b68a86a 100644
--- a/brain-mesh-builder/distinfo
+++ b/brain-mesh-builder/distinfo
@@ -1,7 +1,17 @@
 $NetBSD$
 
-BLAKE2s (brain-mesh-builder-1.0.tar.gz) = 0dc3282ca814e4812bf351572a00614c626d25cdca55bfed098ec2ef0128d8a0
-SHA512 (brain-mesh-builder-1.0.tar.gz) = 3669a63047e91f0ed32ad803f48c9a94e34633af653ae84a3c652412248ff27fada7965bed7fb8ff66b4ba677bd83723fd65405f05d949e2353ec18af47b0c63
-Size (brain-mesh-builder-1.0.tar.gz) = 25799712 bytes
-SHA1 (patch-Makefile) = 45cd44b1be32ddc68b730650d457b378e982d8c5
-SHA1 (patch-inc_globals.h) = c0790ee6ea3f764a4cd034f52aee7cd5d151b064
+BLAKE2s (brain-mesh-builder-1.1.tar.gz) = 122811b4221702aad58ef5c5fd9f7fdd7fb73f1b703f9646d36192c05cb5a2b6
+SHA512 (brain-mesh-builder-1.1.tar.gz) = d71dbcde369313ccd0f86c571cd6c12f0b5babd096a5847097de8eb66c53e9e53dea74e1a9ea6656956113c529c14e07629a95dfe045cf38ed6e3e85e323f0e0
+Size (brain-mesh-builder-1.1.tar.gz) = 24984078 bytes
+SHA1 (patch-Makefile) = cd1fff26d79d2a0d6d4b3111817884a5a37dfb07
+SHA1 (patch-src_bead.cpp) = aa60fef2612162a9816db6b7e9fb11f46c2a7395
+SHA1 (patch-src_bead3d.cpp) = 31b2ad4c35837bd10a7c15bae4b27c000af27a7e
+SHA1 (patch-src_fnet.cpp) = 34fab18fed492330d9394a9fec0f7b1efc155ff9
+SHA1 (patch-src_fnet3d.cpp) = 53af1a86ebdbd76bab3c0eac8db32f19fbb5a9f1
+SHA1 (patch-src_img.cpp) = a8185f3ed69f931155ad23f434f5757a345b487b
+SHA1 (patch-src_img3d.cpp) = 4f392f65828ce02bf045f88d6b54c953bb075e11
+SHA1 (patch-src_io_bead3d__cmd.cpp) = 3f8804e8c3fd162fec01921797e3c18cc9b774c9
+SHA1 (patch-src_io_fnet3d__cmd.cpp) = abef664a141977b4e75f941e7ebe70c57001ed3e
+SHA1 (patch-src_io_img3d__cmd.cpp) = e5a0de3a074d835d9cbaf0f6601bb2010e36526b
+SHA1 (patch-src_matvec.cpp) = 5c7432545c7f1d3f60837d59ac40f862aad2520e
+SHA1 (patch-src_surface.cpp) = c118d5a10a5ad48888646440f71c0770f2d85506
diff --git a/brain-mesh-builder/patches/patch-Makefile b/brain-mesh-builder/patches/patch-Makefile
index 3af3384561..198553057f 100644
--- a/brain-mesh-builder/patches/patch-Makefile
+++ b/brain-mesh-builder/patches/patch-Makefile
@@ -1,86 +1,71 @@
 $NetBSD$
 
-# Support package managers
+# Clean up and create bin and obj dirs
 
---- Makefile.orig	2021-04-15 21:30:36 UTC
+--- Makefile.orig	2022-11-12 14:21:36 UTC
 +++ Makefile
-@@ -1,34 +1,59 @@
-+# subdirs
-+SRCDIR	= src
-+INCDIR	= inc
-+OBJDIR	= obj
-+BINDIR	= bin
-+
- # Final executable
--TARGET=dodri
-+TARGET	= $(BINDIR)/dodri
+@@ -9,42 +9,48 @@ TARGET = $(BINDIR)/dodri
  
--# subdirs
--SRCDIR = src
--INCDIR = inc
--OBJDIR = obj
--BINDIR = bin
-+# Using != runs the command immediately, so the actual flags appear
-+# in the compile and link commands
+ # Using != runs the command immediately, so the actual flags appear
+ # in the compile and link commands
+-GM_CPP != GraphicsMagick++-config --cppflags
+-GM_LD  != GraphicsMagick++-config --ldflags --libs
 +GM_CPP	!= GraphicsMagick++-config --cppflags
 +GM_LD	!= GraphicsMagick++-config --ldflags --libs
  
  # compiler rules
--CC = g++ #-std=c++11
--DEBUG = -g
--OPT = -O3 -Wall
--IMGMGK= -fno-strict-aliasing -pthread  `GraphicsMagick++-config --cppflags --ldflags --libs`
-+# -pthread appears to be unused
-+# Allow user to override default compiler and optional flags using make
-+# arguments or environment variables
+ # -pthread appears to be unused
+ # Allow user to override default compiler and optional flags using make
+ # arguments or environment variables
+-CXX            ?= g++
+-CXXFLAGS       ?= -O3 -Wall -fno-strict-aliasing
 +CXX		?= g++
 +CXXFLAGS	?= -O3 -Wall -fno-strict-aliasing
  
--CFLAGS=  -I$(INCDIR) $(OPT) $(IMGMGK) 
-+# Add required flags
+ # Add required flags
+-CXXFLAGS       += -I$(INCDIR) $(GM_CPP)
+-LDFLAGS                += $(GM_LD)
 +CXXFLAGS	+= -I$(INCDIR) $(GM_CPP)
 +LDFLAGS		+= $(GM_LD)
  
--SOURCES := $(wildcard $(SRCDIR)/*.cpp) $(wildcard $(SRCDIR)/io/*.cpp)
--INCLUDES := $(wildcard $(INCDIR)/*.h)
--OBJECTS := $(SOURCES:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o) 
-+DEBUG	= -g
+-DEBUG  = -g
++DEBUG		= -g
  
--$(BINDIR)/$(TARGET): $(OBJECTS) $(INCLUDES)
--	$(CC) $(OBJECTS) $(CFLAGS) -o $@
+-SOURCES                := $(wildcard $(SRCDIR)/*.cpp) $(wildcard $(SRCDIR)/io/*.cpp)
+-INCLUDES       := $(wildcard $(INCDIR)/*.h)
+-OBJECTS                := $(SOURCES:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o)
 +SOURCES		:= $(wildcard $(SRCDIR)/*.cpp) $(wildcard $(SRCDIR)/io/*.cpp)
 +INCLUDES	:= $(wildcard $(INCDIR)/*.h)
-+OBJECTS		:= $(SOURCES:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o) 
++OBJECTS		:= $(SOURCES:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o)
  
--all: $(BINDIR)/$(TARGET) 
-+# Default install tools, can be overridden by user
+ # Default install tools, can be overridden by user
+-MKDIR          ?= mkdir
+-INSTALL                ?= install
 +MKDIR		?= mkdir
 +INSTALL		?= install
-+
-+# Support staged installs.  Most package managers will provide
-+# DESTDIR and PREFIX.
+ 
+ # Support staged installs.  Most package managers will provide
+ # DESTDIR and PREFIX.
+-DESTDIR                ?= stagedir
+-PREFIX         ?= /usr/local
 +DESTDIR		?= stagedir
 +PREFIX		?= /usr/local
+ 
+ all: $(TARGET)
+ 
+-$(TARGET): $(OBJECTS) $(INCLUDES)
++$(BINDIR):
++	$(MKDIR) -p $(BINDIR)
 +
-+all: $(TARGET) 
-+
-+$(TARGET): $(OBJECTS) $(INCLUDES)
-+	$(CXX) $(OBJECTS) $(LDFLAGS) -o $@
++$(OBJDIR)/io:
++	$(MKDIR) -p $(OBJDIR)/io
 +
- $(OBJDIR)/%.o: $(SRCDIR)/%.cpp $(INCLUDES) 
--	$(CC) $(CFLAGS) -c $< -o $@
++$(TARGET): $(BINDIR) $(OBJDIR)/io $(OBJECTS) $(INCLUDES)
+ 	$(CXX) $(OBJECTS) $(LDFLAGS) -o $@
+ 
+ $(OBJDIR)/%.o: $(SRCDIR)/%.cpp $(INCLUDES)
+-	       $(CXX) $(CXXFLAGS) -c $< -o $@
 +	$(CXX) $(CXXFLAGS) -c $< -o $@
  
- .PHONY: 
+ .PHONY:
  clean:
--	rm -f $(OBJECTS) $(BINDIR)/$(TARGET)
--debug:	CFLAGS = -I$(INCDIR) $(IMGMGK) $(DEBUG) 
-+	rm -f $(OBJECTS) $(TARGET)
- 
-+debug: CXXFLAGS = -I$(INCDIR) $(IMGMGK) $(DEBUG) 
-+
- debug: all 
-+
-+install: all
-+	$(MKDIR) -p $(DESTDIR)$(PREFIX)/bin
-+	$(INSTALL) -c $(TARGET) $(DESTDIR)$(PREFIX)/bin
diff --git a/brain-mesh-builder/patches/patch-inc_globals.h b/brain-mesh-builder/patches/patch-inc_globals.h
deleted file mode 100644
index 9603479223..0000000000
--- a/brain-mesh-builder/patches/patch-inc_globals.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
-# Fix for clang
-
---- inc/globals.h.orig	2022-11-10 21:07:28 UTC
-+++ inc/globals.h
-@@ -21,6 +21,7 @@
- //#include <ctime>
- //#include <list>
- #include <map>
-+#include <array>
- #include <vector>
- #include <numeric>
- 
diff --git a/brain-mesh-builder/patches/patch-src_bead.cpp b/brain-mesh-builder/patches/patch-src_bead.cpp
new file mode 100644
index 0000000000..66fc4a2615
--- /dev/null
+++ b/brain-mesh-builder/patches/patch-src_bead.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+# Silence warnings
+
+--- src/bead.cpp.orig	2022-11-12 14:53:55 UTC
++++ src/bead.cpp
+@@ -469,7 +469,7 @@ int bead::getBeadDir(double rCut, multimap<int,array<d
+   MinMax(i,rvec,&ix,&iy,&sx,&sy);
+   cout<<"    Min/Max of chi^2: "<<sx<<"  "<<sy<<endl;
+ 
+-  delete rvec;
++  delete[] rvec;
+   for (i=0;i<3;i++) delete [] mask[i];
+   delete [] mask;
+   
diff --git a/brain-mesh-builder/patches/patch-src_bead3d.cpp b/brain-mesh-builder/patches/patch-src_bead3d.cpp
new file mode 100644
index 0000000000..9384b62dba
--- /dev/null
+++ b/brain-mesh-builder/patches/patch-src_bead3d.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+# Silence warnings
+
+--- src/bead3d.cpp.orig	2022-11-12 14:57:13 UTC
++++ src/bead3d.cpp
+@@ -94,7 +94,7 @@ int bead3d::beadTag2Id(string sdum)
+      Returns: id number or -1 if tag not found */
+ 
+   int i,j;
+-  vector<bead>::iterator it_bead;
++  // Unused vector<bead>::iterator it_bead;
+   j=-1;
+   for (i=0;i<nStack;i++) {
+     if (bead_stack[i].tag==sdum) {j=i; break;}
diff --git a/brain-mesh-builder/patches/patch-src_fnet.cpp b/brain-mesh-builder/patches/patch-src_fnet.cpp
new file mode 100644
index 0000000000..934e8dd7d4
--- /dev/null
+++ b/brain-mesh-builder/patches/patch-src_fnet.cpp
@@ -0,0 +1,33 @@
+$NetBSD$
+
+# Silence warnings
+
+--- src/fnet.cpp.orig	2021-04-15 21:30:36 UTC
++++ src/fnet.cpp
+@@ -66,7 +66,7 @@ fnet::fnet(img *img0, int iDiam,unsigned char pxlCut,s
+   
+   vector<vector<pair<int,int>>> cluster;
+   vector<pair<double,double>>::iterator it,jt;
+-  vector<pair<int,int>>:: iterator iit; 
++  // Unused vector<pair<int,int>>:: iterator iit; 
+   
+   // set tag and img global vars
+   bead_tag=""; // no corresponding bead
+@@ -1766,7 +1766,7 @@ void fnet::writeCor(string fname, string fmt, string o
+   if (fmt=="pdb") fprintf(ff,"ENDMDL\n");
+   fclose(ff);
+   
+-  delete filSeq; delete x; delete y; delete weight;
++  delete [] filSeq; delete [] x; delete [] y; delete [] weight;
+ }
+ 
+ /************************************************************************/
+@@ -1780,7 +1780,7 @@ void fnet::writeData(string fname, string bd_fname, FI
+   multimap<int,int>::iterator it;
+   pair<multimap<int,int>::iterator,multimap<int,int>::iterator> it_range; 
+   
+-  vector<bead>::iterator it_bead;
++  // Unused vector<bead>::iterator it_bead;
+   bool bd_newFile = (bd_dat == NULL);
+   string bd_datname; 
+   
diff --git a/brain-mesh-builder/patches/patch-src_fnet3d.cpp b/brain-mesh-builder/patches/patch-src_fnet3d.cpp
new file mode 100644
index 0000000000..1f14afc1ee
--- /dev/null
+++ b/brain-mesh-builder/patches/patch-src_fnet3d.cpp
@@ -0,0 +1,111 @@
+$NetBSD$
+
+# Silence warnings
+
+--- src/fnet3d.cpp.orig	2022-11-12 14:21:36 UTC
++++ src/fnet3d.cpp
+@@ -42,7 +42,7 @@ fnet3d::fnet3d(bead3d *bd3d, int *id_vec, string tag0)
+ 
+   int i,ndigit;
+   vector<fnet>::iterator it_fnet;
+-  vector<bead>::iterator it_bead;
++  // Unused vector<bead>::iterator it_bead;
+   string fnet_tag,bead_tag,sdum;
+   stringstream ss;
+ 
+@@ -256,7 +256,7 @@ void fnet3d::fillEnclosedHole(int *id_vec)
+   int i,j,k,istk,jstk,kstk,ih,del_stk,bdIndx;
+   int tot_bead,nHole,iBead,kBead;
+   int ib,jb,kb,iloc=-1,iFil,jFil,kFil,filLength,*filSeq; 
+-  double rdum[2],rdum1[2],avgBdMass,avgDist;
++  double rdum[2],rdum1[2],avgBdMass; // Unused ,avgDist;
+ 
+   vector<int> iSeq,jSeq,*edge,*delBead;
+   vector<array<int,2>> *hole;
+@@ -377,14 +377,14 @@ void fnet3d::fillEnclosedHole(int *id_vec)
+ 
+       /******/
+       /* Get details of top/bottom boundaries: avg bond length, linear fit */
+-      avgDist=0; // calc avg bond length
++      // Unused avgDist=0; // calc avg bond length
+       avgBdMass=fnet_stack[istk].beadMass[iSeq[0]]; // calc avg bead mass
+       for (i=1;i<(int)iSeq.size();i++) {
+ 	for (k=0;k<2;k++) {
+ 	  rdum[k]=fnet_stack[istk].cm[iSeq[i-1]][k];
+ 	  rdum1[k]=fnet_stack[istk].cm[iSeq[i]][k];
+ 	}
+-	avgDist+=getDistPos(rdum,rdum1,0);
++	// Unused avgDist+=getDistPos(rdum,rdum1,0);
+ 	avgBdMass+=fnet_stack[istk].beadMass[iSeq[i]]; 
+       }
+       avgBdMass+=fnet_stack[jstk].beadMass[jSeq[0]]; // calc avg bead mass      
+@@ -393,11 +393,11 @@ void fnet3d::fillEnclosedHole(int *id_vec)
+ 	  rdum[k]=fnet_stack[jstk].cm[jSeq[i-1]][k];
+ 	  rdum1[k]=fnet_stack[jstk].cm[jSeq[i]][k];
+ 	}
+-	avgDist+=getDistPos(rdum,rdum1,0);
++	// Unused avgDist+=getDistPos(rdum,rdum1,0);
+ 	avgBdMass+=fnet_stack[jstk].beadMass[jSeq[i]]; 	
+       }
+       // no. bonds= sequence size -1      
+-      avgDist/=(((int)iSeq.size()-1)+((int)jSeq.size()-1)); 
++      // Unused avgDist/=(((int)iSeq.size()-1)+((int)jSeq.size()-1)); 
+       avgBdMass/=((double)iSeq.size()+(double)jSeq.size());
+       /*****/
+       
+@@ -614,7 +614,7 @@ int fnet3d::fnetTag2Id(string sdum)
+ { /* Find id number for the fnet with tag sdum.
+      Returns: id number or -1 if tag not found */
+   int i,j;
+-  vector<fnet>::iterator it_fnet;
++  // Unused vector<fnet>::iterator it_fnet;
+   j=-1;
+   for (i=0;i<nStack;i++) {
+     if (fnet_stack[i].tag==sdum) {j=i; break;}
+@@ -955,6 +955,10 @@ void fnet3d::measureWidth3D(int N, double arr[], int n
+   for (j=0;j<2;j++) pos[j]=new double[totBead];
+   bd_mass=new double[totBead]; 
+ 
++  // Hack just to make weight[] non-zero in getavgw()
++  for (i=0; i<totBead; ++i)
++    bd_mass[i]=1;
++
+   ib=0; 
+   for (istk=id_vec[0];istk<=id_vec[1];istk++) {
+     if (!fnet_stack[istk].nBead) continue; // skip if no beads    
+@@ -1079,7 +1083,7 @@ void fnet3d::measureWidth3D(int N, double arr[], int n
+   }
+   
+   for (i=0;i<nStack;i++) delete[] plpts[i];
+-  delete pvec; delete[] plpts;
++  delete [] pvec; delete[] plpts;
+ }
+ 
+ /************************************************************************/
+@@ -1152,7 +1156,7 @@ void fnet3d::readData(string fname,string bd3d_tag0)
+   stringstream ss;
+   string bd3d_tag,bd_tag,line,ntag,ofname;
+   ifstream fin;
+-  vector<fnet>::iterator it_fnet; 
++  // Unused vector<fnet>::iterator it_fnet; 
+   bool b3d_tag, nstk, flag;
+   vector<bead3d>::iterator it_bead3d; 
+   flag = b3d_tag = nstk = false;
+@@ -1313,7 +1317,7 @@ void fnet3d::removeUnZbondedBeads(int *id_vec)
+   vector<int> markbead; 
+   multimap<int,int>::iterator it,zt;
+   pair<multimap<int,int>::iterator,multimap<int,int>::iterator> it_range,zt_range;
+-  vector<int>::iterator vt;
++  // Unused vector<int>::iterator vt;
+   
+   int delBead,updateBead; 
+   multimap<int,int> renumber;
+@@ -1432,7 +1436,7 @@ void fnet3d::smoothenZ(int segLength,int delZ, double 
+   vector<int> znghb,iSeq,jSeq,zSeq; // flanking beads z-bonded from jstk--istk
+   vector<int> checked; // bead ends already checked
+   vector<pair<int,int>> jbz; // store zbonded beads [stk,bead index]
+-  vector<pair<int,int>>:: iterator it;
++  // Unused vector<pair<int,int>>:: iterator it;
+   multimap<int,int> jbz0,jbz1,ztemp;
+ 
+   // for fitQuad0
diff --git a/brain-mesh-builder/patches/patch-src_img.cpp b/brain-mesh-builder/patches/patch-src_img.cpp
new file mode 100644
index 0000000000..aabf75d585
--- /dev/null
+++ b/brain-mesh-builder/patches/patch-src_img.cpp
@@ -0,0 +1,61 @@
+$NetBSD$
+
+# Silence warnings
+
+--- src/img.cpp.orig	2022-11-12 14:21:36 UTC
++++ src/img.cpp
+@@ -1109,7 +1109,7 @@ void img::thresholdAuto(double cutoff, int nbin, strin
+   unsigned char **pxl_tmp=new unsigned char*[rows];
+   int i,j,i0=0,i1=0,i2;
+   vector<int> local_min, local_max; // local histo min/max
+-  vector<int>::iterator it;
++  // Unused vector<int>::iterator it;
+   
+   string sdum=(tag1=="")?tag:tag1;
+ 
+@@ -1216,7 +1216,7 @@ void img::thresholdHisto(double *cutoff, int nbin, str
+   unsigned char **pxl_tmp=new unsigned char*[rows];
+   int i,j,i0,i2,imax;
+   vector<int> local_min; 
+-  vector<int>::iterator it;
++  // Unused vector<int>::iterator it;
+   
+   string sdum=(tag1=="")?tag:tag1;
+ 
+@@ -1443,7 +1443,7 @@ vector<img>::iterator findImg(string tag)
+ void getImgTagRange(stringstream& ss, string *svec)
+ {
+   string sdum,sdum0,sdum1;
+-  size_t found;  char *cdum;
++  size_t found;  char *cdum = nullptr;
+   int i,j,k;
+   
+   svec[0]=vimg.begin()->tag; svec[1]=vimg.rbegin()->tag; // default
+@@ -1497,7 +1497,7 @@ void mergeImg(img *img0, img *img1, string mode,string
+      If tag2 given create new img, img0 and img1 will be unmodified. */
+   
+   int i,j,k=0;
+-  double avgdum,sddum,rdum;
++  double sddum, rdum;	// Unused avgdum
+   unsigned char **pxl_tmp;
+   vector<img>::iterator it_img,it_img1;
+   string sdum=(tag2=="")?img0->tag:tag2; 
+@@ -1508,7 +1508,8 @@ void mergeImg(img *img0, img *img1, string mode,string
+   if ((img1->rows!=img0->rows)||(img1->columns!=img0->columns))
+     error_dodri("Size of two images do not match.");
+ 
+-  avgdum=sddum=0; 
++  // Unused avgdum=0
++  sddum=0; 
+   if (tag2=="") tag2=img0->tag; // merge into img1 by default
+   it_img= findImg(tag2);
+   if (it_img != vimg.end()) {
+@@ -1537,7 +1538,7 @@ void mergeImg(img *img0, img *img1, string mode,string
+ 	if (k>255) k=255;
+ 	if (k<0) k=abs(k);
+ 	it_img->pxl_gray[i][j]=(unsigned char)k;
+-	rdum=(double)k; avgdum+=rdum; sddum+=rdum*rdum;
++	rdum=(double)k; sddum+=rdum*rdum; // Unused avgdum+=rdum;
+       }
+     }
+     cout<<"    Image "<<tag2<<" modified."<<endl;
diff --git a/brain-mesh-builder/patches/patch-src_img3d.cpp b/brain-mesh-builder/patches/patch-src_img3d.cpp
new file mode 100644
index 0000000000..20bdab5fd4
--- /dev/null
+++ b/brain-mesh-builder/patches/patch-src_img3d.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+# Silence warnings
+
+--- src/img3d.cpp.orig	2022-11-12 15:10:54 UTC
++++ src/img3d.cpp
+@@ -147,7 +147,7 @@ int img3d::imgTag2Id(string sdum)
+   */
+   
+   int i,j;
+-  vector<img>::iterator it_img;
++  // Unused vector<img>::iterator it_img;
+   j=-1;
+   for (i=0;i<nStack;i++) {
+     if (img_stack[i].tag==sdum) {j=i; break;}
diff --git a/brain-mesh-builder/patches/patch-src_io_bead3d__cmd.cpp b/brain-mesh-builder/patches/patch-src_io_bead3d__cmd.cpp
new file mode 100644
index 0000000000..04e6aecd7f
--- /dev/null
+++ b/brain-mesh-builder/patches/patch-src_io_bead3d__cmd.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+# Silence warnings
+
+--- src/io/bead3d_cmd.cpp.orig	2022-11-12 15:14:12 UTC
++++ src/io/bead3d_cmd.cpp
+@@ -157,7 +157,7 @@ void getBead3dIdRange(stringstream& ss, int *id_vec,
+   int ns=(*it_bead3d).nStack,i,j,k,i0,j0, flag0,flag1,flag2;
+   string sdum,sdum0,sdum1;
+   stringstream ss0;
+-  size_t found; char *cdum;
++  size_t found; char *cdum = nullptr;
+   
+   id_vec[0]=0; id_vec[1]=ns-1; // default
+   flag0=checkCommOptKey(ss,"bead3d_id",1); // priority ordered
diff --git a/brain-mesh-builder/patches/patch-src_io_fnet3d__cmd.cpp b/brain-mesh-builder/patches/patch-src_io_fnet3d__cmd.cpp
new file mode 100644
index 0000000000..32288acc59
--- /dev/null
+++ b/brain-mesh-builder/patches/patch-src_io_fnet3d__cmd.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+# Silence warnings
+
+--- src/io/fnet3d_cmd.cpp.orig	2022-11-12 15:15:39 UTC
++++ src/io/fnet3d_cmd.cpp
+@@ -226,7 +226,7 @@ void getFnet3dIdRange(stringstream& ss, int *id_vec,
+   int ns=(*it_fnet3d).nStack,i,j,k,i0,j0, flag0,flag1,flag2;
+   string sdum,sdum0,sdum1;
+   stringstream ss0;
+-  size_t found; char *cdum;
++  size_t found; char *cdum = nullptr;
+   
+   id_vec[0]=0; id_vec[1]=ns-1; // default
+   flag0=checkCommOptKey(ss,"fnet3d_id",1); // priority ordered
diff --git a/brain-mesh-builder/patches/patch-src_io_img3d__cmd.cpp b/brain-mesh-builder/patches/patch-src_io_img3d__cmd.cpp
new file mode 100644
index 0000000000..fda8ef4fda
--- /dev/null
+++ b/brain-mesh-builder/patches/patch-src_io_img3d__cmd.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+# Silence warnings
+
+--- src/io/img3d_cmd.cpp.orig	2022-11-12 15:08:11 UTC
++++ src/io/img3d_cmd.cpp
+@@ -256,7 +256,7 @@ void getImg3dIdRange(stringstream& ss, int *id_vec,
+   int ns=(*it_img3d).nStack,i,j,k,i0,j0, flag0,flag1,flag2;
+   string sdum,sdum0,sdum1;
+   stringstream ss0;
+-  size_t found; char *cdum;
++  size_t found; char *cdum = nullptr;
+   
+   id_vec[0]=0; id_vec[1]=ns-1; // default
+   flag0=checkCommOptKey(ss,"img3d_id",1); // priority ordered
diff --git a/brain-mesh-builder/patches/patch-src_matvec.cpp b/brain-mesh-builder/patches/patch-src_matvec.cpp
new file mode 100644
index 0000000000..12e7b70b04
--- /dev/null
+++ b/brain-mesh-builder/patches/patch-src_matvec.cpp
@@ -0,0 +1,19 @@
+$NetBSD$
+
+# Silence warnings
+
+--- src/matvec.cpp.orig	2022-11-12 14:21:36 UTC
++++ src/matvec.cpp
+@@ -405,9 +405,12 @@ void getavgw(double *avg, double *sig, double ia[], do
+ {
+   int i; double a, b, wt=0., rdum;
+   a=b=0;
++  cerr << "N = " << N << endl;
+   for (i=0;i<N;i++) { 
+     wt+=weight[i];  rdum=ia[i];
+     a+=rdum*weight[i]; b+=rdum*rdum*weight[i];
++    cerr << "rdum = " << rdum << " weight[i] = " << weight[i];
++    cerr << " a = " << a << " b = " << b << " wt = " << wt << endl;
+   }
+   a/=wt; b/=wt;
+   b=b-a*a; if (fabs(b)<TOL) b=0.; // take care of roundoff
diff --git a/brain-mesh-builder/patches/patch-src_surface.cpp b/brain-mesh-builder/patches/patch-src_surface.cpp
new file mode 100644
index 0000000000..b51c9906cb
--- /dev/null
+++ b/brain-mesh-builder/patches/patch-src_surface.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+# Silence warnings
+
+--- src/surface.cpp.orig	2022-11-12 15:10:21 UTC
++++ src/surface.cpp
+@@ -520,8 +520,8 @@ void surface::registerPent()
+   it_fnet3d=findFnet3d(&vfnet3d,this->fnet3d_tag); 
+ 
+   //for bead insert
+-  vector<bead>::iterator it_bead;
+-  vector<fnet>::iterator it_fnet;  
++  // Unused vector<bead>::iterator it_bead;
++  // Unused vector<fnet>::iterator it_fnet;  
+   vector<bead3d>::iterator it_bead3d;
+   it_bead3d=findBead3d(&vbead3d,it_fnet3d->bead3d_tag);
+     


Home | Main Index | Thread Index | Old Index