--- genus2reduction-0.3.orig/debian/control +++ genus2reduction-0.3/debian/control @@ -0,0 +1,24 @@ +Source: genus2reduction +Section: math +Priority: optional +Maintainer: Tim Abbott +Homepage: http://www.math.u-bordeaux.fr/~liu/G2R/ +Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5), quilt, patchutils (>= 0.2.25), cdbs (>= 0.4.27), libpari-dev (>= 2.5.0), libgmp3-dev +Standards-Version: 3.7.3 + +Package: genus2reduction +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Conductor and Reduction Types for Genus 2 Curves + genus2reduction is a program for computing the conductor and + reduction types for a genus 2 hyperelliptic curve. + . + As an example of genus2reduction's functionality, let C be a proper smooth + curve of genus 2 defined by a hyperelliptic equation y^2+Q(x)y=P(x), where + P(x) and Q(x) are polynomials with rational coefficients such that + deg(Q(x))<4, deg(P(x))<7. Let J(C) be the Jacobian of C, let X be the minimal + regular model of C over the ring of integers Z. + . + This program determines the reduction of C at any prime number p (that + is the special fiber X_p of X over p), and the exponent f of the conductor + of J(C) at p. --- genus2reduction-0.3.orig/debian/copyright +++ genus2reduction-0.3/debian/copyright @@ -0,0 +1,33 @@ +This package was debianized by Tim Abbott in 2008. + +It was downloaded from http://sagemath.org + +Upstream Author: Qing Liu + and Henri Cohen + +It is currently maintained by William Stein + +Copyright: (C) 1994-1998 Qing Liu and Henry Cohen + (C) 2006 William Stein + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The Debian packaging is (C) 2008, Tim Abbott and is +licensed under the GPL, see above. --- genus2reduction-0.3.orig/debian/compat +++ genus2reduction-0.3/debian/compat @@ -0,0 +1 @@ +5 --- genus2reduction-0.3.orig/debian/changelog +++ genus2reduction-0.3/debian/changelog @@ -0,0 +1,34 @@ +genus2reduction (0.3-2.2) unstable; urgency=low + + * Non-maintainer upload. + * Fix "Unversioned build-dependency on libpari-dev": make it versioned. + (Closes: #644091) + * Fix "Please allow building with ld --as-needed": + add patch from Ubuntu / Andreas Moog: + - Libraries needed to link the package should go into LDADD and after + sources on the linker command line to fix an issue with ld --as-needed + (LP: #770735) + (Closes: #634342) + + -- gregor herrmann Mon, 05 Dec 2011 18:59:09 +0100 + +genus2reduction (0.3-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * debian/patches/pari_2.5.patch: + - Port to pari 2.5 API (Closes: #635507, #635917). + + -- Luca Falavigna Sun, 14 Aug 2011 15:26:01 +0200 + +genus2reduction (0.3-2) unstable; urgency=low + + * Improve description and copyright file. + * Set priority to Optional. + + -- Tim Abbott Fri, 20 Jun 2008 21:30:57 -0400 + +genus2reduction (0.3-1) unstable; urgency=low + + * Initial release (Closes: #480091). + + -- Tim Abbott Tue, 27 May 2008 20:14:20 -0400 --- genus2reduction-0.3.orig/debian/control.in +++ genus2reduction-0.3/debian/control.in @@ -0,0 +1,24 @@ +Source: genus2reduction +Section: math +Priority: optional +Maintainer: Tim Abbott +Homepage: http://www.math.u-bordeaux.fr/~liu/G2R/ +Build-Depends: @cdbs@, libpari-dev (>= 2.5.0), libgmp3-dev +Standards-Version: 3.7.3 + +Package: genus2reduction +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Conductor and Reduction Types for Genus 2 Curves + genus2reduction is a program for computing the conductor and + reduction types for a genus 2 hyperelliptic curve. + . + As an example of genus2reduction's functionality, let C be a proper smooth + curve of genus 2 defined by a hyperelliptic equation y^2+Q(x)y=P(x), where + P(x) and Q(x) are polynomials with rational coefficients such that + deg(Q(x))<4, deg(P(x))<7. Let J(C) be the Jacobian of C, let X be the minimal + regular model of C over the ring of integers Z. + . + This program determines the reduction of C at any prime number p (that + is the special fiber X_p of X over p), and the exponent f of the conductor + of J(C) at p. --- genus2reduction-0.3.orig/debian/rules +++ genus2reduction-0.3/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/makefile.mk +include /usr/share/cdbs/1/rules/patchsys-quilt.mk + +CFLAGS += -I/usr/include/pari +LDADD += -lpari +DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(DEB_DESTDIR) --- genus2reduction-0.3.orig/debian/patches/pari_2.5.patch +++ genus2reduction-0.3/debian/patches/pari_2.5.patch @@ -0,0 +1,290 @@ +Index: genus2reduction-0.3/genus2reduction.c +=================================================================== +--- genus2reduction-0.3.orig/genus2reduction.c 2011-08-13 23:10:02.622871337 +0000 ++++ genus2reduction-0.3/genus2reduction.c 2011-08-13 23:13:56.302871205 +0000 +@@ -86,7 +86,7 @@ + long tt,d,d1,d2,d3,f1,f2,g,h,v1,v2,j2m,r1,r2,r3,r4,dismin,alpha,lambda; + long indice,vc6,mm,nb,dism,maxc,condp,R,alpha1,comp,beta,vy,dd,pr,ip,j,temp; + +- init(10000000,500000); ++ pari_init(10000000,500000); + jpol2=lisseq("a0;a1;a2;a3;a4;a5;a6;2^-2*(-120*a0*a6+20*a1*a5-8*a2*a4+3*a3^2)"); + jpol4=lisseq("a0;a1;a2;a3;a4;a5;a6;2^-7*(240*(a0*a3*a4*a5+a1*a2*a3*a6)-400*(a0*a2*a5^2+a1^2*a4*a6)-64*(a0*a4^3+a2^3*a6)+16*(a1*a3*a4^2+a2^2*a3*a5)-672*a0*a3^2*a6+240*a1^2*a5^2-112*a1*a2*a4*a5-8*a1*a3^2*a5+16*a2^2*a4^2-16*a2*a3^2*a4+3*a3^4+2640*a0^2*a6^2-880*a0*a1*a5*a6+1312*a0*a2*a4*a6)"); + jpol6=lisseq("a0;a1;a2;a3;a4;a5;a6;2^-10*(1600*(a0^2*a4^2*a5^2+a1^2*a2^2*a6^2)+1600*(a0*a1*a2*a5^3+a1^3*a4*a5*a6)+640*(a0*a1*a3*a4*a5^2+a1^2*a2*a3*a5*a6)-4000*(a0^2*a3*a5^3+a1^3*a3*a6^2)-384*(a0*a1*a4^3*a5+a1*a2^3*a5*a6)-640*(a0*a2^2*a4*a5^2+a1^2*a2*a4^2*a6)+80*(a0*a2*a3^2*a5^2+a1^2*a3^2*a4*a6)+192*(a0*a2*a3*a4^2*a5+a1*a2^2*a3*a4*a6)-48*(a0*a3^3*a4*a5+a1*a2*a3^3*a6)-224*(a1^2*a3*a4^2*a5+a1*a2^2*a3*a5^2)+64*(a1^2*a4^4+a2^4*a5^2)-64*(a1*a2*a3*a4^3+a2^3*a3*a4*a5)+16*(a1*a3^3*a4^2+a2^2*a3^3*a5)-4096*(a0^2*a4^3*a6+a0*a2^3*a6^2)+6400*(a0^2*a2*a5^2*a6+a0*a1^2*a4*a6^2)+10560*(a0^2*a3*a4*a5*a6+a0*a1*a2*a3*a6^2)+2624*(a0*a1*a3*a4^2*a6+a0*a2^2*a3*a5*a6)-4432*a0*a1*a3^2*a5*a6-8*a2*a3^4*a4+a3^6-320*a1^3*a5^3+64*a1^2*a2*a4*a5^2+176*a1^2*a3^2*a5^2+128*a1*a2^2*a4^2*a5+112*a1*a2*a3^2*a4*a5-28*a1*a3^4*a5+16*a2^2*a3^2*a4^2+5120*a0^3*a6^3-2544*a0^2*a3^2*a6^2+312*a0*a3^4*a6-14336*a0^2*a2*a4*a6^2+1024*a0*a2^2*a4^2*a6-2560*a0^2*a1*a5*a6^2-2240*a0*a1^2*a5^2*a6-6528*a0*a1*a2*a4*a5*a6-1568*a0*a2*a3^2*a4*a6)"); +@@ -115,7 +115,7 @@ + pr=1; if(!cmpis((GEN)factp[1],2)) pr=2; + matmin=cgetg(6,19); + for(j=1;j<=5;j++) +- matmin[j]=lgetg(lg(factp)-pr+1,18); ++ matmin[j]=(long)cgetg(lg(factp)-pr+1,18); + for(i=pr;i1) + {printf("bug c3");fflush(stdout);exit(1);} +- mm=min(min(3*myval(c4,p)-4,3*myval(c5,p)-5),3*vc6-6); ++ mm=minss(minss(3*myval(c4,p)-4,3*myval(c5,p)-5),3*vc6-6); + if(alpha) + { + condp=dismin-mm-16; +@@ -473,7 +473,7 @@ + else + { + list=factorpadicnonun(polh,p,dismin-5); +- nb=lg(list);prod=polun[varn(polh)]; ++ nb=lg(list);prod=pol_1(varn(polh)); + for(i=1;i=0) + { + ent=gfloor(theta);pent=gpui(p,ent,0); +- polh=gdiv(gsubst(polh,0,gmul(pent,polx[0])),gpuigs(pent,6-lambda)); ++ polh=gdiv(gsubst(polh,0,gmul(pent,pol_x(0))),gpuigs(pent,6-lambda)); + alpha=(alpha+lambda*itos(ent))&1; + beta=beta+itos(ent); + theta=gsub(theta,ent); +@@ -1728,11 +1728,11 @@ + rac=(GEN)fac[2]; + if(lgef(rac)==5) + { +- polf[5]=un; ++ polf[5]=(long)gen_1; + goto sortie; + } + rac=lift(gdiv(gneg(truecoeff(rac,0)),truecoeff(rac,1))); +- polh=gsubst(polh,0,gadd(polx[0],rac)); ++ polh=gsubst(polh,0,gadd(pol_x(0),rac)); + lambda=6-maxord; goto labelm6; + } + if(maxord<=2&&lgef(polhp)>=7) goto sortie; +@@ -1741,7 +1741,7 @@ + { + if((myval(truecoeff(polh,2),p)>1-alpha)&&(myval(truecoeff(polh,1),p)>2-alpha)&&(myval(truecoeff(polh,0),p)>3-alpha)) + { +- pol=gsubst(polh,0,gmul(p,polx[0])); ++ pol=gsubst(polh,0,gmul(p,pol_x(0))); + if(alpha) pol=gmul(p,pol); + goto rec1; + } +@@ -1753,7 +1753,7 @@ + { + if(myval(truecoeff(polh,6),p)>=3&&myval(truecoeff(polh,5),p)>=2) + { +- polh=gmul(gsubst(polh,0,gdiv(polx[0],p)),gpuigs(p,3)); ++ polh=gmul(gsubst(polh,0,gdiv(pol_x(0),p)),gpuigs(p,3)); + theta=gadd(theta,gun); + alpha=0; + beta=beta-1; +@@ -1762,13 +1762,13 @@ + } + if(lgef(polhp)==9&&!gcmp0(theta)) + { +- pro=gdiv(polhp,gpuigs(polx[0],3)); ++ pro=gdiv(polhp,gpuigs(pol_x(0),3)); + fac=factmz(pro,p); + if(!cmpis((GEN)fac[1],3)) + { + rac=(GEN)fac[2]; + rac=lift(gdiv(gneg(truecoeff(rac,0)),truecoeff(rac,1))); +- pro=gsubst(polh,0,gadd(rac,gmul(p,polx[0]))); ++ pro=gsubst(polh,0,gadd(rac,gmul(p,pol_x(0)))); + if(polval(pro,p)>=3) + { + polh=gdiv(pro,gpuigs(p,3)); +@@ -1815,7 +1815,7 @@ + if(lgef(polhp)!=6) + {printf("bug, on ne doit pas arriver dans discpart");fflush(stdout);exit(1);} + list=factorpadicnonun(polh,p,ord); +- prod=polun[varn(polh)]; ++ prod=pol_1(varn(polh)); + for(i=1;i=0) + { + ent=gfloor(theta);pent=gpui(p,ent,0); +- polh=gdiv(gsubst(polh,0,gmul(pent,polx[0])),gpuigs(pent,3)); ++ polh=gdiv(gsubst(polh,0,gmul(pent,pol_x(0))),gpuigs(pent,3)); + alpha=(alpha+itos(ent))&1; + beta=beta+itos(ent); + theta=gsub(theta,ent); +@@ -1879,7 +1879,7 @@ + { + if(myvalzi(truecoeff(polh,6))>=3&&myvalzi(truecoeff(polh,5))>=2&&myvalzi(truecoeff(polh,4))>=1) + { +- polh=gmul(gsubst(polh,0,gdiv(polx[0],p)),gpuigs(p,3)); ++ polh=gmul(gsubst(polh,0,gdiv(pol_x(0),p)),gpuigs(p,3)); + theta=gadd(theta,gun); + beta=beta-1; + alpha=0; +@@ -1907,7 +1907,7 @@ + /* on calcule la valuation de b dans Z[i, Y]/(Y^2-3) */ + { + b=lift(b); +- return min(2*myvalzi(truecoeff(b,0)),2*myvalzi(truecoeff(b,1))+1); ++ return minss(2*myvalzi(truecoeff(b,0)),2*myvalzi(truecoeff(b,1))+1); + } + + GEN +@@ -1936,10 +1936,10 @@ + {printf("bug, le polynome n'est pas minimal\n");fflush(stdout);exit(1);} + polh=pol;alpha=0; + beta=0; +- polh=gdivgs(gsubst(polh,0,gmul(polx[0],y)),27); ++ polh=gdivgs(gsubst(polh,0,gmul(pol_x(0),y)),27); + if(myvalzi2(truecoeff(polh,4))>0&&myvalzi2(truecoeff(polh,2))>0) + { +- if(myvalzi2(gsub(truecoeff(polh,6),truecoeff(polh,0)))>0) rac=gi; ++ if(myvalzi2(gsub(truecoeff(polh,6),truecoeff(polh,0)))>0) rac=gen_I(); + else rac=gun; + } + else +@@ -1949,12 +1949,12 @@ + } + + labelm6: +- polh=gsubst(polh,0,gadd(polx[0],rac)); ++ polh=gsubst(polh,0,gadd(pol_x(0),rac)); + theta=calthetazi2(polh); + if(gcmp(theta,gun)>=0) + { + ent=gfloor(theta);pent=gpui(y,ent,0); +- polh=gdiv(gsubst(polh,0,gmul(pent,polx[0])),gpuigs(pent,3)); ++ polh=gdiv(gsubst(polh,0,gmul(pent,pol_x(0))),gpuigs(pent,3)); + alpha=(alpha+itos(ent))&1; + beta=beta+itos(ent); + theta=gsub(theta,ent); +@@ -1998,7 +1998,7 @@ + u=truecoeff(lift(u),0); + a=gmul(unmodp,greal(u)); + b=gmul(unmodp,gimag(u)); +- u=gadd(a,gmul(b,gi)); ++ u=gadd(a,gmul(b,gen_I())); + return u; + } + +@@ -2020,7 +2020,7 @@ + { + fac=(GEN)factmod(polhp,p); + for(i=1;i