Author: tille Date: 2014-05-20 13:34:07 +0000 (Tue, 20 May 2014) New Revision: 16969
Removed: trunk/packages/theseus/trunk/debian/patches/20_hardening.patch Modified: trunk/packages/theseus/trunk/debian/patches/30_fix_gcc_options.patch trunk/packages/theseus/trunk/debian/patches/series Log: Adapt patches to new upstream version Deleted: trunk/packages/theseus/trunk/debian/patches/20_hardening.patch =================================================================== --- trunk/packages/theseus/trunk/debian/patches/20_hardening.patch 2014-05-20 13:15:51 UTC (rev 16968) +++ trunk/packages/theseus/trunk/debian/patches/20_hardening.patch 2014-05-20 13:34:07 UTC (rev 16969) @@ -1,324 +0,0 @@ -Author: Andreas Tille <[email protected]> -Date: Sat, 24 Mar 2012 07:48:57 +0100 -Description: Build with hardening flags - When compiling with hardening flags variables that are set but not used - [-Werror=unused-but-set-variable] all warnings being treated as errors - ---- a/libdistfit/gamma_dist.c -+++ b/libdistfit/gamma_dist.c -@@ -547,7 +547,7 @@ gamma_fit(const double *data, const int - void - gamma_fit_no_stats(const double *data, const int num, double *b, double *c) - { -- double ave, /* var, */logterm, logdata, fx, dfx, fxdfx, guess_b, guess_c; -+ double ave, /* var, */logterm, logdata, fx, dfx, fxdfx/*, guess_b, guess_c*/; - int i, maxiter = 500; - double tol = FLT_EPSILON; - -@@ -604,8 +604,8 @@ gamma_fit_no_stats(const double *data, c - if (*c > FLT_MAX) - *c = FLT_MAX; - -- guess_b = *b; -- guess_c = *c; -+ /* guess_b = *b; */ -+ /* guess_c = *c; */ - /* Maximum likelihood fit. */ - /* Use Newton-Raphson to find ML estimate of c - Based on _Statistical Distributions_ 3rd ed. Evans, Hastings, and Peacock, p 41. ---- a/libdistfit/lognormal_dist.c -+++ b/libdistfit/lognormal_dist.c -@@ -128,7 +128,7 @@ lognormal_logL(const double zeta, const - double - lognormal_fit(const double *data, const int num, double *zeta, double *sigma, double *prob) - { -- double ave, avesqr, var, /* m, */ x, theta; -+ double ave, avesqr, var, /* m, */ x/*, theta*/; - int i; - - ave = avesqr = 0.0; -@@ -165,7 +165,7 @@ lognormal_fit(const double *data, const - - *zeta = ave; - *sigma = sqrt(var); -- theta = 0.5*(sqrt(1.0 + 4.0*avesqr) - 1.0); -+ /* theta = 0.5*(sqrt(1.0 + 4.0*avesqr) - 1.0); */ - /* printf(" LogNormal theta: %f %e\n", theta, theta*theta + theta - avesqr); */ - /* printf("\n LogNormal logL: %f", lognormal_logL(*zeta, *sigma)); */ - ---- a/libdssplite/dssplite.c -+++ b/libdssplite/dssplite.c -@@ -167,7 +167,7 @@ char - int vlen) /* used to be that len = # of CA atoms, not full x vector length */ - { - DSSP *dssp = NULL; -- int Hbonds, len; -+ int /*Hbonds, */len; - char *summary; - - /* Setup DSSP structure */ -@@ -184,7 +184,7 @@ char - - /* do the DSSP algorithm, Doug-style */ - GetCONHCA(dssp); -- Hbonds = FlagHBonds(dssp); -+ /*Hbonds =*/ FlagHBonds(dssp); - - FlagBends(dssp); - FlagTurns(dssp); ---- a/Embed.c -+++ b/Embed.c -@@ -856,7 +856,7 @@ int FastCalcRMSDAndRotation(double *rot, - double oldg = 0.0; - double b, a, delta, ms; - double q1, q2, q3, q4, normq; -- double d11, d12, d13, d14, d21, d22, d23, d24; -+ double /*d11, d12, */d13, d14, d21, d22, d23, d24; - double d31, d32, d33, d34, d41, d42, d43, d44; - double a2, x2, y2, z2; - double xy, az, zx, ay, yz, ax; -@@ -932,7 +932,7 @@ int FastCalcRMSDAndRotation(double *rot, - } - } - -- d11 = SxxpSyy + Szz-mxEigenV; d12 = SyzmSzy; d13 = - SxzmSzx; d14 = SxymSyx; -+ /*d11 = SxxpSyy + Szz-mxEigenV; d12 = SyzmSzy; */ d13 = - SxzmSzx; d14 = SxymSyx; - d21 = SyzmSzy; d22 = SxxmSyy - Szz-mxEigenV; d23 = SxypSyx; d24= SxzpSzx; - d31 = d13; d32 = d23; d33 = Syy-Sxx-Szz - mxEigenV; d34 = SyzpSzy; - d41 = d14; d42 = d24; d43 = d34; d44 = Szz - SxxpSyy - mxEigenV; ---- a/HierarchVars.c -+++ b/HierarchVars.c -@@ -650,7 +650,7 @@ InvGammaFitEvals(CdsArray *cdsA, int ite - double **evecs = NULL; - double precision = cdsA->algo->precision; - const int vlen = cdsA->vlen, cnum = cdsA->cnum; -- double nd, oldb, oldc, b, c, chi2 = DBL_MAX, logL, harmave, mode; -+ double nd, oldb, oldc, b, c, chi2 = DBL_MAX, logL, harmave/*, mode*/; - int i, count, newlen; - - newvar = malloc(vlen * sizeof(double)); -@@ -754,7 +754,7 @@ InvGammaFitEvals(CdsArray *cdsA, int ite - newvar[i] = (nd*variance[i] + 2.0*b) / (nd + 2.0*(1.0 + c)); - - /* the mode of an inv gamma dist */ -- mode = b / (c+1.0); -+ /* mode = b / (c+1.0); */ - - /* for (i = 0; i < vlen - newlen; ++i) */ - /* newvar[i] = mode; */ -@@ -820,7 +820,7 @@ InvGammaFitEvalsNoN(CdsArray *cdsA, int - double **evecs = NULL; - double precision = cdsA->algo->precision; - const int vlen = cdsA->vlen, cnum = cdsA->cnum; -- double nd, oldb, oldc, b, c, chi2 = DBL_MAX, logL, harmave, mode; -+ double nd, oldb, oldc, b, c, chi2 = DBL_MAX, logL, harmave/*, mode*/; - int i, count, newlen; - - newvar = malloc(vlen * sizeof(double)); -@@ -924,7 +924,7 @@ InvGammaFitEvalsNoN(CdsArray *cdsA, int - newvar[i] = (nd*variance[i] + 2.0*b) / (nd + 2.0*(1.0 + c)); - - /* the mode of an inv gamma dist */ -- mode = b / (c+1.0); -+ /* mode = b / (c+1.0); */ - - /* for (i = 0; i < vlen - newlen; ++i) */ - /* newvar[i] = mode; */ -@@ -1178,7 +1178,7 @@ InvGammaBayesFitEvals(CdsArray *cdsA, in - double **evecs = NULL; - double precision = cdsA->algo->precision; - const int vlen = cdsA->vlen, cnum = cdsA->cnum; -- double nd, oldb, oldc, b, c, chi2 = DBL_MAX, logL, harmave, mode; -+ double nd, oldb, oldc, b, c, chi2 = DBL_MAX, logL, harmave/*, mode*/; - int i, count, newlen; - - newvar = malloc(vlen * sizeof(double)); -@@ -1282,7 +1282,7 @@ InvGammaBayesFitEvals(CdsArray *cdsA, in - newvar[i] = (nd*variance[i] + 2.0*b) / (nd + 2.0*(1.0 + c)); - - /* the mode of an inv gamma dist */ -- mode = b / (c+1.0); -+ /* mode = b / (c+1.0); */ - - /* for (i = 0; i < vlen - newlen; ++i) */ - /* newvar[i] = mode; */ -@@ -3002,11 +3002,11 @@ InvGammaEMFixedC(CdsArray *cdsA, const d - double *variance = NULL; - double precision = FLT_EPSILON; // cdsA->algo->precision; - const int vlen = cdsA->vlen, cnum = cdsA->cnum; -- double nd, oldb, oldc, b = 0.0, chi2 = 0.0, logL; -+ double /* nd, */oldb, oldc, b = 0.0, chi2 = 0.0, logL; - int count; - - newvar = malloc(vlen * sizeof(double)); -- nd = 3.0 * cnum; -+ /* nd = 3.0 * cnum; */ - oldb = oldc = DBL_MAX; - - if (cdsA->algo->varweight > 0) ---- a/MultiPose.c -+++ b/MultiPose.c -@@ -1795,7 +1795,7 @@ MultiPose(CdsArray *baseA) - /* FILE *fp; */ - int i, round, innerround; - int slxn; /* index of random coord to select as first */ -- double frobnorm, sumdev, percent, lastpercent, logL, lastlogL, lastscale; -+ double frobnorm, sumdev, /* percent, lastpercent, */ logL, lastlogL, lastscale; - double deviation_sum = 0.0; - const int cnum = baseA->cnum; - const int vlen = baseA->vlen; -@@ -1944,7 +1944,7 @@ MultiPose(CdsArray *baseA) - matrices and corresponding weight matrices, looping till - convergence when using a dimensional/axial covariance matrix */ - round = 0; -- percent = lastpercent = 0.0; -+ /* percent = lastpercent = 0.0; */ - logL = lastlogL = lastscale = -DBL_MAX; - while(1) - { -@@ -2066,10 +2066,10 @@ MultiPose(CdsArray *baseA) - CheckConvergenceOuter(scratchA, round, algo->precision) == 1) - goto outsidetheloops; - -- if (stats->precision > 0.0) -+/* if (stats->precision > 0.0) - percent = 100.0 * log(fabs(stats->precision))/log(algo->precision); - else -- percent = 0.0; -+ percent = 0.0; */ - - // if (percent > lastpercent) - // { ---- a/MultiPoseMix.c -+++ b/MultiPoseMix.c -@@ -1388,7 +1388,7 @@ MultiPoseMix(CdsArray *baseA, const doub - Statistics *stats = NULL; - Cds **cds = NULL; - Cds *avecds = NULL; -- Cds *tcds = NULL; -+ /* Cds *tcds = NULL; */ - CdsArray *scratchA = NULL; - - gsl_rng *r2 = NULL; -@@ -1411,7 +1411,7 @@ MultiPoseMix(CdsArray *baseA, const doub - stats = scratchA->stats; - cds = scratchA->cds; - avecds = scratchA->avecds; -- tcds = scratchA->tcds; -+ /* tcds = scratchA->tcds; */ - - memcpy(scratchA->w, probs, vlen * sizeof(double)); - memcpy(baseA->w, probs, vlen * sizeof(double)); ---- a/PCAstats.c -+++ b/PCAstats.c -@@ -58,7 +58,7 @@ CalcPCA(CdsArray *cdsA) - { - int i, j; - int vlen = (int) cdsA->vlen; -- int upper, lower, pcanum; -+ int /*upper, lower, */ pcanum; - double **CovMat = cdsA->CovMat; - double sum, runsum; - PDBCds *pdbave; -@@ -101,8 +101,8 @@ CalcPCA(CdsArray *cdsA) - for (i = 0; i < vlen; ++i) - sum += CovMat[i][i]; - -- lower = vlen - pcanum + 1; /* careful -- inclusive indices */ -- upper = vlen - 0; -+ /* lower = vlen - pcanum + 1; / * careful -- inclusive indices */ -+ /* upper = vlen - 0; */ - //cdsA->pcamat = MatAlloc(pcanum, vlen); - cdsA->pcamat = MatAlloc(vlen, vlen); - cdsA->pcavals = malloc(vlen * sizeof(double)); -@@ -237,7 +237,7 @@ Calc3NPCA(CdsArray *cdsA) - int i, j; - int vlen = (int) 3 * cdsA->vlen; - double **mat = NULL; -- int upper, lower, pcanum; -+ int /* upper, lower, */ pcanum; - double **evecs = NULL, *evals = NULL; - double sum, runsum; - PDBCds *pdbave = NULL; -@@ -273,8 +273,8 @@ Calc3NPCA(CdsArray *cdsA) - for (i = 0; i < vlen; ++i) - sum += mat[i][i]; - -- lower = vlen - pcanum + 1; /* careful -- inclusive indices */ -- upper = vlen - 0; -+ /* lower = vlen - pcanum + 1; / * careful -- inclusive indices */ -+ /* upper = vlen - 0; */ - evecs = MatAlloc(vlen, vlen); - evals = malloc(vlen * sizeof(double)); - ---- a/pdbStats.c -+++ b/pdbStats.c -@@ -1596,7 +1596,7 @@ CalcHierarchLogL(CdsArray *cdsA) - if (algo->varweight != 0) - { - double *newvar = malloc(vlen * sizeof(double)); -- double b, c, xn1; -+ double b, c/*, xn1*/; - - b = stats->hierarch_p1; - c = stats->hierarch_p2; -@@ -1604,7 +1604,7 @@ CalcHierarchLogL(CdsArray *cdsA) - memcpy(newvar, cdsA->var, vlen * sizeof(double)); - qsort(newvar, vlen, sizeof(double), dblcmp_rev); - /* qsort-dblcmp_rev sorts big to small */ -- xn1 = newvar[vlen-4]; -+ /* xn1 = newvar[vlen-4]; */ - - logL = invgamma_logL(newvar, vlen-3, b, c); - //- b * ExpInvXn(xn1, b, c) - (1+c)*ExpLogXn(xn1, b, c) -@@ -1778,13 +1778,13 @@ CalcLogL(CdsArray *cdsA) - if (algo->hierarch != 0) - { - double *newvar = malloc(vlen * sizeof(double)); -- double xn1; -+ /* double xn1; */ - - memcpy(newvar, var, vlen * sizeof(double)); - qsort(newvar, vlen, sizeof(double), dblcmp_rev); - /* qsort-dblcmp_rev sorts big to small */ - -- xn1 = newvar[vlen - 4]; -+ /*xn1 = newvar[vlen - 4];*/ - - lndetrow = 0.0; - for (i = 0; i < vlen-3; ++i) ---- a/QuarticHornFrag.c -+++ b/QuarticHornFrag.c -@@ -318,11 +318,11 @@ CalcQuarticCoeffsPu2(const FragCds *frag - lambdamax = QCProot(coeff, 0.5 * innerprod, precision); - - /* Now calculate the optimal rotation from one row of the cofactor matrix */ -- double a11, a12, a13, a14, a21, a22, a23, a24; -+ double /* a11, a12, */ a13, a14, a21, a22, a23, a24; - double a31, a32, a33, a34, a41, a42, a43, a44; - -- a11 = SxxpSyy + Szz - lambdamax; -- a12 = SyzmSzy; -+ /* a11 = SxxpSyy + Szz - lambdamax; */ -+ /* a12 = SyzmSzy; */ - a13 = -SxzmSzx; - a14 = SxymSyx; - a21 = SyzmSzy; -@@ -652,7 +652,7 @@ FragDistPu(CdsArray *cdsA, int fraglen, - double *coeff = NULL; - double var; - FILE *distfile = NULL, *distfile2 = NULL; -- double biggest; -+ /* double biggest; */ - double *array = NULL; - - double **Rmat = MatAlloc(3, 3); -@@ -686,7 +686,7 @@ FragDistPu(CdsArray *cdsA, int fraglen, - - start_time = clock(); - -- biggest = 0.0; -+ /* biggest = 0.0; */ - count = 0; - for (coord1 = 0; coord1 < cdsA->cnum; ++coord1) - { Modified: trunk/packages/theseus/trunk/debian/patches/30_fix_gcc_options.patch =================================================================== --- trunk/packages/theseus/trunk/debian/patches/30_fix_gcc_options.patch 2014-05-20 13:15:51 UTC (rev 16968) +++ trunk/packages/theseus/trunk/debian/patches/30_fix_gcc_options.patch 2014-05-20 13:34:07 UTC (rev 16969) @@ -1,34 +1,53 @@ Author: Andreas Tille <[email protected]> +Last-Update: Tue, 20 May 2014 15:08:38 +0200 Descriptions: Set options for Linux Default options seem to be addressing MacOS by default - just enable clean on Linux --- a/make.inc +++ b/make.inc -@@ -49,7 +49,7 @@ RANLIB = ranlib +@@ -6,12 +6,12 @@ + RANLIB = ranlib + + # for universal OSX binary +-ARCH = libtool +-ARCHFLAGS = -static -o ++# ARCH = libtool ++# ARCHFLAGS = -static -o + + # for normal arch-native tuned OSX binary +-# ARCH = ar +-# ARCHFLAGS = -rvs ++ARCH = ar ++ARCHFLAGS = -rvs + + #MACOSX_DEPLOYMENT_TARGET=10.4 + #export MACOSX_DEPLOYMENT_TARGET +@@ -38,7 +38,7 @@ ARCHFLAGS = -static -o # Mac OSX Universal # LOCALLIBDIR = /usr/local/lib -LIBS = -lgsl -lgslcblas -ldistfit -lmsa -ldssplite -ldltmath -lDLTutils -ltheseus +LIBS = -lgsl -ldistfit -lmsa -ldssplite -ldltmath -lDLTutils -ltheseus - #SYSLIBS = -framework CoreServices SYSLIBS = -lpthread -lgsl -lgslcblas -lm -lc LIBDIR = -L./lib -@@ -59,7 +59,7 @@ INSTALLDIR = /usr/local/bin - OPT = -O3 -ffast-math -fstrict-aliasing -funroll-loops -fomit-frame-pointer + INSTALLDIR = /usr/local/bin +@@ -46,7 +46,7 @@ INSTALLDIR = /usr/local/bin + OPT = -O3 -ffast-math #-fstrict-aliasing -funroll-loops -fomit-frame-pointer #WARN = -Werror -Wno-error=unused-result -Wall -pedantic -std=c99 WARN = -Werror -Wall -pedantic -std=c99 # for APPLE MACOSX -CFLAGS += $(WARN) -force_cpusubtype_ALL -mmacosx-version-min=10.4 -arch x86_64 -arch i386 #-DNDEBUG +#CFLAGS += $(WARN) -force_cpusubtype_ALL -mmacosx-version-min=10.4 -arch x86_64 -arch i386 #-DNDEBUG - #CFLAGS += $(WARN) # CPPFLAGS are ignored by the rest of the build system but necessary for hardening flags CFLAGS += $(CPPFLAGS) -@@ -79,10 +79,10 @@ CC = /usr/bin/gcc + # Filter out -O2 which overwrites the default -O3 because OPT is used before CFLAGS +@@ -65,11 +65,11 @@ CC = gcc # LIBDIR = -L./lib/ -L/usr/lib/ # INCDIR = -I/usr/local/include/ # INSTALLDIR = /usr/local/bin -# OPT = -O3 -ffast-math -fstrict-aliasing -funroll-loops -fomit-frame-pointer +OPT = -O3 -ffast-math -fstrict-aliasing -funroll-loops -fomit-frame-pointer + # # OPT = -m64 -O3 -march=native -funroll-loops -ffast-math -mfpmath=sse # #OPT = -O0 -ggdb -# WARN = -Wall -pedantic -std=c99 -Wno-unused-result -# CFLAGS = $(WARN) -pthread Modified: trunk/packages/theseus/trunk/debian/patches/series =================================================================== --- trunk/packages/theseus/trunk/debian/patches/series 2014-05-20 13:15:51 UTC (rev 16968) +++ trunk/packages/theseus/trunk/debian/patches/series 2014-05-20 13:34:07 UTC (rev 16969) @@ -1,2 +1 @@ -20_hardening.patch 30_fix_gcc_options.patch _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
