tag 549800 patch
tag 436971 patch
kthxbye

Salut Sam,

the attached patch fixes the genesis ftbfs.  In addition to the
build-depends change for netcdf, I had to mess around with the 'round'
macro, which conflicts with the declaration of libm's round() function
in <bits/mathcalls.h>.
I also added a check for DEB_BUILD_OPTIONS=nostrip in debian/rules.

Cheers,
Julien
reverted:
--- genesis-2.2.1/.pc/.version
+++ genesis-2.2.1.orig/.pc/.version
@@ -1 +0,0 @@
-2
diff -u genesis-2.2.1/debian/patches/series genesis-2.2.1/debian/patches/series
--- genesis-2.2.1/debian/patches/series
+++ genesis-2.2.1/debian/patches/series
@@ -8,0 +9 @@
+round.diff
diff -u genesis-2.2.1/debian/rules genesis-2.2.1/debian/rules
--- genesis-2.2.1/debian/rules
+++ genesis-2.2.1/debian/rules
@@ -28,6 +28,7 @@
 	rm -f `find . -name '*.o'`
 	rm -f src/fortran/nfconfig.inc
 	rm -f bin/genesis-convert man/man1/genesis-convert.1
+	rm -rf .pc
 	dh_clean
 
 install: install-stamp
@@ -45,12 +46,16 @@
 	dh_install -p genesis debian/genesis.desktop /usr/share/applications
 	# Libraries and additional executables
 	dh_install -p genesis lib/* /usr/lib/genesis
+ifeq (,$(filter nostrip, $(DEB_BUILD_OPTIONS)))
 	strip --remove-section=.comment --remove-section=.note \
 	  debian/genesis/usr/lib/genesis/code_*
+endif
 	cp bin/convert bin/genesis-convert
 	dh_install -p genesis bin/genesis-convert /usr/bin
+ifeq (,$(filter nostrip, $(DEB_BUILD_OPTIONS)))
 	strip --remove-section=.comment --remove-section=.note \
 	  debian/genesis/usr/bin/genesis-convert
+endif
 	cp man/man1/convert.1 man/man1/genesis-convert.1
 	# Include files
 	dh_install -p genesis include/* /usr/include/genesis
diff -u genesis-2.2.1/debian/changelog genesis-2.2.1/debian/changelog
--- genesis-2.2.1/debian/changelog
+++ genesis-2.2.1/debian/changelog
@@ -1,3 +1,13 @@
+genesis (2.2.1-13) UNRELEASED; urgency=low
+
+  * Replace build-dependency on netcdfg-dev with libnetcdf-dev
+    (closes: #549800).
+  * Don't strip files if DEB_BUILD_OPTIONS contains nostrip (closes: #436971).
+  * Delete the .pc directory on clean.
+  * Rename 'round' macro to 'genesis_round' to avoid clash with libc's math.h.
+
+ -- Julien Cristau <[email protected]>  Tue, 18 May 2010 17:27:28 +0200
+
 genesis (2.2.1-12) unstable; urgency=low
 
   * debian/genesis.desktop:
diff -u genesis-2.2.1/debian/control genesis-2.2.1/debian/control
--- genesis-2.2.1/debian/control
+++ genesis-2.2.1/debian/control
@@ -2,7 +2,7 @@
 Section: science
 Priority: extra
 Maintainer: Sam Hocevar (Debian packages) <[email protected]>
-Build-Depends: debhelper (>= 4.0), quilt, libx11-dev, libxt-dev, libxext-dev, zlib1g-dev, bison, flex, csh, libncurses5-dev, netcdfg-dev
+Build-Depends: debhelper (>= 4.0), quilt, libx11-dev, libxt-dev, libxext-dev, zlib1g-dev, bison, flex, csh, libncurses5-dev, libnetcdf-dev
 Standards-Version: 3.7.2
 XS-Vcs-Svn: svn://svn.debian.org/svn/sam-hocevar/pkg-misc/unstable/genesis/
 
only in patch2:
unchanged:
--- genesis-2.2.1.orig/debian/patches/round.diff
+++ genesis-2.2.1/debian/patches/round.diff
@@ -0,0 +1,123 @@
+Index: genesis-2.2.1/src/oldconn/axon/delay.c
+===================================================================
+--- genesis-2.2.1.orig/src/oldconn/axon/delay.c
++++ genesis-2.2.1/src/oldconn/axon/delay.c
+@@ -126,8 +126,8 @@
+ #else
+ 	if(buffer){
+ 	    tmin = projection->tmax +
+-	    round(projection->latency/Clockrate(projection)) +
+-	    round(projection->duration/Clockrate(projection));
++	    genesis_round(projection->latency/Clockrate(projection)) +
++	    genesis_round(projection->duration/Clockrate(projection));
+ 	    if(buffer->tmin < tmin){
+ 		buffer->tmin = tmin;
+ 	    }
+@@ -176,10 +176,10 @@
+ 	/*
+ 	** convert time quantities into projection interval units
+ 	*/
+-	latency = round(projection->latency/clock);
+-	duration = round(projection->duration/clock);
++	latency = genesis_round(projection->latency/clock);
++	duration = genesis_round(projection->duration/clock);
+ 	if(duration == 0) duration = 1;
+-	simtime_minus_latency = round(simulation_time/clock - latency);
++	simtime_minus_latency = genesis_round(simulation_time/clock - latency);
+ 	t1 = simtime_minus_latency - duration;
+ #endif
+ 
+Index: genesis-2.2.1/src/olf/table.c
+===================================================================
+--- genesis-2.2.1.orig/src/olf/table.c
++++ genesis-2.2.1/src/olf/table.c
+@@ -162,8 +162,8 @@
+         			table->input = MSGVALUE(msg,0);
+ 					if (table->alloced) {
+ 						if (table->output<table->table->xdivs &&
+-							round(table->output)>=0) {
+-							table->table->table[round(table->output)]=
++							genesis_round(table->output)>=0) {
++							table->table->table[genesis_round(table->output)]=
+ 								table->input;
+ 							table->output+=1;
+ 							table->table->xmax=table->output;
+@@ -181,7 +181,7 @@
+              		case 0:
+          			x = MSGVALUE(msg,0);
+  					if (table->alloced) {
+- 						int i = round(table->input);
++ 						int i = genesis_round(table->input);
+  						if (i < table->table->xdivs && i >= 0) {
+  							table->output = table->table->table[i];
+  							table->table->table[i++] = x;
+@@ -203,7 +203,7 @@
+ 								table->output>=0) {
+ 								/* Check if new spike */
+ 								if (table->input < table->stepsize) {
+-									table->table->table[round(table->output)]=
++									table->table->table[genesis_round(table->output)]=
+ 										SimulationTime();
+ 									table->output+=1;
+ 									table->table->xmax=table->output;
+Index: genesis-2.2.1/src/out/out_file2.c
+===================================================================
+--- genesis-2.2.1.orig/src/out/out_file2.c
++++ genesis-2.2.1/src/out/out_file2.c
+@@ -82,7 +82,7 @@
+ 	** xmax 
+ 	*/
+ 	if(delta_x > 0){
+-	    xdim = round((xmax - xmin)/delta_x);
++	    xdim = genesis_round((xmax - xmin)/delta_x);
+ 	} else {
+ 	    /*
+ 	    ** if that fails then just assume a 1D array
+Index: genesis-2.2.1/src/shell/shell_ops.c
+===================================================================
+--- genesis-2.2.1.orig/src/shell/shell_ops.c
++++ genesis-2.2.1/src/shell/shell_ops.c
+@@ -201,7 +201,7 @@
+ 	return 0;
+       }
+ 
+-    return(round(Atof(optargv[1])));
++    return(genesis_round(Atof(optargv[1])));
+ }
+ 
+ float do_tan(argc,argv)
+Index: genesis-2.2.1/src/sim/sim_event.c
+===================================================================
+--- genesis-2.2.1.orig/src/sim/sim_event.c
++++ genesis-2.2.1/src/sim/sim_event.c
+@@ -314,7 +314,7 @@
+ 		< buffer->tmin + CORRECTION)
+ 	    {
+ #else
+-	    if ((round(SimulationTime() / Clockrate(buffer)) 
++	    if ((genesis_round(SimulationTime() / Clockrate(buffer)) 
+ 		 - buffer->event[(buffer->start+1) 
+ 				% buffer->size].time)
+ 		< buffer->tmin)
+@@ -734,7 +734,7 @@
+ #ifdef FLOATTIME
+     event.time = SimulationTime();
+ #else
+-    event.time = round(SimulationTime()/Clockrate(buffer));
++    event.time = genesis_round(SimulationTime()/Clockrate(buffer));
+ #endif
+     event.magnitude = magnitude;
+     /*
+Index: genesis-2.2.1/src/sys/header.h
+===================================================================
+--- genesis-2.2.1.orig/src/sys/header.h
++++ genesis-2.2.1/src/sys/header.h
+@@ -100,7 +100,7 @@
+ #define MAX(x,y)	(((x) > (y)) ? (x) : (y))
+ #define MIN(x,y)	(((x) < (y)) ? (x) : (y))
+ #endif
+-#define round(x)	((int)(0.5+(x)))
++#define genesis_round(x)	((int)(0.5+(x)))
+ #define sqr(x)		((x)*(x))
+ 
+ #ifndef PFI_DEFINED
only in patch2:
unchanged:
--- genesis-2.2.1.orig/man/man1/convert.1
+++ genesis-2.2.1/man/man1/convert.1
@@ -1,4 +1,4 @@
-.\" $Id: convert.1,v 1.3 2001/07/22 17:53:17 mhucka Exp $
+.\" $Id: convert.man,v 1.4 1995/04/01 17:43:49 dhb Exp $
 .TH CONVERT 1L "3 October 1994"
 .SH NAME
 convert \- convert GENESIS 1.x scripts to GENESIS 2.x syntax and command names

Attachment: signature.asc
Description: Digital signature

Reply via email to