Once Jakub's patch is applied, there are other problems (some const char* which gets modified). My patch should also address these problems and make the package compiling correctly in a chroot. It also fixes another little problem (which was meant to be addressed in version -0-4-3.dfsg-3, but wasn't really).
I'm NMU-ing this patch n DELAY/2. Thanks, Giovanni. -- Giovanni Mascellani <mascell...@poisson.phc.unipi.it> Pisa, Italy Web: http://poisson.phc.unipi.it/~mascellani Jabber: g.mascell...@jabber.org / giova...@elabor.homelinux.org
diff -u singular-3-0-4-3.dfsg/debian/changelog singular-3-0-4-3.dfsg/debian/changelog --- singular-3-0-4-3.dfsg/debian/changelog +++ singular-3-0-4-3.dfsg/debian/changelog @@ -1,3 +1,13 @@ +singular (3-0-4-3.dfsg-3.1) unstable; urgency=low + + * Non-maintainer upload. + * Fixing the FTBFS (wrong compilation Makefile target and other + issues, closes: #584339). + * Really update libreadline-dev dependency (last revision only changed + it in control.in). + + -- Giovanni Mascellani <g...@debian.org> Tue, 10 Aug 2010 11:56:22 +0200 + singular (3-0-4-3.dfsg-3) unstable; urgency=low * Update readline dependency to "libreadline-dev", not diff -u singular-3-0-4-3.dfsg/debian/control singular-3-0-4-3.dfsg/debian/control --- singular-3-0-4-3.dfsg/debian/control +++ singular-3-0-4-3.dfsg/debian/control @@ -3,7 +3,7 @@ Priority: optional Maintainer: Tim Abbott <tabb...@mit.edu> Homepage: http://www.singular.uni-kl.de/ -Build-Depends: cdbs (>= 0.4.23-1.1), autotools-dev, debhelper (>= 5), quilt, patchutils (>= 0.2.25), cdbs (>= 0.4.27), libgmp3-dev, libntl-dev, libncurses5-dev, libreadline5-dev, libmpfr-dev +Build-Depends: cdbs (>= 0.4.23-1.1), autotools-dev, debhelper (>= 5), quilt, patchutils (>= 0.2.25), cdbs (>= 0.4.27), libgmp3-dev, libntl-dev, libncurses5-dev, libreadline-dev, libmpfr-dev Standards-Version: 3.8.0 Package: singular diff -u singular-3-0-4-3.dfsg/debian/rules singular-3-0-4-3.dfsg/debian/rules --- singular-3-0-4-3.dfsg/debian/rules +++ singular-3-0-4-3.dfsg/debian/rules @@ -11,7 +11,7 @@ PREFIX=$(DEB_DESTDIR)/usr DEB_CONFIGURE_EXTRA_FLAGS += --with-apint=gmp --with-gmp=/usr/lib --with-ntl --with-NTL --without-MP --enable-gmp=/usr/lib --enable-Singular --enable-factory --enable-libfac --enable-IntegerProgramming --disable-debug --prefix=$(PREFIX) --exec_prefix=$(PREFIX) --libdir=$(PREFIX)/lib/singular --libexecdir=$(PREFIX)/lib/singular --bindir=$(PREFIX)/bin --includedir=$(PREFIX)/include/singular/ --without-lex --without-bison --enable-doc --without-Boost DEB_MAKE_INVOKE += slibdir=$(PREFIX)/share/singular install_slibdir=$(PREFIX)/share/singular -DEB_MAKE_BUILD_TARGET = distclean +DEB_MAKE_BUILD_TARGET = clean DEB_MAKE_CLEAN_TARGET = distclean DEB_MAKE_INSTALL_TARGET = install-nolns DEB_FIXPERMS_EXCLUDE = libsingular-3-0-4-3.so only in patch2: unchanged: --- singular-3-0-4-3.dfsg.orig/kernel/mpr_complex.cc +++ singular-3-0-4-3.dfsg/kernel/mpr_complex.cc @@ -79,31 +79,33 @@ void gmp_float::setFromStr(const char * in ) { + char *in2 = strdup(in); BOOLEAN neg=false; - if (*in == '-') { in++; neg=TRUE; } + if (*in2 == '-') { in2++; neg=TRUE; } char *s; - if ((s=strchr(in,'E')) !=NULL) + if ((s=strchr(in2,'E')) !=NULL) { *s='e'; } // gmp doesn't understand number which begin with "." -- it needs 0. // so, insert the zero - if (*in == '.') + if (*in2 == '.') { - int len = strlen(in)+2; - char* c_in = (char*) omAlloc(len); - *c_in = '0'; - strcpy(&(c_in[1]), in); + int len = strlen(in2)+2; + char* c_in2 = (char*) omAlloc(len); + *c_in2 = '0'; + strcpy(&(c_in2[1]), in2); - mpf_set_str( t, c_in, 10 ); - omFreeSize((void*)c_in, len); + mpf_set_str( t, c_in2, 10 ); + omFreeSize((void*)c_in2, len); } else { - mpf_set_str( t, in, 10 ); + mpf_set_str( t, in2, 10 ); } if (neg) mpf_neg( t, t ); + free(in2); } only in patch2: unchanged: --- singular-3-0-4-3.dfsg.orig/kernel/febase.cc +++ singular-3-0-4-3.dfsg/kernel/febase.cc @@ -720,10 +720,12 @@ FILE * feFopen(const char *path, const char *mode, char *where, int useWerror, int path_only) { + char *path2 = strdup(path); + char *pathToFree = path2; char longpath[MAXPATHLEN]; - if (path[0]=='~') + if (path2[0]=='~') { - if (path[1] == DIR_SEP) + if (path2[1] == DIR_SEP) { const char* home = getenv("HOME"); #ifdef ix86_Win @@ -733,8 +735,8 @@ if (home != NULL) { strcpy(longpath, home); - strcat(longpath, &(path[1])); - path = longpath; + strcat(longpath, &(path2[1])); + path2 = longpath; } } #if defined(HAVE_PWD_H) && defined(HAVE_GETPWNAM) @@ -742,16 +744,16 @@ { char* dir_sep; struct passwd *pw_entry; - strcpy (longpath, path); + strcpy (longpath, path2); dir_sep = strchr(longpath, DIR_SEP); *dir_sep = '\0'; pw_entry = getpwnam(&longpath[1]); if (pw_entry != NULL) { strcpy(longpath, pw_entry->pw_dir); - dir_sep = strchr(path, DIR_SEP); + dir_sep = strchr(path2, DIR_SEP); strcat(longpath, dir_sep); - path = longpath; + path2 = longpath; } } #endif @@ -760,14 +762,14 @@ if (! path_only) { struct stat statbuf; - if ((stat(path,&statbuf)==0) + if ((stat(path2,&statbuf)==0) && (S_ISREG(statbuf.st_mode))) - f = myfopen(path,mode); + f = myfopen(path2,mode); } - if (where!=NULL) strcpy(where,path); + if (where!=NULL) strcpy(where,path2); if ((*mode=='r') && - (path[0]!=DIR_SEP) && - ! (path[0] == '.' && path[1] == DIR_SEP) && + (path2[0]!=DIR_SEP) && + ! (path2[0] == '.' && path2[1] == DIR_SEP) && (f==NULL)) { char found = 0; @@ -787,7 +789,7 @@ strcpy(s,p); *q = fePathSep; strcat(s, DIR_SEPP); - strcat(s, path); + strcat(s, path2); if(!access(s, R_OK)) { found++; break; } p = q+1; } @@ -795,24 +797,26 @@ { strcpy(s,p); strcat(s, DIR_SEPP); - strcat(s, path); + strcat(s, path2); } f=myfopen(s,mode); if (f!=NULL) { if (where==NULL) omFree((ADDRESS)s); + free(pathToFree); return f; } } else { - if (where!=NULL) strcpy(s/*where*/,path); - f=myfopen(path,mode); + if (where!=NULL) strcpy(s/*where*/,path2); + f=myfopen(path2,mode); } if (where==NULL) omFree((ADDRESS)s); } if ((f==NULL)&&(useWerror)) - Werror("cannot open `%s`",path); + Werror("cannot open `%s`",path2); + free(pathToFree); return f; }
signature.asc
Description: OpenPGP digital signature