rpms/perl-PDL/FC-4 perl-PDL-2.4.2-cleanup.patch, NONE, 1.1 perl-PDL-2.4.2-fix_64bit_pointers.patch, NONE, 1.1 perl-PDL-2.4.2-fix_ia64_sdump.patch, NONE, 1.1 perl-PDL.spec, 1.18, 1.19

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Mar 10 21:54:57 UTC 2006


Author: jvdias

Update of /cvs/dist/rpms/perl-PDL/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv16141

Modified Files:
	perl-PDL.spec 
Added Files:
	perl-PDL-2.4.2-cleanup.patch 
	perl-PDL-2.4.2-fix_64bit_pointers.patch 
	perl-PDL-2.4.2-fix_ia64_sdump.patch 
Log Message:
deliver fixes for bugs 163219, 158733; enable tests to succeed on all platforms

perl-PDL-2.4.2-cleanup.patch:
 Basic/Core/Core.xs.PL        |   13 +++---
 Basic/Core/pdlapi.c          |   89 +++++++++++++++++++++----------------------
 Basic/Core/pdlcore.c.PL      |    9 ++--
 Basic/Core/pdlmagic.c        |   20 ++++-----
 Basic/Core/pdlthread.c       |   10 ++--
 Basic/Core/ppport.h          |    4 +
 Basic/MatrixOps/blas.c       |    4 +
 Basic/Primitive/primitive.pd |    4 -
 Basic/Slices/slices.pd       |    6 +-
 Lib/GSL/INTERP/gslerr.h      |    3 -
 Lib/GSL/SF/gslerr.h          |    3 -
 Lib/Image2D/image2d.pd       |    2 
 Lib/Image2D/resample.c       |    5 ++
 13 files changed, 96 insertions(+), 76 deletions(-)

--- NEW FILE perl-PDL-2.4.2-cleanup.patch ---
--- PDL-2.4.2/Basic/Core/ppport.h.cleanup	2002-09-24 17:52:58.000000000 -0400
+++ PDL-2.4.2/Basic/Core/ppport.h	2006-03-10 15:17:27.000000000 -0500
@@ -224,7 +224,9 @@
 #    define PERL_UNUSED_DECL __attribute__((unused))
 #  endif
 #else
-#  define PERL_UNUSED_DECL
+#  ifndef PERL_UNUSED_DECL
+#     define PERL_UNUSED_DECL
+#  endif
 #endif
 
 #ifndef dNOOP
--- PDL-2.4.2/Basic/Core/pdlapi.c.cleanup	2004-04-30 02:34:08.000000000 -0400
+++ PDL-2.4.2/Basic/Core/pdlapi.c	2006-03-10 15:29:34.000000000 -0500
@@ -8,6 +8,7 @@
 #define PDL_CORE      /* For certain ifdefs */
 #include "pdl.h"      /* Data structure declarations */
 #include "pdlcore.h"  /* Core declarations */
+pdl_magic *pdl__print_magic(pdl *it);
 
 /* Uncomment the following if you have core dumps or strange
  * behaviour - it may reveal the cause by croaking because of
@@ -83,7 +84,7 @@
 			nvals *= it->dims[i];
 	}
 	it->nvals = nvals;
-	PDLDEBUG_f(printf("pdl_allocdata 0x%x, %d, %d\n",it, it->nvals,
+	PDLDEBUG_f(printf("pdl_allocdata %p, %d, %d\n",it, it->nvals,
 		it->datatype));
 
 	pdl_grow(it,nvals);
@@ -146,7 +147,7 @@
      it->magic = 0;
      it->hdrsv = 0;
 
-     PDLDEBUG_f(printf("CREATE 0x%x\n",it));
+     PDLDEBUG_f(printf("CREATE %p\n",it));
      return it;
 }
 
@@ -158,12 +159,12 @@
 
     /* now check if magic is still there */
     if (pdl__ismagic(it)) {
-      PDLDEBUG_f(printf("0x%x is still magic\n",it));
+      PDLDEBUG_f(printf("%p is still magic\n",it));
       PDLDEBUG_f(pdl__print_magic(it));
     }
 
     it->magicno = 0x42424245;
-    PDLDEBUG_f(printf("FREE 0x%x\n",it));
+    PDLDEBUG_f(printf("FREE %p\n",it));
 #ifndef DONT_REALLY_FREE
     if(it->dims       != it->def_dims)       free((void*)it->dims);
     if(it->dimincs    != it->def_dimincs)    free((void*)it->dimincs);
@@ -201,7 +202,7 @@
     }
     free(it);
 #endif
-    PDLDEBUG_f(printf("ENDFREE 0x%x\n",it));
+    PDLDEBUG_f(printf("ENDFREE %p\n",it));
 }
 
 void pdl__destroy_childtranses(pdl *it,int ensure) {
@@ -247,9 +248,9 @@
     pdl_trans *curt;
     PDL_DECL_CHILDLOOP(it);
     PDL_CHKMAGIC(it);
-    PDLDEBUG_f(printf("Destr. 0x%x\n",it);)
+    PDLDEBUG_f(printf("Destr. %p\n",it);)
     if(it->state & PDL_DESTROYING) {
-        PDLDEBUG_f(printf("Already Destr. 0x%x\n",it);)
+        PDLDEBUG_f(printf("Already Destr. %p\n",it);)
     	return;
     }
     it->state |= PDL_DESTROYING;
@@ -316,14 +317,14 @@
  */
     if(nafn) goto soft_destroy;
     if(pdl__magic_isundestroyable(it)) {
-        PDLDEBUG_f(printf("Magic, not Destr. 0x%x\n",it);)
+        PDLDEBUG_f(printf("Magic, not Destr. %p\n",it);)
     	goto soft_destroy;
     }
 
     pdl__destroy_childtranses(it,1);
 
     if(it->trans) {
-      PDLDEBUG_f(printf("Destr_trans. 0x%x %d\n",it->trans, it->trans->flags);)
+      PDLDEBUG_f(printf("Destr_trans. %p %d\n",it->trans, it->trans->flags);)
         /* Ensure only if there are other children! */
 	/* XXX Bad: tmp! */
       if (it->trans->flags & PDL_ITRANS_NONMUTUAL)
@@ -353,12 +354,12 @@
 
 /* ... and now we drink */
    pdl__free(it);
-   PDLDEBUG_f(printf("End destroy 0x%x\n",it);)
+   PDLDEBUG_f(printf("End destroy %p\n",it);)
 
    return;
 
   soft_destroy:
-    PDLDEBUG_f(printf("May have dependencies, not destr. %d, nu(%d, %d), nba(%d, %d), nforw(%d), tra(0x%x), nafn(%d)\n",it,
+    PDLDEBUG_f(printf("May have dependencies, not destr. %p, nu(%d, %d), nba(%d, %d), nforw(%d), tra(%p), nafn(%d)\n",it,
     			nundest, nundestp, nback, nback2, nforw, it->trans, nafn);)
     it->state &= ~PDL_DESTROYING;
 }
@@ -481,7 +482,7 @@
 	}
         for(i=0; i<nspac; i++) spaces[i]=' ';
 	spaces[i] = '\0';
-	printf("%sDUMPTRANS 0x%x (%s)\n",spaces,it,it->vtable->name);
+	printf("%sDUMPTRANS %p (%s)\n",spaces,it,it->vtable->name);
 	pdl_dump_flags_fixspace(it->flags,nspac+3,PDL_FLAGS_TRANS);
 	if(it->flags & PDL_ITRANS_ISAFFINE) {
 		pdl_trans_affine *foo = (pdl_trans_affine *)it;
@@ -502,10 +503,10 @@
 /*	if(it->vtable->dump) {it->vtable->dump(it);} */
 	printf("%s   INPUTS: (",spaces);
 	for(i=0; i<it->vtable->nparents; i++)
-		printf("%s0x%x",(i?" ":""),it->pdls[i]);
+		printf("%s%p",(i?" ":""),it->pdls[i]);
 	printf(")     OUTPUTS: (");
 	for(;i<it->vtable->npdls; i++)
-		printf("%s0x%x",(i?" ":""),it->pdls[i]);
+		printf("%s%p",(i?" ":""),it->pdls[i]);
 	printf(")\n");
 }
 
@@ -521,24 +522,24 @@
 	}
 	for(i=0; i<nspac; i++) spaces[i]=' ';
 	spaces[i] = '\0';
-	printf("%sDUMPING 0x%x     datatype: %d\n",spaces,it,it->datatype);
+	printf("%sDUMPING %p     datatype: %d\n",spaces,it,it->datatype);
 	pdl_dump_flags_fixspace(it->state,nspac+3,PDL_FLAGS_PDL);
-	printf("%s   transvtable: 0x%x, trans: 0x%x, sv: 0x%x\n",spaces,
+	printf("%s   transvtable: %p, trans: %p, sv: %p\n",spaces,
 		(it->trans?it->trans->vtable:0), it->trans, it->sv);
 	if(it->datasv) {
-		printf("%s   Data SV: 0x%x, Svlen: %d, data: 0x%x, nvals: %d\n", spaces,
+		printf("%s   Data SV: %p, Svlen: %d, data: %p, nvals: %d\n", spaces,
 			it->datasv, SvCUR((SV*)it->datasv), it->data, it->nvals);
 	}
-	printf("%s   Dims: 0x%x (",spaces,it->dims);
+	printf("%s   Dims: %p (",spaces,it->dims);
 	for(i=0; i<it->ndims; i++) {
 		printf("%s%d",(i?" ":""),it->dims[i]);
 	};
-	printf(")\n%s   ThreadIds: 0x%x (",spaces,it->threadids);
+	printf(")\n%s   ThreadIds: %p (",spaces,it->threadids);
 	for(i=0; i<it->nthreadids+1; i++) {
 		printf("%s%d",(i?" ":""),it->threadids[i]);
 	}
 	if(PDL_VAFFOK(it)) {
-		printf(")\n%s   Vaffine ok: 0x%x (parent), o:%d, i:(",
+		printf(")\n%s   Vaffine ok: %p (parent), o:%d, i:(",
 			spaces,it->vafftrans->from,it->vafftrans->offs);
 		for(i=0; i<it->ndims; i++) {
 			printf("%s%d",(i?" ":""),it->vafftrans->incs[i]);
@@ -754,10 +755,10 @@
 void pdl_make_physdims(pdl *it) {
 	int i;
 	int c = (it->state & (PDL_PARENTDIMSCHANGED | PDL_PARENTREPRCHANGED)) ;
-	PDLDEBUG_f(printf("Make_physdims 0x%x\n",it));
+	PDLDEBUG_f(printf("Make_physdims %p\n",it));
         PDL_CHKMAGIC(it);
 	if(!(it->state & (PDL_PARENTDIMSCHANGED | PDL_PARENTREPRCHANGED))) {
-	  PDLDEBUG_f(printf("Make_physdims_exit (NOP) 0x%x\n",it));
+	  PDLDEBUG_f(printf("Make_physdims_exit (NOP) %p\n",it));
 	  return;
 	}
 	it->state &= ~(PDL_PARENTDIMSCHANGED | PDL_PARENTREPRCHANGED);
@@ -769,14 +770,14 @@
 	/* doesn't this mean that all children of this trans have
 	   now their dims set and accordingly all those flags should
 	   be reset? Otherwise redodims will be called for them again? */
-	PDLDEBUG_f(printf("Make_physdims: calling redodims 0x%x on 0x%x\n",
+	PDLDEBUG_f(printf("Make_physdims: calling redodims %p on %p\n",
 			  it->trans,it));
 	it->trans->vtable->redodims(it->trans);
 	/* why this one? will the old allocated data be freed correctly? */
 	if((c & PDL_PARENTDIMSCHANGED) && (it->state & PDL_ALLOCATED)) {
 		it->state &= ~PDL_ALLOCATED;
 	}
-	PDLDEBUG_f(printf("Make_physdims_exit 0x%x\n",it));
+	PDLDEBUG_f(printf("Make_physdims_exit %p\n",it));
 }
 
 void pdl_writeover(pdl *it) {
@@ -844,7 +845,7 @@
  * a parent, and whether they need to be updated. If this is
  * the case, we need to do some thinking. */
 
-  PDLDEBUG_f(printf("make_trans_mutual 0x%x\n",trans));
+  PDLDEBUG_f(printf("make_trans_mutual %p\n",trans));
   for(i=trans->vtable->nparents; i<trans->vtable->npdls; i++) {
   	if(trans->pdls[i]->trans) fflag ++;
 	if(trans->pdls[i]->state & PDL_DATAFLOW_ANY) cfflag++;
@@ -937,7 +938,7 @@
   }
 #endif
 
-  PDLDEBUG_f(printf("make_trans_mutual_exit 0x%x\n",trans));
+  PDLDEBUG_f(printf("make_trans_mutual_exit %p\n",trans));
 
 } /* pdl_make_trans_mutual() */
 
@@ -956,7 +957,7 @@
 	int i, vaffinepar=0;
 	DECL_RECURSE_GUARD;
 
-	PDLDEBUG_f(printf("Make_physical 0x%x\n",it));
+	PDLDEBUG_f(printf("Make_physical %p\n",it));
         PDL_CHKMAGIC(it);
 
 	START_RECURSE_GUARD;
@@ -1047,7 +1048,7 @@
 	it->state &= (~PDL_ANYCHANGED) & (~PDL_OPT_ANY_OK);
 
   mkphys_end:
-	PDLDEBUG_f(printf("Make_physical_exit 0x%x\n",it));
+	PDLDEBUG_f(printf("Make_physical_exit %p\n",it));
 	END_RECURSE_GUARD;
 }
 
@@ -1096,7 +1097,7 @@
 	if(!PDL_VAFFOK(it)) {
 		croak("Vaffine not ok!, trying to use vaffinechanged");
 	}
-	PDLDEBUG_f(printf("pdl_vaffinechanged: writing back data, triggered by pdl 0x%x, using parent 0x%x\n",it,it->vafftrans->from)); 
+	PDLDEBUG_f(printf("pdl_vaffinechanged: writing back data, triggered by pdl %p, using parent %p\n",it,it->vafftrans->from)); 
 	pdl_changed(it->vafftrans->from,what,0);
 }
 
@@ -1107,7 +1108,7 @@
 	pdl_children *c; int i; int j;
 
 	PDLDEBUG_f(
-          printf("pdl_changed: entry for pdl 0x%x, what %d, recursing: %d\n",
+          printf("pdl_changed: entry for pdl %p, what %d, recursing: %d\n",
 		 it,what,recursing);
 	  if (it->state & PDL_TRACEDEBUG)
 	     pdl_dump(it);
@@ -1144,14 +1145,14 @@
 	if(it->trans && !recursing &&		(it->trans->flags & PDL_ITRANS_DO_DATAFLOW_B)) {
 		if((it->trans->flags & PDL_ITRANS_ISAFFINE) &&
 		   (PDL_VAFFOK(it))) {
-		  PDLDEBUG_f(printf("pdl_changed: calling writebackdata_vaffine (pdl 0x%x)\n",it));
+		  PDLDEBUG_f(printf("pdl_changed: calling writebackdata_vaffine (pdl %p)\n",it));
 			pdl_writebackdata_vaffine(it);
 			pdl_changed(it->vafftrans->from,what,0);
 		} else {
 			if(!it->trans->vtable->writebackdata) {
 				die("Internal error: got so close to reversing irrev.");
 			}
-			PDLDEBUG_f(printf("pdl_changed: calling writebackdata from vtable, triggered by pdl 0x%x, using trans 0x%x\n",it,it->trans));
+			PDLDEBUG_f(printf("pdl_changed: calling writebackdata from vtable, triggered by pdl %p, using trans %p\n",it,it->trans));
 			it->trans->vtable->writebackdata(it->trans);
 			for(i=0; i<it->trans->vtable->nparents; i++) {
 				if((it->trans->vtable->per_pdl_flags[i] &
@@ -1181,7 +1182,7 @@
 			c=c->next;
 		} while(c);
 	}
-	PDLDEBUG_f(printf("pdl_changed: exiting for pdl 0x%x\n",it));
+	PDLDEBUG_f(printf("pdl_changed: exiting for pdl %p\n",it));
 }
 
 /* This transformation changes soon, so make sure the children
@@ -1263,7 +1264,7 @@
 			PDL_ENSURE_ALLOCATED(trans->pdls[j]);
 	}
 
-	if(flag & PDL_PARENTDATACHANGED | flag & PDL_PARENTDIMSCHANGED) {
+	if((flag & PDL_PARENTDATACHANGED) | (flag & PDL_PARENTDIMSCHANGED)) {
 		int i;
 
 		if(par_pvaf && (trans->flags & PDL_ITRANS_ISAFFINE)) {
@@ -1316,7 +1317,7 @@
 	pdl *destbuffer[100];
 	int ndest = 0;
 
-	PDLDEBUG_f(printf("entering pdl_destroytransform 0x%x (ensure %d)\n",
+	PDLDEBUG_f(printf("entering pdl_destroytransform %p (ensure %d)\n",
 			  trans,ensure));
 	if(100 < trans->vtable->npdls) {
 		die("Huge trans");
@@ -1324,7 +1325,7 @@
 
 	PDL_TR_CHKMAGIC(trans);
 	if(!trans->vtable) {
-		die("ZERO VTABLE DESTTRAN 0x%x %d\n",trans,ensure);
+		die("ZERO VTABLE DESTTRAN %p %d\n",trans,ensure);
 	}
 	if(ensure) {
 		PDLDEBUG_f(printf("pdl_destroytransform: ensure\n"));
@@ -1334,7 +1335,7 @@
 		foo = trans->pdls[j];
 		if(!foo) continue;
 		PDL_CHKMAGIC(foo);
-		PDLDEBUG_f(printf("pdl_removectransform(0x%x): 0x%x %d\n",
+		PDLDEBUG_f(printf("pdl_removectransform(%p): %p %d\n",
 			trans, trans->pdls[j], j));
 		pdl__removechildtrans(trans->pdls[j],trans,j,1);
 		if(!(foo->state & PDL_DESTROYING) && !foo->sv) {
@@ -1344,11 +1345,11 @@
 	for(; j<trans->vtable->npdls; j++) {
 		foo = trans->pdls[j];
 		PDL_CHKMAGIC(foo);
-		PDLDEBUG_f(printf("pdl_removeptransform(0x%x): 0x%x %d\n",
+		PDLDEBUG_f(printf("pdl_removeptransform(%p): %p %d\n",
 			trans, trans->pdls[j], j));
 		pdl__removeparenttrans(trans->pdls[j],trans,j);
 		if(foo->vafftrans) {
-			PDLDEBUG_f(printf("pdl_removevafft: 0x%x\n", foo));
+			PDLDEBUG_f(printf("pdl_removevafft: %p\n", foo));
 			pdl_vafftrans_remove(foo);
 		}
 		if(!(foo->state & PDL_DESTROYING) && !foo->sv) {
@@ -1374,7 +1375,7 @@
 		pdl_destroy(destbuffer[j]);
 	}
 
-	PDLDEBUG_f(printf("leaving pdl_destroytransform 0x%x\n", trans));
+	PDLDEBUG_f(printf("leaving pdl_destroytransform %p\n", trans));
 
 }
 
@@ -1469,7 +1470,7 @@
 	int flag;
 	int incsign;
 
-	PDLDEBUG_f(printf("Make_physvaffine 0x%x\n",it));
+	PDLDEBUG_f(printf("Make_physvaffine %p\n",it));
 
 	pdl_make_physdims(it);
 
@@ -1485,7 +1486,7 @@
 
 	PDL_ENSURE_VAFFTRANS(it);
 	incsleft = malloc(sizeof(*incsleft)*it->ndims);
-        PDLDEBUG_f(printf("vaff_malloc: got 0x%x\n",incsleft));
+        PDLDEBUG_f(printf("vaff_malloc: got %p\n",incsleft));
         for(i=0; i<it->ndims; i++) {
 		it->vafftrans->incs[i] = it->dimincs[i];
 	}
@@ -1574,9 +1575,9 @@
 	pdl_make_physical(current);
 
   mkphys_vaff_end:
-       PDLDEBUG_f(printf("vaff_malloc: 0x%x\n",incsleft));
+       PDLDEBUG_f(printf("vaff_malloc: %p\n",incsleft));
        if (incsleft != NULL) free(incsleft);
-	PDLDEBUG_f(printf("Make_physvaffine_exit 0x%x\n",it));
+	PDLDEBUG_f(printf("Make_physvaffine_exit %p\n",it));
 
 }
 
--- PDL-2.4.2/Basic/Core/Core.xs.PL.cleanup	2004-12-14 12:21:49.000000000 -0500
+++ PDL-2.4.2/Basic/Core/Core.xs.PL	2006-03-10 15:21:48.000000000 -0500
@@ -62,6 +62,7 @@
 #define PDL_CORE      /* For certain ifdefs */
 #include "pdl.h"      /* Data structure declarations */
 #include "pdlcore.h"  /* Core declarations */
+void pdl_freedata (pdl *a);
 
 !NO!SUBS!
 
@@ -322,7 +323,7 @@
        1; /* Do nothing */
     else {
        self = SvPDLV(sv);
-       PDLDEBUG_f(printf("DESTROYING %d\n",self);)
+       PDLDEBUG_f(printf("DESTROYING %p\n",self);)
        if (self != NULL)
           pdl_destroy(self);
     }
@@ -463,11 +464,11 @@
   CODE:
     setflag(self->state,PDL_INPLACE,val);
 
-int
+long
 address(self)
   pdl *self;
   CODE:
-    RETVAL = (int) self;
+    RETVAL = (long) self;
   OUTPUT:
     RETVAL
 
@@ -521,7 +522,7 @@
                /* Special case: zero-length file */
                it->data = NULL;
        }
-       PDLDEBUG_f(printf("PDL::MMap: mapped to %d\n",it->data);)
+       PDLDEBUG_f(printf("PDL::MMap: mapped to %p\n",it->data);)
        it->state |= PDL_DONTTOUCHDATA | PDL_ALLOCATED;
        pdl_add_deletedata_magic(it, pdl_delete_mmapped_data, len);
        close(fd);
@@ -567,7 +568,7 @@
 #     RETVAL = pdl_copy(a,""); /* Init value to return */
 #     b = SvPDLV(RETVAL);      /* Map */
 #     pdl_converttype( &b, datatype, PDL_PERM );
-#     PDLDEBUG_f(printf("converted %d, %d, %d, %d\n",a, b, a->datatype, b->datatype));
+#     PDLDEBUG_f(printf("converted %lu, %lu, %d, %d\n",a, b, a->datatype, b->datatype));
 
 #     OUTPUT:
 #      RETVAL
@@ -1318,7 +1319,7 @@
 		}
 	    	PUTBACK;
 		perl_call_sv(code,G_DISCARD);
-	    } while(sd = pdl_iterthreadloop(&pdl_thr,0));
+	    } while((sd = pdl_iterthreadloop(&pdl_thr,0))!=0L);
 	    pdl_freethreadloop(&pdl_thr);
 	    free(pdls);
 	    free(realdims);
--- PDL-2.4.2/Basic/Core/pdlthread.c.cleanup	2003-04-19 06:55:41.000000000 -0400
+++ PDL-2.4.2/Basic/Core/pdlthread.c	2006-03-10 15:17:27.000000000 -0500
@@ -32,7 +32,7 @@
 void dump_thread(pdl_thread *thread) {
   int i;
   char spaces[] = "    ";
-  printf("DUMPTHREAD 0x%x \n",thread);
+  printf("DUMPTHREAD %p \n",thread);
   if (0&& thread->einfo) {
     psp; printf("Funcname: %s\n",thread->einfo->funcname);
     psp; printf("Paramaters: ");
@@ -50,7 +50,7 @@
   psp; printf("Realdims: "); print_iarr(thread->realdims,thread->npdls); printf("\n");
   psp; printf("Pdls: (");
   for (i=0;i<thread->npdls;i++)
-    printf("%s0x%x",(i?" ":""),thread->pdls[i]);
+    printf("%s%p",(i?" ":""),thread->pdls[i]);
   printf(")\n");
   psp; printf("Per pdl flags: (");
   for (i=0;i<thread->npdls;i++)
@@ -101,7 +101,7 @@
 }
 
 void pdl_freethreadloop(pdl_thread *thread) {
-	PDLDEBUG_f(printf("Freethreadloop(0x%x, 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x)\n",
+	PDLDEBUG_f(printf("Freethreadloop(%p, %p %p %p %p %p %p)\n",
 		thread,
 		thread->inds, thread->dims, thread->offs, thread->incs,
 		thread->flags, thread->pdls);)
@@ -117,7 +117,7 @@
 }
 
 void pdl_clearthreadstruct(pdl_thread *it) {
-	PDLDEBUG_f(printf("Clearthreadloop(0x%x)\n", it);)
+	PDLDEBUG_f(printf("Clearthreadloop(%p)\n", it);)
 	it->einfo = 0;it->inds = 0;it->dims = 0;
 	it->ndims = it->nimpl = it->npdls = 0; it->offs = 0;
 	it->pdls = 0;it->incs = 0; it->realdims=0; it->flags=0;
@@ -151,7 +151,7 @@
 	int *nthreadids;
 	int nthr = 0; int nthrd;
 
-	PDLDEBUG_f(printf("Initthreadloop(0x%x)\n", thread);)
+	PDLDEBUG_f(printf("Initthreadloop(%p)\n", thread);)
 #ifdef PDL_THREAD_DEBUG
 	  /* the following is a fix for a problem in the current core logic
            * see comments in pdl_make_physical in pdlapi.c
--- PDL-2.4.2/Basic/Core/pdlcore.c.PL.cleanup	2004-10-16 12:41:26.000000000 -0400
+++ PDL-2.4.2/Basic/Core/pdlcore.c.PL	2006-03-10 15:26:45.000000000 -0500
@@ -487,6 +487,7 @@
   if (at >= 0 && at < dsz) return at;
   pdl_barf("access [%d] out of range [0..%d] (inclusive) at %s line %d",
           at, dsz-1, file?file:"?", lineno);
+  return 0L;
 }
 
 /*
@@ -643,7 +644,7 @@
          /* Recurse to find depth inside the array reference */
          newdepth = 1 + av_ndcheck((AV *) SvRV(el), dims, level+1, datalevel);
       
-      } else if ( pdl = SvPDLV(el) ) {
+      } else if ( (pdl = SvPDLV(el)) != 0L ) {
 	int j;
 	
 	/* It is a PDL - walk down its dimension list, exactly as if it
@@ -825,6 +826,7 @@
 
     /* pad this level to zero if there are not enough elements */
     if(i < pdims[level]) 
+    { 
 	if(level<ndims-1) {
 	    pdata += stride*i;
 	    pdims[level] -= i;
@@ -837,6 +839,7 @@
 		pdata += stride;
 	    }
 	}
+    }
   } else {
       switch(pdl->datatype) {
 !WITH!SUBS!
@@ -920,7 +923,7 @@
        undef_count += pdl_setav_$type(pdata, (AV *) SvRV(el), pdims, ndims, level+1);
     else if( SvROK(el) ) {
       pdl *pdl;
-      if( pdl = SvPDLV(el) ) {
+      if( (pdl = SvPDLV(el)) != 0 ) {
 
 	pdl_make_physical(pdl);
 
@@ -965,7 +968,7 @@
   }
   
   if(level==0 && debug_flag && undefval && undef_count) {
-      fprintf(stderr,"Warning: pdl_setav_$type converted undef to $PDL::undefval (%g) %d time%s\\n",undefval,undef_count,undef_count==1?"":"s");
+      fprintf(stderr,"Warning: pdl_setav_$type converted undef to $PDL::undefval (%g) %ld time%s\\n",undefval,undef_count,undef_count==1?"":"s");
   }
 
   return undef_count;
--- PDL-2.4.2/Basic/Core/pdlmagic.c.cleanup	2002-09-09 14:20:31.000000000 -0400
+++ PDL-2.4.2/Basic/Core/pdlmagic.c	2006-03-10 15:31:56.000000000 -0500
@@ -6,7 +6,7 @@
 #endif
 
 #include "pdlcore.h"
-
+#include <sys/mman.h>
 /* Singly linked list */
 /* Note that this zeroes ->next!) */
 
@@ -92,7 +92,7 @@
 {
 	pdl_magic **foo = &(it->magic);
 	while(*foo) {
-	  printf("Magic %d\ttype: ",*foo);
+	    printf("Magic %lu\ttype: ",(unsigned long)*foo);
 		if((*foo)->what & PDL_MAGIC_MARKCHANGED)
 		  printf("PDL_MAGIC_MARKCHANGED");
 		else if ((*foo)->what & PDL_MAGIC_MUTATEDPARENT)
@@ -233,10 +233,10 @@
 
 static void *pthread_perform(void *vp) {
 	struct ptarg *p = (ptarg *)vp;
-	if(TVERB) printf("STARTING THREAD %d (%d)\n",p->no, pthread_self());
+	if(TVERB) printf("STARTING THREAD %d (%lu)\n",p->no, (unsigned long)pthread_self());
 	pthread_setspecific(p->mag->key,(void *)&(p->no));
 	(p->func)(p->t);
-	if(TVERB) printf("ENDING THREAD %d (%d)\n",p->no, pthread_self());
+	if(TVERB) printf("ENDING THREAD %d (%lu)\n",p->no, (unsigned long)pthread_self());
 	return NULL;
 }
 
@@ -270,8 +270,8 @@
 	tp = malloc(sizeof(pthread_t) * ptr->nthreads);
 	tparg = malloc(sizeof(*tparg) * ptr->nthreads);
 	pthread_key_create(&(ptr->key),NULL);
-	if(TVERB) printf("CREATING THREADS, ME: %d, key: %d\n",pthread_self(),
-		ptr->key);
+	if(TVERB) printf("CREATING THREADS, ME: %lu, key: %lu\n",(unsigned long)pthread_self(),
+			 (unsigned long)(ptr->key));
 	for(i=0; i<ptr->nthreads; i++) {
 		tparg[i].mag = ptr;
 		tparg[i].func = func;
@@ -279,13 +279,13 @@
 		tparg[i].no = i;
 		pthread_create(tp+i, NULL, pthread_perform, tparg+i);
 	}
-	if(TVERB) printf("JOINING THREADS, ME: %d, key: %d\n",pthread_self(),
-		ptr->key);
+	if(TVERB) printf("JOINING THREADS, ME: %lu, key: %lu\n",(unsigned long)pthread_self(),
+			 (unsigned long)ptr->key);
 	for(i=0; i<ptr->nthreads; i++) {
 		pthread_join(tp[i], NULL);
 	}
-	if(TVERB) printf("FINISHED THREADS, ME: %d, key: %d\n",pthread_self(),
-		ptr->key);
+	if(TVERB) printf("FINISHED THREADS, ME: %d, key: %d\n",(unsigned long)pthread_self(),
+			 (unsigned long)ptr->key);
 	pthread_key_delete((ptr->key));
 }
 
--- PDL-2.4.2/Basic/Slices/slices.pd.cleanup	2004-12-14 12:21:53.000000000 -0500
+++ PDL-2.4.2/Basic/Slices/slices.pd	2006-03-10 15:34:43.000000000 -0500
@@ -116,9 +116,9 @@
 			$EQUIVCPOFFS(i,poffs);
 			for(nd=0; nd<$CHILD_P(ndims); nd++) {
 				poffs += $PRIV(incs[nd]);
-				if(nd<$CHILD_P(ndims)-1 &&
-				   (i+1)%$CHILD_P(dimincs[nd+1]) ||
-				   nd == $CHILD_P(ndims)-1)
+				if(((nd<$CHILD_P(ndims)-1) &&
+				   ((i+1)%$CHILD_P(dimincs[nd+1]))) ||
+				   (nd == $CHILD_P(ndims)-1))
 					break;
 				poffs -= $PRIV(incs[nd]) *
 					$CHILD_P(dims[nd]);
--- PDL-2.4.2/Basic/Primitive/primitive.pd.cleanup	2004-12-14 12:21:52.000000000 -0500
+++ PDL-2.4.2/Basic/Primitive/primitive.pd	2006-03-10 15:17:27.000000000 -0500
@@ -1578,7 +1578,7 @@
   		   while (jh-jl > 1)  /* binary search */
     			{
       				m = (jh+jl) >> 1;
-      				if ($i() > $x(n => m) == up)
+      				if (($i() > $x(n => m)) == up)
 					jl = m;
       				else
 					jh = m;
@@ -1643,7 +1643,7 @@
   		   while (jh-jl > 1)  /* binary search */
     			{
       				m = (jh+jl) >> 1;
-      				if ($xi() > $x(n => m) == up)
+      				if (($xi() > $x(n => m)) == up)
 					jl = m;
       				else
 					jh = m;
--- PDL-2.4.2/Basic/MatrixOps/blas.c.cleanup	2002-11-19 19:16:16.000000000 -0500
+++ PDL-2.4.2/Basic/MatrixOps/blas.c	2006-03-10 15:36:38.000000000 -0500
@@ -6,6 +6,7 @@
  * by column vector V of dimension c on the right
  * to produce a (column) vector Y output of dimension r.
  */
+void
 mvmpy( r, c, A, V, Y )
 int r, c;
 double *A, *V, *Y;
@@ -33,6 +34,7 @@
  * by a c (rows) by r (columns) matrix B on the right
  * to produce an r by r matrix Y.
  */
+void
 mmmpy( r, c, A, B, Y )
 int r, c;
 double *A, *B, *Y;
@@ -65,6 +67,7 @@
 /* Transpose the n by n square matrix A and put the result in T.
  * T may occupy the same storage as A.
  */
+void
 mtransp( n, A, T )
 int n;
 double *A, *T;
@@ -132,6 +135,7 @@
 /* Unpack symmetric matrix T stored in lower triangular form
  * into a symmetric n by n square matrix S.
  */
+void
 tritosquare( n, T, S )
 int n;
 double T[], S[];
--- PDL-2.4.2/Lib/GSL/SF/gslerr.h.cleanup	2002-06-29 04:44:44.000000000 -0400
+++ PDL-2.4.2/Lib/GSL/SF/gslerr.h	2006-03-10 15:17:27.000000000 -0500
@@ -1,5 +1,6 @@
+#include <gsl/gsl_errno.h>
 
 static int status;
 static char buf[200];
 
-#define GSLERR(x,y) if (status = x y) {sprintf(buf,"Error in %s: %s",# x ,gsl_strerror(status));barf(buf);}
+#define GSLERR(x,y) if ((status = x y) != 0) {sprintf(buf,"Error in %s: %s",# x ,gsl_strerror(status));barf(buf);}
--- PDL-2.4.2/Lib/GSL/INTERP/gslerr.h.cleanup	2003-01-29 13:29:06.000000000 -0500
+++ PDL-2.4.2/Lib/GSL/INTERP/gslerr.h	2006-03-10 15:17:27.000000000 -0500
@@ -1,5 +1,6 @@
+#include <gsl/gsl_errno.h>
 
 static int status;
 static char buf[200];
 
-#define GSLERR(x,y) if (status = x y) {sprintf(buf,"Error in %s: %s",# x ,gsl_strerror(status));barf(buf);}
+#define GSLERR(x,y) if ((status = x y) != 0) {sprintf(buf,"Error in %s: %s",# x ,gsl_strerror(status));barf(buf);}
--- PDL-2.4.2/Lib/Image2D/resample.c.cleanup	2000-10-18 01:25:33.000000000 -0400
+++ PDL-2.4.2/Lib/Image2D/resample.c	2006-03-10 15:17:27.000000000 -0500
@@ -26,6 +26,11 @@
  */
 /*--------------------------------------------------------------------------*/
 
+#include <sys/types.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <string.h>
+
 double ipow(double x, int p)
 {
 	double r, recip ;
--- PDL-2.4.2/Lib/Image2D/image2d.pd.cleanup	2003-11-21 23:11:31.000000000 -0500
+++ PDL-2.4.2/Lib/Image2D/image2d.pd	2006-03-10 15:17:27.000000000 -0500
@@ -1165,10 +1165,12 @@
 	Code => 'int ierr;
 		 if ((ierr = rotate($P(im),$P(om),$SIZE(m),$SIZE(n),$SIZE(p),
 			$SIZE(q),$angle(),$bg(),$aa())) != 0)
+		 {
 			if (ierr == -1)
 				croak("error during rotate, wrong angle");
 			else
 				croak("wrong output dims, did you set them?");
+                 }
 		',
 	# ugly workaround since $SIZE(m) and $SIZE(n) are not initialized
 	# when the redodimscode is called

perl-PDL-2.4.2-fix_64bit_pointers.patch:
 INTERP/gsl_interp.pd |   18 +++++++++---------
 RNG/gsl_random.pd    |   38 +++++++++++++++++++-------------------
 2 files changed, 28 insertions(+), 28 deletions(-)

--- NEW FILE perl-PDL-2.4.2-fix_64bit_pointers.patch ---
--- PDL-2.4.2/Lib/GSL/RNG/gsl_random.pd.fix_64bit_pointers	2002-12-02 11:58:34.000000000 -0500
+++ PDL-2.4.2/Lib/GSL/RNG/gsl_random.pd	2006-03-09 19:15:01.000000000 -0500
@@ -676,7 +676,7 @@
        'gsl_get_uniform_meat',
        Pars => '[o]a()',
        GenericTypes => [F,D],
-       OtherPars => 'int rng',
+       OtherPars => 'long rng',
        Code => '
 $a() = gsl_rng_uniform((gsl_rng *) $COMP(rng));');
 
@@ -684,21 +684,21 @@
        'gsl_get_uniform_pos_meat',
        Pars => '[o]a()',
        GenericTypes => [F,D],
-       OtherPars => 'int rng',
+       OtherPars => 'long rng',
        Code => '
 $a() = gsl_rng_uniform_pos((gsl_rng *) $COMP(rng));');
 
 pp_defnd(
        'gsl_get_meat',
        Pars => '[o]a()',
-       OtherPars => 'int rng',
+       OtherPars => 'long rng',
        Code => '
 $a() = gsl_rng_get((gsl_rng *) $COMP(rng));');
 
 pp_defnd(
        'gsl_get_int_meat',
        Pars => '[o]a()',
-       OtherPars => 'int n; int rng',
+       OtherPars => 'int n; long rng',
        Code => '
 $a() = gsl_rng_uniform_int((gsl_rng *) $COMP(rng),$COMP(n));');
 
@@ -709,21 +709,21 @@
   my ($pars1,$fcall1,$arglist);
   
   if ($npar==1) {
-    $pars1='double a; int rng';
+    $pars1='double a; long rng';
     $fcall1='$COMP(a)';
     $arglist='$a,';
     $pars2='a()';
     $fcall2='$a()';
   }
   if ($npar==2) {
-    $pars1='double a; double b; int rng';
+    $pars1='double a; double b; long rng';
     $fcall1='$COMP(a),$COMP(b)';
     $arglist='$a,$b,';
     $pars2='a();b()';
     $fcall2='$a(),$b()';
   }
   if ($npar==3) {
-    $pars1='double a; double b; double c; int rng';
+    $pars1='double a; double b; double c; long rng';
     $fcall1='$COMP(a),$COMP(b),$COMP(c)';
     $arglist='$a,$b,$c,';
     $pars2='a();b();c()';
@@ -757,7 +757,7 @@
   pp_defnd(
 	 'ran_' . $name . '_var_meat',
 	 Pars => $pars2 . ';[o]x()',
-	 OtherPars => 'int rng',
+	 OtherPars => 'long rng',
 	 Code =>'
 $x() = gsl_ran_' . $name . '((gsl_rng *) $COMP(rng),' . $fcall2 . ');');
 
@@ -793,7 +793,7 @@
 #    pp_defnd(
 #	   'ran_' . $name . '_feed_meat',
 #	   Pars => '[o]x()',
-#	   OtherPars => 'int rng',
+#	   OtherPars => 'long rng',
 #	   Code =>'
 #$x() = gsl_ran_' . $name . '((gsl_rng *) $COMP(rng), $x());');
 
@@ -848,7 +848,7 @@
 pp_defnd(
        'ran_additive_gaussian_meat',
        Pars => ';[o]x()',
-       OtherPars => 'double sigma; int rng',
+       OtherPars => 'double sigma; long rng',
        Code =>'$x() += gsl_ran_gaussian((gsl_rng *) $COMP(rng), $COMP(sigma));');
 
 pp_addpm('
@@ -867,7 +867,7 @@
 pp_defnd(
        'ran_additive_poisson_meat',
        Pars => ';[o]x()',
-       OtherPars => 'double sigma; int rng',
+       OtherPars => 'double sigma; long rng',
        Code =>'$x() += gsl_ran_poisson((gsl_rng *) $COMP(rng), $COMP(sigma));');
 
 pp_addpm('
@@ -886,7 +886,7 @@
 pp_defnd(
        'ran_feed_poisson_meat',
        Pars => ';[o]x()',
-       OtherPars => 'int rng',
+       OtherPars => 'long rng',
        Code =>'$x() = gsl_ran_poisson((gsl_rng *) $COMP(rng), $x());');
 
 pp_addpm('
@@ -905,7 +905,7 @@
 pp_defnd(
 	'ran_bivariate_gaussian_meat',
 	Pars => ';[o]x(n)',
-	OtherPars => 'double sigma_x; double sigma_y; double rho; int rng',
+	OtherPars => 'double sigma_x; double sigma_y; double rho; long rng',
         Code =>'
 double xx,yy;
 gsl_ran_bivariate_gaussian((gsl_rng *) $COMP(rng), $COMP(sigma_x), $COMP(sigma_y),$COMP(rho), &xx, &yy);
@@ -930,7 +930,7 @@
 pp_defnd(
 	'ran_dir_2d_meat',
 	Pars => ';[o]x(n)',
-	OtherPars => 'int rng',
+	OtherPars => 'long rng',
         Code =>'
 double xx,yy;
 gsl_ran_dir_2d((gsl_rng *) $COMP(rng), &xx, &yy);
@@ -941,7 +941,7 @@
 pp_defnd(
 	'ran_dir_3d_meat',
 	Pars => ';[o]x(n)',
-	OtherPars => 'int rng',
+	OtherPars => 'long rng',
         Code =>'
 double xx,yy,zz;
 gsl_ran_dir_3d((gsl_rng *) $COMP(rng), &xx, &yy, &zz);
@@ -955,7 +955,7 @@
 pp_defnd(
 	'ran_dir_nd_meat',
 	Pars => ';[o]x(n)',
-	OtherPars => 'int ns => n; int rng',
+	OtherPars => 'int ns => n; long rng',
         Code =>'
 double xxx[' . $MAX_DIMENSIONS .']; 
 gsl_ran_dir_nd((gsl_rng *) $COMP(rng), $COMP(ns), xxx);
@@ -981,7 +981,7 @@
 pp_defnd(
 	'ran_discrete_meat',
 	Pars => ';[o]x()',
-	OtherPars => 'int rng_discrete; int rng',
+	OtherPars => 'long rng_discrete; long rng',
         Code =>'
 $x()=gsl_ran_discrete((gsl_rng *) $COMP(rng), (gsl_ran_discrete_t *) $COMP(rng_discrete)); ');	
 
@@ -1035,7 +1035,7 @@
 pp_defnd(
 	'ran_ver_meat',
 	Pars => ';[o]x(n)',
-	OtherPars => 'double x0; double r;int ns => n; int rng',
+	OtherPars => 'double x0; double r;int ns => n; long rng',
         Code =>'
 double xx=$COMP(x0);
 
@@ -1044,7 +1044,7 @@
 pp_defnd(
 	'ran_caos_meat',
 	Pars => ';[o]x(n)',
-	OtherPars => 'double m; int ns => n; int rng',
+	OtherPars => 'double m; int ns => n; long rng',
         Code =>'
 double xx=gsl_ran_gaussian((gsl_rng *) $COMP(rng),0.1)+0.5;
 
--- PDL-2.4.2/Lib/GSL/INTERP/gsl_interp.pd.fix_64bit_pointers	2003-03-12 15:10:50.000000000 -0500
+++ PDL-2.4.2/Lib/GSL/INTERP/gsl_interp.pd	2006-03-09 19:14:08.000000000 -0500
@@ -255,7 +255,7 @@
 
 pp_def('init_meat',
         Pars => 'double x(n); double y(n);',
-        OtherPars => 'int spl',
+        OtherPars => 'long spl',
         Doc => undef,
         Code =>'
 GSLERR(gsl_spline_init,( (gsl_spline *) $COMP(spl), $P(x),$P(y),$SIZE(n)));'
@@ -280,14 +280,14 @@
 
 pp_def('eval_meat',
         Pars => 'double x(); double [o] out();',
-        OtherPars => 'int spl;int acc;',
+        OtherPars => 'long spl;long acc;',
         Doc => undef,
         Code =>'	     
 GSLERR(gsl_spline_eval_e,( (gsl_spline *) $COMP(spl), $x(), (gsl_interp_accel *) $COMP(acc), $P(out)));
 ');
 pp_def('eval_meat_ext',
         Pars => 'double x(); double [o] out();',
-        OtherPars => 'int spl;int acc;',
+        OtherPars => 'long spl;long acc;',
         Doc => undef,
         Code =>'	     
 $out() = gsl_spline_eval( (gsl_spline *) $COMP(spl), $x(), (gsl_interp_accel *) $COMP(acc));
@@ -314,14 +314,14 @@
 
 pp_def('eval_deriv_meat',
         Pars => 'double x(); double [o] out();',
-        OtherPars => 'int spl;int acc;',
+        OtherPars => 'long spl;long acc;',
         Doc => undef,
 	Code =>'
 GSLERR(gsl_spline_eval_deriv_e,( (gsl_spline *) $COMP(spl), $x(), (gsl_interp_accel *) $COMP(acc), $P(out)));
 ');
 pp_def('eval_deriv_meat_ext',
         Pars => 'double x(); double [o] out();',
-        OtherPars => 'int spl;int acc;',
+        OtherPars => 'long spl;long acc;',
         Doc => undef,
 	Code =>'
 $out() = gsl_spline_eval_deriv( (gsl_spline *) $COMP(spl), $x(), (gsl_interp_accel *) $COMP(acc));
@@ -346,14 +346,14 @@
 
 pp_def('eval_deriv2_meat',
         Pars => 'double x(); double [o] out();',
-        OtherPars => 'int spl;int acc;',
+        OtherPars => 'long spl;long acc;',
         Doc => undef,
 	Code =>'
 GSLERR(gsl_spline_eval_deriv2_e,( (gsl_spline *) $COMP(spl), $x(), (gsl_interp_accel *) $COMP(acc), $P(out)));
 ');
 pp_def('eval_deriv2_meat_ext',
         Pars => 'double x(); double [o] out();',
-        OtherPars => 'int spl;int acc;',
+        OtherPars => 'long spl;long acc;',
         Doc => undef,
 	Code =>'
 $out() = gsl_spline_eval_deriv2( (gsl_spline *) $COMP(spl), $x(), (gsl_interp_accel *) $COMP(acc));
@@ -378,14 +378,14 @@
 
 pp_def('eval_integ_meat',
         Pars => 'double a(); double b(); double [o] out();',
-	OtherPars => 'int spl;int acc;',
+	OtherPars => 'long spl;long acc;',
         Doc => undef,
 	Code =>'
 GSLERR(gsl_spline_eval_integ_e,( (gsl_spline *) $COMP(spl), $a(), $b(), (gsl_interp_accel *) $COMP(acc),$P(out)));
 ');
 pp_def('eval_integ_meat_ext',
         Pars => 'double a(); double b(); double [o] out();',
-	OtherPars => 'int spl;int acc;',
+	OtherPars => 'long spl;long acc;',
         Doc => undef,
 	Code =>'
 $out() = gsl_spline_eval_integ( (gsl_spline *) $COMP(spl), $a(), $b(), (gsl_interp_accel *) $COMP(acc));

perl-PDL-2.4.2-fix_ia64_sdump.patch:
 Dumper.pm |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE perl-PDL-2.4.2-fix_ia64_sdump.patch ---
--- PDL-2.4.2/IO/Dumper.pm.fix_ia64_sdump	2004-02-04 18:10:53.000000000 -0500
+++ PDL-2.4.2/IO/Dumper.pm	2006-03-09 16:06:20.000000000 -0500
@@ -151,7 +151,7 @@
   my($s) = Data::Dumper->Dump([@_]);
   my(%pdls);
 # Find the bless(...,'PDL') lines
-  while($s =~ s/bless\( do\{\\\(my \$o \= (\d+)\)\}\, \'PDL\' \)/\$PDL_$1/) {
+  while($s =~ s/bless\( do\{\\\(my \$o \= \'?(\d+)\'?\)\}\, \'PDL\' \)/\$PDL_$1/) {
     $pdls{$1}++;
   }
 


Index: perl-PDL.spec
===================================================================
RCS file: /cvs/dist/rpms/perl-PDL/FC-4/perl-PDL.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- perl-PDL.spec	9 Mar 2006 16:53:16 -0000	1.18
+++ perl-PDL.spec	10 Mar 2006 21:54:55 -0000	1.19
@@ -8,6 +8,9 @@
 Url:            http://search.cpan.org/dist/PDL/
 Source0:        http://www.cpan.org/authors/id/C/CS/CSOE/PDL-%{version}.tar.gz
 Patch0:         perl-PDL-settings.patch
+Patch1:		perl-PDL-2.4.2-fix_ia64_sdump.patch
+Patch2:		perl-PDL-2.4.2-fix_64bit_pointers.patch
+Patch3:		perl-PDL-2.4.2-cleanup.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  perl >= 1:5.6.1
@@ -21,6 +24,8 @@
 Provides:       perl(PDL::Graphics::TriD::GL), perl(PDL::Graphics::TriD::Image)
 Provides:       perl(PDL::Graphics::TriD::Tk)
 
+%{?!DEBUG:      %define DEBUG 0}
+
 %description
 PDL ("Perl Data Language") gives standard Perl the ability to
 compactly store and speedily manipulate the large N-dimensional data
@@ -32,7 +37,9 @@
 %prep
 %setup -q -n PDL-%{version} 
 %patch0 -p1 -b .settings
-
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1 -b .cleanup
 # Provides: explicitly filter perl(Inline)
 cat <<__EOF__ > %{name}-findperlprovides
 #!/bin/sh
@@ -49,17 +56,28 @@
 %define __perl_requires %{_builddir}/PDL-%{version}/%{name}-findperlrequires
 chmod +x %{__perl_requires}
 
+%if %{DEBUG}
+%define debug_package %{nil}
+%endif
+
 %build
-export PERL5LIB=`pwd`/blib/lib
+export PERL5LIB=`pwd`/blib/lib:`pwd`/blib/arch:
 #^- can no longer build if perl-PDL is not installed without above
 #
-CFLAGS="$RPM_OPT_FLAGS" %{__perl} Makefile.PL INSTALLDIRS=vendor
-make OPTIMIZE="$RPM_OPT_FLAGS"
+%if %{DEBUG}
+CFLAGS=`echo "$RPM_OPT_FLAGS -Wno-unused" | sed 's/-O2 -g/-g3 -gdwarf-2/'`
+%else
+CFLAGS="$RPM_OPT_FLAGS -Wno-unused"
+%endif
+%ifarch ppc ppc64 s390 s390x
+CFLAGS="$CFLAGS -fsigned-char"
+%endif
+CFLAGS="$CFLAGS" %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$CFLAGS"
+make OPTIMIZE="$CFLAGS"
 # smp flags blows up spectacularly (2.4.1-10 May 7th 2005)
 
 %install
 rm -rf $RPM_BUILD_ROOT
-export PERL5LIB=`pwd`/blib/lib
 make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
 %{__perl} -Mblib Doc/scantree.pl $RPM_BUILD_ROOT%{perl_vendorarch}
 %{__perl} -pi -e "s|$RPM_BUILD_ROOT/|/|g" \
@@ -69,10 +87,13 @@
 find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -exec rm -f {} ';'
 find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
 chmod -R u+w $RPM_BUILD_ROOT/*
-
 file=$RPM_BUILD_ROOT%{_mandir}/man3/PDL::Func.3pm
 iconv -f iso-8859-1 -t utf-8 < "$file" > "${file}_"
 mv -f "${file}_" "$file"
+%if %{DEBUG}
+/usr/lib/rpm/brp-compress
+exit 0
+%endif
 
 %check || :
 export PERL5LIB=`pwd`/blib/lib
@@ -94,7 +115,14 @@
 
 
 %changelog
-* Fri Feb 03 2006 Jason Vas Dias <jvdias at redhat.com> - 2.4.2-2.fc5.1.2
+* Fri Mar 10 2006 Jason Vas Dias <jvdias at redhat.com> - 2.4.2-2
+- Further code cleanup & CFLAGS settings required to enable tests 
+  to succeed on all platforms
+
+* Thu Mar 09 2006 Jason Vas Dias <jvdias at redhat.com> - 2.4.2-2
+- Enable tests to succeed on ia64 (remove casts from int to * !)
+
+* Fri Feb 03 2006 Jason Vas Dias <jvdias at redhat.com> - 2.4.2-2
 - rebuild for new perl-5.8.8
 - enable build to succeed without perl-PDL being installed :-)
 




More information about the fedora-cvs-commits mailing list