diff --git a/root-fontconfig.patch b/root-fontconfig.patch index 6609c76..4c333e9 100644 --- a/root-fontconfig.patch +++ b/root-fontconfig.patch @@ -1,9 +1,12 @@ -diff -ur root-5.34.00.orig/core/base/src/TApplication.cxx root-5.34.00/core/base/src/TApplication.cxx ---- root-5.34.00.orig/core/base/src/TApplication.cxx 2012-06-05 15:31:18.000000000 +0200 -+++ root-5.34.00/core/base/src/TApplication.cxx 2012-06-09 16:01:50.212196155 +0200 -@@ -239,20 +239,9 @@ +diff -ur root-5.34.05.orig/core/base/src/TApplication.cxx root-5.34.05/core/base/src/TApplication.cxx +--- root-5.34.05.orig/core/base/src/TApplication.cxx 2013-02-14 23:27:37.000000000 +0100 ++++ root-5.34.05/core/base/src/TApplication.cxx 2013-02-26 19:27:54.452632349 +0100 +@@ -237,22 +237,11 @@ + LoadGraphicsLibs(); + // Try to load TrueType font renderer. Only try to load if not in batch - // mode and Root.UseTTFonts is true and Root.TTFontPath exists. Abort silently +- // mode and Root.UseTTFonts is true and Root.TTFontPath exists. Abort silently ++ // mode and Root.UseTTFonts is true. Abort silently // if libttf or libGX11TTF are not found in $ROOTSYS/lib or $ROOTSYS/ttf/lib. - const char *ttpath = gEnv->GetValue("Root.TTFontPath", -#ifdef TTFFONTDIR @@ -31,22 +34,45 @@ diff -ur root-5.34.00.orig/core/base/src/TApplication.cxx root-5.34.00/core/base // Create WM dependent application environment if (fAppImp) -diff -ur root-5.34.00.orig/graf2d/graf/Module.mk root-5.34.00/graf2d/graf/Module.mk ---- root-5.34.00.orig/graf2d/graf/Module.mk 2012-06-05 15:31:46.000000000 +0200 -+++ root-5.34.00/graf2d/graf/Module.mk 2012-06-09 16:01:50.212196155 +0200 -@@ -45,7 +45,7 @@ +diff -ur root-5.34.05.orig/graf2d/graf/inc/TTF.h root-5.34.05/graf2d/graf/inc/TTF.h +--- root-5.34.05.orig/graf2d/graf/inc/TTF.h 2013-02-14 23:27:53.000000000 +0100 ++++ root-5.34.05/graf2d/graf/inc/TTF.h 2013-02-26 19:27:54.452632349 +0100 +@@ -71,9 +71,8 @@ + static FT_BBox fgCBox; // string control box + static FT_CharMap fgCharMap[kTTMaxFonts]; // font character map + static Int_t fgCurFontIdx; // current font index +- static Int_t fgSymbItaFontIdx; // Symbol italic font index + static Int_t fgFontCount; // number of fonts loaded +- static char *fgFontName[kTTMaxFonts]; // font name ++ static Int_t fgFontID[kTTMaxFonts]; // font ID + static FT_Face fgFace[kTTMaxFonts]; // font face + static TTGlyph fgGlyphs[kMaxGlyphs]; // glyphs + static Bool_t fgHinting; // use hinting (true by default) +diff -ur root-5.34.05.orig/graf2d/graf/Module.mk root-5.34.05/graf2d/graf/Module.mk +--- root-5.34.05.orig/graf2d/graf/Module.mk 2013-02-14 23:27:53.000000000 +0100 ++++ root-5.34.05/graf2d/graf/Module.mk 2013-02-26 19:27:54.452632349 +0100 +@@ -46,7 +46,7 @@ @$(MAKELIB) $(PLATFORM) $(LD) "$(LDFLAGS)" \ "$(SOFLAGS)" libGraf.$(SOEXT) $@ \ "$(GRAFO) $(GRAFDO)" \ -- "$(FREETYPELDFLAGS) $(FREETYPELIB) $(GRAFLIBEXTRA)" -+ "$(FREETYPELDFLAGS) $(FREETYPELIB) $(GRAFLIBEXTRA) -lfontconfig" +- "$(GRAFLIBEXTRA) $(MATHTEXTLIB) $(FREETYPELDFLAGS) $(FREETYPELIB)" ++ "$(GRAFLIBEXTRA) $(MATHTEXTLIB) $(FREETYPELDFLAGS) $(FREETYPELIB) -lfontconfig" $(GRAFDS): $(GRAFH) $(GRAFL) $(ROOTCINTTMPDEP) $(MAKEDIR) -diff -ur root-5.34.00.orig/graf2d/graf/src/TTF.cxx root-5.34.00/graf2d/graf/src/TTF.cxx ---- root-5.34.00.orig/graf2d/graf/src/TTF.cxx 2012-06-05 15:31:46.000000000 +0200 -+++ root-5.34.00/graf2d/graf/src/TTF.cxx 2012-06-09 16:01:50.261196568 +0200 -@@ -26,6 +26,7 @@ +diff -ur root-5.34.05.orig/graf2d/graf/src/TTF.cxx root-5.34.05/graf2d/graf/src/TTF.cxx +--- root-5.34.05.orig/graf2d/graf/src/TTF.cxx 2013-02-14 23:27:52.000000000 +0100 ++++ root-5.34.05/graf2d/graf/src/TTF.cxx 2013-02-26 19:36:07.971088035 +0100 +@@ -17,15 +17,13 @@ + // // + ////////////////////////////////////////////////////////////////////////// + +-// RConfigure.h is needed for TTFFONTDIR +-#include "RConfigure.h" +- + #include "TTF.h" + #include "TSystem.h" + #include "TEnv.h" #include "TMath.h" #include "TError.h" @@ -54,24 +80,216 @@ diff -ur root-5.34.00.orig/graf2d/graf/src/TTF.cxx root-5.34.00/graf2d/graf/src/ // to scale fonts to the same size as the old TT version const Float_t kScale = 0.93376068; -@@ -112,10 +113,13 @@ +@@ -40,10 +38,9 @@ + Int_t TTF::fgWidth = 0; + Int_t TTF::fgAscent = 0; + Int_t TTF::fgCurFontIdx = -1; +-Int_t TTF::fgSymbItaFontIdx = -1; + Int_t TTF::fgFontCount = 0; + Int_t TTF::fgNumGlyphs = 0; +-char *TTF::fgFontName[kTTMaxFonts]; ++Int_t TTF::fgFontID[kTTMaxFonts]; + FT_Matrix *TTF::fgRotMatrix; + FT_Library TTF::fgLibrary; + FT_BBox TTF::fgCBox; +@@ -87,7 +84,6 @@ + if (!fgInit) return; + + for (int i = 0; i < fgFontCount; i++) { +- delete [] fgFontName[i]; + FT_Done_Face(fgFace[i]); + } + if (fgRotMatrix) delete fgRotMatrix; +@@ -112,12 +108,15 @@ charmap = fgFace[fgCurFontIdx]->charmaps[i]; platform = charmap->platform_id; encoding = charmap->encoding_id; - if ((platform == 3 && encoding == 1) || + if ((platform == 3 && encoding == 1 && -+ strcmp(fgFontName[fgCurFontIdx], "symbol.ttf")) || ++ (fgFontID[fgCurFontIdx] != 12 && fgFontID[fgCurFontIdx] != 15)) || (platform == 0 && encoding == 0) || (platform == 1 && encoding == 0 && - !strcmp(fgFontName[fgCurFontIdx], "wingding.ttf")) || +- !strcmp(fgFontName[fgCurFontIdx], "wingding.ttf")) || ++ fgFontID[fgCurFontIdx] == 14) || + (platform == 7 && encoding == 2 && -+ !strcmp(fgFontName[fgCurFontIdx], "symbol.ttf")) || ++ (fgFontID[fgCurFontIdx] == 12 || fgFontID[fgCurFontIdx] == 15)) || (platform == 1 && encoding == 0 && - !strcmp(fgFontName[fgCurFontIdx], "symbol.ttf"))) +- !strcmp(fgFontName[fgCurFontIdx], "symbol.ttf"))) ++ (fgFontID[fgCurFontIdx] == 12 || fgFontID[fgCurFontIdx] == 15))) { -@@ -360,19 +364,86 @@ + fgCharMap[fgCurFontIdx] = charmap; + if (FT_Set_Charmap(fgFace[fgCurFontIdx], fgCharMap[fgCurFontIdx])) +@@ -381,27 +380,147 @@ + + if (!fontname || !fontname[0]) { + Warning("TTF::SetTextFont", +- "no font name specified, using default font %s", fgFontName[0]); ++ "no font name specified, using default font"); + fgCurFontIdx = 0; return 0; } + const char *basename = gSystem->BaseName(fontname); + ++ if (strcmp(basename, "timesi.ttf") == 0 || ++ strcmp(basename, "FreeSerifItalic.otf") == 0) { ++ SetTextFont(12); ++ } ++ else if (strcmp(basename, "timesbd.ttf") == 0 || ++ strcmp(basename, "FreeSerifBold.otf") == 0) { ++ SetTextFont(22); ++ } ++ else if (strcmp(basename, "timesbi.ttf") == 0 || ++ strcmp(basename, "FreeSerifBoldItalic.otf") == 0) { ++ SetTextFont(32); ++ } ++ else if (strcmp(basename, "arial.ttf") == 0 || ++ strcmp(basename, "FreeSans.otf") == 0) { ++ SetTextFont(42); ++ } ++ else if (strcmp(basename, "ariali.ttf") == 0 || ++ strcmp(basename, "FreeSansOblique.otf") == 0) { ++ SetTextFont(52); ++ } ++ else if (strcmp(basename, "arialbd.ttf") == 0 || ++ strcmp(basename, "FreeSansBold.otf") == 0) { ++ SetTextFont(62); ++ } ++ else if (strcmp(basename, "arialbi.ttf") == 0 || ++ strcmp(basename, "FreeSansBoldOblique.otf") == 0) { ++ SetTextFont(72); ++ } ++ else if (strcmp(basename, "cour.ttf") == 0 || ++ strcmp(basename, "FreeMono.otf") == 0) { ++ SetTextFont(82); ++ } ++ else if (strcmp(basename, "couri.ttf") == 0 || ++ strcmp(basename, "FreeMonoOblique.otf") == 0) { ++ SetTextFont(92); ++ } ++ else if (strcmp(basename, "courbd.ttf") == 0 || ++ strcmp(basename, "FreeMonoBold.otf") == 0) { ++ SetTextFont(102); ++ } ++ else if (strcmp(basename, "courbi.ttf") == 0 || ++ strcmp(basename, "FreeMonoBoldOblique.otf") == 0) { ++ SetTextFont(112); ++ } ++ else if (strcmp(basename, "symbol.ttf") == 0) { ++ if (italic) ++ SetTextFont(152); ++ else ++ SetTextFont(122); ++ } ++ else if (strcmp(basename, "times.ttf") == 0 || ++ strcmp(basename, "FreeSerif.otf") == 0) { ++ SetTextFont(132); ++ } ++ else if (strcmp(basename, "wingding.ttf") == 0) { ++ SetTextFont(142); ++ } ++ else if (strcmp(basename, "STIXGeneral.otf") == 0) { ++ SetTextFont(162); ++ } ++ else if (strcmp(basename, "STIXGeneralItalic.otf") == 0) { ++ SetTextFont(172); ++ } ++ else if (strcmp(basename, "STIXGeneralBol.otf") == 0) { ++ SetTextFont(182); ++ } ++ else if (strcmp(basename, "STIXGeneralBolIta.otf") == 0) { ++ SetTextFont(192); ++ } ++ else if (strcmp(basename, "STIXSiz1Sym.otf") == 0) { ++ SetTextFont(202); ++ } ++ else if (strcmp(basename, "STIXSiz1SymBol.otf") == 0) { ++ SetTextFont(212); ++ } ++ else if (strcmp(basename, "STIXSiz2Sym.otf") == 0) { ++ SetTextFont(222); ++ } ++ else if (strcmp(basename, "STIXSiz2SymBol.otf") == 0) { ++ SetTextFont(232); ++ } ++ else if (strcmp(basename, "STIXSiz3Sym.otf") == 0) { ++ SetTextFont(242); ++ } ++ else if (strcmp(basename, "STIXSiz3SymBol.otf") == 0) { ++ SetTextFont(252); ++ } ++ else if (strcmp(basename, "STIXSiz4Sym.otf") == 0) { ++ SetTextFont(262); ++ } ++ else if (strcmp(basename, "STIXSiz4SymBol.otf") == 0) { ++ SetTextFont(272); ++ } ++ else if (strcmp(basename, "STIXSiz5Sym.otf") == 0) { ++ SetTextFont(282); ++ } ++ else if (strcmp(basename, "DroidSansFallback.ttf") == 0) { ++ SetTextFont(292); ++ } ++ else { ++ Error("TTF::SetTextFont", "font %s not known to ROOT", basename); ++ if (fgFontCount) { ++ Warning("TTF::SetTextFont", "using default font"); ++ fgCurFontIdx = 0; // use font 0 (default font, set in ctor) ++ return 0; ++ } else { ++ return 1; ++ } ++ } ++ ++ return 0; ++} ++ ++//______________________________________________________________________________ ++void TTF::SetTextFont(Font_t fontnumber) ++{ ++ int fontid = fontnumber / 10; ++ if (fontid < 0 || fontid > 31) fontid = 0; ++ ++ Int_t italic = 0; ++ if (fontid==15) italic = 1; ++ ++ if (!fgInit) Init(); ++ ++ if (fontid == 0) { ++ fgCurFontIdx = 0; // use font 0 (default font, set in ctor) ++ return; ++ } ++ + // check if font is in cache + int i; + for (i = 0; i < fgFontCount; i++) { +- if (!strcmp(fgFontName[i], basename)) { +- if (italic) { +- if (i==fgSymbItaFontIdx) { +- fgCurFontIdx = i; +- return 0; +- } +- } else { +- if (i!=fgSymbItaFontIdx) { +- fgCurFontIdx = i; +- return 0; +- } +- } ++ if (fgFontID[i] == fontid) { ++ fgCurFontIdx = i; ++ return; + } + } + +@@ -409,161 +528,228 @@ + if (fgFontCount >= kTTMaxFonts) { + Error("TTF::SetTextFont", "too many fonts opened (increase kTTMaxFont = %d)", + kTTMaxFonts); +- Warning("TTF::SetTextFont", "using default font %s", fgFontName[0]); ++ Warning("TTF::SetTextFont", "using default font"); + fgCurFontIdx = 0; // use font 0 (default font, set in ctor) +- return 0; ++ return; + } - // try to load font (font must be in Root.TTFontPath resource) - const char *ttpath = gEnv->GetValue("Root.TTFontPath", @@ -86,91 +304,191 @@ diff -ur root-5.34.00.orig/graf2d/graf/src/TTF.cxx root-5.34.00/graf2d/graf/src/ - - if (!ttfont) { - Error("TTF::SetTextFont", "font file %s not found in path", fontname); +- if (fgFontCount) { +- Warning("TTF::SetTextFont", "using default font %s", fgFontName[0]); +- fgCurFontIdx = 0; // use font 0 (default font, set in ctor) +- return 0; +- } else { +- return 1; +- } + FcPattern *pat, *match; ++ FcCharSet *set = NULL; + FcResult result; + char *ttfont; + int ttindex; + + pat = FcPatternCreate (); + -+ if (strcmp(basename, /* 13 */ "times.ttf") == 0) { -+ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"times new roman"); -+ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); -+ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); -+ } -+ else if (strcmp(basename, /* 1 */ "timesi.ttf") == 0) { ++ switch (fontid) { ++ case 1: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"times new roman"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); -+ } -+ else if (strcmp(basename, /* 2 */ "timesbd.ttf") == 0) { ++ break; ++ case 2: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"times new roman"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); -+ } -+ else if (strcmp(basename, /* 3 */ "timesbi.ttf") == 0) { ++ break; ++ case 3: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"times new roman"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); -+ } -+ else if (strcmp(basename, /* 4 */ "arial.ttf") == 0) { ++ break; ++ case 4: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"arial"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); -+ } -+ else if (strcmp(basename, /* 5 */ "ariali.ttf") == 0) { ++ break; ++ case 5: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"arial"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); -+ } -+ else if (strcmp(basename, /* 6 and 0 */ "arialbd.ttf") == 0) { ++ break; ++ case 6: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"arial"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); -+ } -+ else if (strcmp(basename, /* 7 */ "arialbi.ttf") == 0) { ++ break; ++ case 7: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"arial"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); -+ } -+ else if (strcmp(basename, /* 8 */ "cour.ttf") == 0) { ++ break; ++ case 8: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"courier new"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); -+ } -+ else if (strcmp(basename, /* 9 */ "couri.ttf") == 0) { ++ break; ++ case 9: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"courier new"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); -+ } -+ else if (strcmp(basename, /* 10 */ "courbd.ttf") == 0) { ++ break; ++ case 10: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"courier new"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); -+ } -+ else if (strcmp(basename, /* 11 */ "courbi.ttf") == 0) { ++ break; ++ case 11: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"courier new"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); -+ } -+ else if (strcmp(basename, /* 12 and 15 */ "symbol.ttf") == 0) { ++ break; ++ case 12: ++ case 15: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"symbol"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); -+ } -+ else if (strcmp(basename, /* 14 */ "wingding.ttf") == 0) { ++ break; ++ case 13: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"times new roman"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 14: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"wingdings"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); -+ } -+ else { -+ Error("TTF::SetTextFont", "font %s not known to ROOT", basename); ++ break; ++ case 16: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixgeneral"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 17: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixgeneral"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); ++ break; ++ case 18: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixgeneral"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 19: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixgeneral"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); ++ break; ++ case 20: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsizeonesym"); ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsize1"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ // set = FcCharSetCreate (); ++ // FcCharSetAddChar (set, 0x239b); // Bracket pieces ++ // FcPatternAddCharSet (pat, FC_CHARSET, set); ++ break; ++ case 21: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsizeonesym"); ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsize1"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ // set = FcCharSetCreate (); ++ // FcCharSetAddChar (set, 0x239b); // Bracket pieces ++ // FcPatternAddCharSet (pat, FC_CHARSET, set); ++ break; ++ case 22: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsizetwosym"); ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsize2"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 23: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsizetwosym"); ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsize2"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 24: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsizethreesym"); ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsize13"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 25: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsizethreesym"); ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsize3"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 26: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsizefoursym"); ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsize4"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 27: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsizefoursym"); ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsize4"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 28: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsizefivesym"); ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsize5"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 29: ++ case 30: ++ case 31: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"droidsansfallback"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ set = FcCharSetCreate (); ++ FcCharSetAddChar (set, 0x0410); // Cyrillic ++ FcCharSetAddChar (set, 0x4e00); // CJK ++ FcPatternAddCharSet (pat, FC_CHARSET, set); ++ break; ++ default: ++ Error("TTF::SetTextFont", "font %i not known to ROOT", fontid); + FcPatternDestroy (pat); - if (fgFontCount) { - Warning("TTF::SetTextFont", "using default font %s", fgFontName[0]); - fgCurFontIdx = 0; // use font 0 (default font, set in ctor) -@@ -382,11 +453,18 @@ - } ++ Warning("TTF::SetTextFont", "using default font"); ++ fgCurFontIdx = 0; // use font 0 (default font, set in ctor) ++ return; ++ break; } + FcConfigSubstitute (NULL, pat, FcMatchPattern); @@ -188,28 +506,113 @@ diff -ur root-5.34.00.orig/graf2d/graf/src/TTF.cxx root-5.34.00/graf2d/graf/src/ + FcPatternDestroy (match); + FcPatternDestroy (pat); if (tface) FT_Done_Face(tface); - if (fgFontCount) { - Warning("TTF::SetTextFont", "using default font %s", fgFontName[0]); -@@ -397,7 +475,8 @@ - } +- if (fgFontCount) { +- Warning("TTF::SetTextFont", "using default font %s", fgFontName[0]); +- fgCurFontIdx = 0; +- return 0; +- } else { +- return 1; +- } ++ Warning("TTF::SetTextFont", "using default font"); ++ fgCurFontIdx = 0; ++ return; } - delete [] ttfont; + FcPatternDestroy (match); + FcPatternDestroy (pat); - fgFontName[fgFontCount] = StrDup(basename); +- fgFontName[fgFontCount] = StrDup(basename); ++ if (set) FcCharSetDestroy (set); ++ ++ fgFontID[fgFontCount] = fontid; fgCurFontIdx = fgFontCount; -@@ -464,37 +543,12 @@ - /*15 */ { "symbol.ttf", "symbol.ttf" } - }; + fgFace[fgCurFontIdx] = tface; + fgCharMap[fgCurFontIdx] = 0; + fgFontCount++; +- if (italic) { +- fgSymbItaFontIdx = fgCurFontIdx; ++ if (fontid == 15) { + FT_Matrix slantMat; + slantMat.xx = (1 << 16); + slantMat.xy = ((1 << 16) >> 2); + slantMat.yx = 0; + slantMat.yy = (1 << 16); +- FT_Set_Transform( fgFace[fgSymbItaFontIdx], &slantMat, NULL ); ++ FT_Set_Transform( fgFace[fgCurFontIdx], &slantMat, NULL ); + } +- +- return 0; +-} +- +-//______________________________________________________________________________ +-void TTF::SetTextFont(Font_t fontnumber) +-{ +- // Set specified font. +- // List of the currently supported fonts (screen and PostScript) +- // ============================================================= +- // Font ID X11 TTF +- // 1 : times-medium-i-normal timesi.ttf +- // 2 : times-bold-r-normal timesbd.ttf +- // 3 : times-bold-i-normal timesi.ttf +- // 4 : helvetica-medium-r-normal arial.ttf +- // 5 : helvetica-medium-o-normal ariali.ttf +- // 6 : helvetica-bold-r-normal arialbd.ttf +- // 7 : helvetica-bold-o-normal arialbi.ttf +- // 8 : courier-medium-r-normal cour.ttf +- // 9 : courier-medium-o-normal couri.ttf +- // 10 : courier-bold-r-normal courbd.ttf +- // 11 : courier-bold-o-normal courbi.ttf +- // 12 : symbol-medium-r-normal symbol.ttf +- // 13 : times-medium-r-normal times.ttf +- // 14 : wingding.ttf +- // 15 : symbol oblique is emulated from symbol.ttf +- +- // Added by cholm for use of DFSG - fonts - based on Kevins fix. +- // Table of Microsoft and (for non-MSFT operating systems) backup +- // FreeFont TTF fonts. +- static const char *fonttable[][2] = { +- { "Root.TTFont.0", "FreeSansBold.otf" }, +- { "Root.TTFont.1", "FreeSerifItalic.otf" }, +- { "Root.TTFont.2", "FreeSerifBold.otf" }, +- { "Root.TTFont.3", "FreeSerifBoldItalic.otf" }, +- { "Root.TTFont.4", "FreeSans.otf" }, +- { "Root.TTFont.5", "FreeSansOblique.otf" }, +- { "Root.TTFont.6", "FreeSansBold.otf" }, +- { "Root.TTFont.7", "FreeSansBoldOblique.otf" }, +- { "Root.TTFont.8", "FreeMono.otf" }, +- { "Root.TTFont.9", "FreeMonoOblique.otf" }, +- { "Root.TTFont.10", "FreeMonoBold.otf" }, +- { "Root.TTFont.11", "FreeMonoBoldOblique.otf" }, +- { "Root.TTFont.12", "symbol.ttf" }, +- { "Root.TTFont.13", "FreeSerif.otf" }, +- { "Root.TTFont.14", "wingding.ttf" }, +- { "Root.TTFont.15", "symbol.ttf" }, +- { "Root.TTFont.STIXGen", "STIXGeneral.otf" }, +- { "Root.TTFont.STIXGenIt", "STIXGeneralItalic.otf" }, +- { "Root.TTFont.STIXGenBd", "STIXGeneralBol.otf" }, +- { "Root.TTFont.STIXGenBdIt", "STIXGeneralBolIta.otf" }, +- { "Root.TTFont.STIXSiz1Sym", "STIXSiz1Sym.otf" }, +- { "Root.TTFont.STIXSiz1SymBd", "STIXSiz1SymBol.otf" }, +- { "Root.TTFont.STIXSiz2Sym", "STIXSiz2Sym.otf" }, +- { "Root.TTFont.STIXSiz2SymBd", "STIXSiz2SymBol.otf" }, +- { "Root.TTFont.STIXSiz3Sym", "STIXSiz3Sym.otf" }, +- { "Root.TTFont.STIXSiz3SymBd", "STIXSiz3SymBol.otf" }, +- { "Root.TTFont.STIXSiz4Sym", "STIXSiz4Sym.otf" }, +- { "Root.TTFont.STIXSiz4SymBd", "STIXSiz4SymBol.otf" }, +- { "Root.TTFont.STIXSiz5Sym", "STIXSiz5Sym.otf" }, +- { "Root.TTFont.ME", "DroidSansFallback.ttf" }, +- { "Root.TTFont.CJKMing", "DroidSansFallback.ttf" }, +- { "Root.TTFont.CJKGothic", "DroidSansFallback.ttf" } +- }; +- - static int fontset = -1; - int thisset = fontset; - - int fontid = fontnumber / 10; - if (fontid < 0 || fontid > 15) fontid = 0; - +- int fontid = fontnumber / 10; +- if (fontid < 0 || fontid > 31) fontid = 0; +- - if (thisset == -1) { - // try to load font (font must be in Root.TTFontPath resource) - // to see which fontset we have available @@ -220,7 +623,7 @@ diff -ur root-5.34.00.orig/graf2d/graf/src/TTF.cxx root-5.34.00/graf2d/graf/src/ - "$(ROOTSYS)/fonts" -#endif - ); -- char *ttfont = gSystem->Which(ttpath, fonttable[fontid][0], kReadPermission); +- char *ttfont = gSystem->Which(ttpath, gEnv->GetValue(fonttable[fontid][0], fonttable[fontid][1]), kReadPermission); - if (ttfont) { - delete [] ttfont; - thisset = 0; @@ -229,20 +632,318 @@ diff -ur root-5.34.00.orig/graf2d/graf/src/TTF.cxx root-5.34.00/graf2d/graf/src/ - thisset = 1; - } - } - Int_t italic = 0; - if (fontid==15) italic = 1; -- int ret = SetTextFont(fonttable[fontid][thisset], italic); +- Int_t italic = 0; +- if (fontid==15) italic = 1; +- int ret = SetTextFont(gEnv->GetValue(fonttable[fontid][thisset], fonttable[fontid][1]), italic); - // Do not define font set is we're loading the symbol.ttf - it's - // the same in both cases. - if (ret == 0 && fontid != 12) fontset = thisset; -+ SetTextFont(fonttable[fontid][0], italic); } //______________________________________________________________________________ -diff -ur root-5.34.00.orig/graf3d/gl/Module.mk root-5.34.00/graf3d/gl/Module.mk ---- root-5.34.00.orig/graf3d/gl/Module.mk 2012-06-05 15:31:34.000000000 +0200 -+++ root-5.34.00/graf3d/gl/Module.mk 2012-06-09 16:01:50.311196992 +0200 -@@ -70,7 +70,7 @@ +diff -ur root-5.34.05.orig/graf2d/postscript/Module.mk root-5.34.05/graf2d/postscript/Module.mk +--- root-5.34.05.orig/graf2d/postscript/Module.mk 2013-02-14 23:27:54.000000000 +0100 ++++ root-5.34.05/graf2d/postscript/Module.mk 2013-02-26 19:27:54.453632355 +0100 +@@ -50,7 +50,7 @@ + @$(MAKELIB) $(PLATFORM) $(LD) "$(LDFLAGS)" \ + "$(SOFLAGS)" libPostscript.$(SOEXT) $@ \ + "$(POSTSCRIPTO) $(POSTSCRIPTDO)" \ +- "$(POSTSCRIPTLIBEXTRA) $(MATHTEXTLIB) $(FREETYPELDFLAGS) $(FREETYPELIB)" ++ "$(POSTSCRIPTLIBEXTRA) $(MATHTEXTLIB) $(FREETYPELDFLAGS) $(FREETYPELIB) -lfontconfig" + + $(POSTSCRIPTDS): $(POSTSCRIPTH) $(POSTSCRIPTL) $(ROOTCINTTMPDEP) + $(MAKEDIR) +diff -ur root-5.34.05.orig/graf2d/postscript/src/TPostScript.cxx root-5.34.05/graf2d/postscript/src/TPostScript.cxx +--- root-5.34.05.orig/graf2d/postscript/src/TPostScript.cxx 2013-02-14 23:27:54.000000000 +0100 ++++ root-5.34.05/graf2d/postscript/src/TPostScript.cxx 2013-02-26 19:45:18.377106631 +0100 +@@ -238,6 +238,7 @@ + #include + #include + #include ++#include + + #include "Riostream.h" + #include "Byteswap.h" +@@ -1511,78 +1512,206 @@ + { + // Embed font in PS file. + +- static const char *fonttable[32][2] = { +- { "Root.TTFont.0", "FreeSansBold.otf" }, +- { "Root.TTFont.1", "FreeSerifItalic.otf" }, +- { "Root.TTFont.2", "FreeSerifBold.otf" }, +- { "Root.TTFont.3", "FreeSerifBoldItalic.otf" }, +- { "Root.TTFont.4", "FreeSans.otf" }, +- { "Root.TTFont.5", "FreeSansOblique.otf" }, +- { "Root.TTFont.6", "FreeSansBold.otf" }, +- { "Root.TTFont.7", "FreeSansBoldOblique.otf" }, +- { "Root.TTFont.8", "FreeMono.otf" }, +- { "Root.TTFont.9", "FreeMonoOblique.otf" }, +- { "Root.TTFont.10", "FreeMonoBold.otf" }, +- { "Root.TTFont.11", "FreeMonoBoldOblique.otf" }, +- { "Root.TTFont.12", "symbol.ttf" }, +- { "Root.TTFont.13", "FreeSerif.otf" }, +- { "Root.TTFont.14", "wingding.ttf" }, +- { "Root.TTFont.15", "symbol.ttf" }, +- { "Root.TTFont.STIXGen", "STIXGeneral.otf" }, +- { "Root.TTFont.STIXGenIt", "STIXGeneralItalic.otf" }, +- { "Root.TTFont.STIXGenBd", "STIXGeneralBol.otf" }, +- { "Root.TTFont.STIXGenBdIt", "STIXGeneralBolIta.otf" }, +- { "Root.TTFont.STIXSiz1Sym", "STIXSiz1Sym.otf" }, +- { "Root.TTFont.STIXSiz1SymBd", "STIXSiz1SymBol.otf" }, +- { "Root.TTFont.STIXSiz2Sym", "STIXSiz2Sym.otf" }, +- { "Root.TTFont.STIXSiz2SymBd", "STIXSiz2SymBol.otf" }, +- { "Root.TTFont.STIXSiz3Sym", "STIXSiz3Sym.otf" }, +- { "Root.TTFont.STIXSiz3SymBd", "STIXSiz3SymBol.otf" }, +- { "Root.TTFont.STIXSiz4Sym", "STIXSiz4Sym.otf" }, +- { "Root.TTFont.STIXSiz4SymBd", "STIXSiz4SymBol.otf" }, +- { "Root.TTFont.STIXSiz5Sym", "STIXSiz5Sym.otf" }, +- { "Root.TTFont.ME", "DroidSansFallback.ttf" }, +- { "Root.TTFont.CJKMing", "DroidSansFallback.ttf" }, +- { "Root.TTFont.CJKCothic", "DroidSansFallback.ttf" } +- }; +- + PrintStr("%%IncludeResource: ProcSet (FontSetInit)@"); + +- // try to load font (font must be in Root.TTFontPath resource) +- const char *ttpath = gEnv->GetValue("Root.TTFontPath", +-#ifdef TTFFONTDIR +- TTFFONTDIR +-#else // TTFFONTDIR +- "$(ROOTSYS)/fonts" +-#endif // TTFFONTDIR +- ); +- + for (Int_t fontid = 1; fontid < 30; fontid++) { +- if (fontid != 15) { +- const char *filename = gEnv->GetValue( +- fonttable[fontid][0], fonttable[fontid][1]); +- char *ttfont = gSystem->Which(ttpath, filename, +- kReadPermission); +- +- if(!ttfont) { +- Error("TPostScript::FontEmbed", +- "font %d (filename `%s') not found in path", +- fontid, filename); +- } else { +- if (FontEmbedType2(ttfont)) { +- // nothing +- } else if(FontEmbedType1(ttfont)) { +- // nothing +- } else if(FontEmbedType42(ttfont)) { +- // nothing +- } else { +- Error("TPostScript::FontEmbed", +- "failed to embed font %d (filename `%s')", +- fontid, filename); +- } +- delete [] ttfont; +- } +- } ++ if (fontid != 15) { ++ ++ FcPattern *pat, *match; ++ FcCharSet *set = NULL; ++ FcResult result; ++ char *ttfont; ++ ++ pat = FcPatternCreate (); ++ ++ switch (fontid) { ++ case 1: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"times new roman"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); ++ break; ++ case 2: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"times new roman"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 3: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"times new roman"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); ++ break; ++ case 4: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"arial"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 5: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"arial"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); ++ break; ++ case 6: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"arial"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 7: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"arial"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); ++ break; ++ case 8: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"courier new"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 9: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"courier new"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); ++ break; ++ case 10: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"courier new"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 11: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"courier new"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); ++ break; ++ case 12: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"symbol"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 13: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"times new roman"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 14: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"wingdings"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 16: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixgeneral"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 17: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixgeneral"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); ++ break; ++ case 18: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixgeneral"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 19: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixgeneral"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); ++ break; ++ case 20: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsizeonesym"); ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsize1"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ // set = FcCharSetCreate (); ++ // FcCharSetAddChar (set, 0x239b); // Bracket pieces ++ // FcPatternAddCharSet (pat, FC_CHARSET, set); ++ break; ++ case 21: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsizeonesym"); ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsize1"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ // set = FcCharSetCreate (); ++ // FcCharSetAddChar (set, 0x239b); // Bracket pieces ++ // FcPatternAddCharSet (pat, FC_CHARSET, set); ++ break; ++ case 22: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsizetwosym"); ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsize2"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 23: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsizetwosym"); ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsize2"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 24: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsizethreesym"); ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsize13"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 25: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsizethreesym"); ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsize3"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 26: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsizefoursym"); ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsize4"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 27: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsizefoursym"); ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsize4"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 28: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsizefivesym"); ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"stixsize5"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 29: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"droidsansfallback"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ set = FcCharSetCreate (); ++ FcCharSetAddChar (set, 0x0410); // Cyrillic ++ FcCharSetAddChar (set, 0x4e00); // CJK ++ FcPatternAddCharSet (pat, FC_CHARSET, set); ++ break; ++ } ++ ++ FcConfigSubstitute (NULL, pat, FcMatchPattern); ++ FcDefaultSubstitute (pat); ++ match = FcFontMatch (NULL, pat, &result); ++ FcPatternGetString (match, FC_FILE, 0, (FcChar8**)&ttfont); ++ ++ if(!ttfont) { ++ Error("TPostScript::FontEmbed", "font %d not found in path", ++ fontid); ++ } else { ++ if (FontEmbedType2(ttfont)) { ++ // nothing ++ } else if(FontEmbedType1(ttfont)) { ++ // nothing ++ } else if(FontEmbedType42(ttfont)) { ++ // nothing ++ } else { ++ Error("TPostScript::FontEmbed", "failed to embed font %d)", ++ fontid); ++ } ++ } ++ ++ FcPatternDestroy (match); ++ FcPatternDestroy (pat); ++ ++ if (set) FcCharSetDestroy (set); ++ } + } + PrintStr("%%IncludeResource: font Times-Roman@"); + PrintStr("%%IncludeResource: font Times-Italic@"); +diff -ur root-5.34.05.orig/graf3d/gl/Module.mk root-5.34.05/graf3d/gl/Module.mk +--- root-5.34.05.orig/graf3d/gl/Module.mk 2013-02-14 23:27:47.000000000 +0100 ++++ root-5.34.05/graf3d/gl/Module.mk 2013-02-26 19:27:54.454632361 +0100 +@@ -78,7 +78,7 @@ @$(MAKELIB) $(PLATFORM) $(LD) "$(LDFLAGS)" \ "$(SOFLAGS)" libRGL.$(SOEXT) $@ "$(GLO) $(GLO1) $(GLDO)" \ "$(GLLIBEXTRA) $(FTGLLIBDIR) $(FTGLLIBS) \ @@ -251,19 +952,18 @@ diff -ur root-5.34.00.orig/graf3d/gl/Module.mk root-5.34.00/graf3d/gl/Module.mk $(GLDS): $(GLH2) $(GLL) $(ROOTCINTTMPDEP) $(MAKEDIR) -diff -ur root-5.34.00.orig/graf3d/gl/src/TGLFontManager.cxx root-5.34.00/graf3d/gl/src/TGLFontManager.cxx ---- root-5.34.00.orig/graf3d/gl/src/TGLFontManager.cxx 2012-06-05 15:31:34.000000000 +0200 -+++ root-5.34.00/graf3d/gl/src/TGLFontManager.cxx 2012-06-09 16:01:50.311196992 +0200 -@@ -37,6 +37,8 @@ +diff -ur root-5.34.05.orig/graf3d/gl/src/TGLFontManager.cxx root-5.34.05/graf3d/gl/src/TGLFontManager.cxx +--- root-5.34.05.orig/graf3d/gl/src/TGLFontManager.cxx 2013-02-14 23:27:47.000000000 +0100 ++++ root-5.34.05/graf3d/gl/src/TGLFontManager.cxx 2013-02-26 19:27:54.454632361 +0100 +@@ -36,6 +36,7 @@ + # include "FTGLBitmapFont.h" #endif - +#include -+ + //______________________________________________________________________________ // TGLFont - // -@@ -391,17 +393,91 @@ +@@ -391,17 +392,91 @@ FontMap_i it = fFontMap.find(TGLFont(size, fileID, mode)); if (it == fFontMap.end()) { @@ -286,12 +986,7 @@ diff -ur root-5.34.00.orig/graf3d/gl/src/TGLFontManager.cxx root-5.34.00/graf3d/ + + pat = FcPatternCreate (); + -+ if (strcmp(fontname, /* 13 */ "times") == 0) { -+ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"times new roman"); -+ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); -+ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); -+ } -+ else if (strcmp(fontname, /* 1 */ "timesi") == 0) { ++ if (strcmp(fontname, /* 1 */ "timesi") == 0) { + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"times new roman"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); @@ -316,16 +1011,16 @@ diff -ur root-5.34.00.orig/graf3d/gl/src/TGLFontManager.cxx root-5.34.00/graf3d/ + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); + } -+ else if (strcmp(fontname, /* 6 and 0 */ "arialbd") == 0) { ++ else if (strcmp(fontname, /* 6 */ "arialbd") == 0) { + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"arial"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); - } ++ } + else if (strcmp(fontname, /* 7 */ "arialbi") == 0) { + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"arial"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); -+ } + } + else if (strcmp(fontname, /* 8 */ "cour") == 0) { + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"courier new"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); @@ -346,11 +1041,16 @@ diff -ur root-5.34.00.orig/graf3d/gl/src/TGLFontManager.cxx root-5.34.00/graf3d/ + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); + } -+ else if (strcmp(fontname, /* 12 and 15 */ "symbol") == 0) { ++ else if (strcmp(fontname, /* 12 */ "symbol") == 0) { + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"symbol"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); + } ++ else if (strcmp(fontname, /* 13 */ "times") == 0) { ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"times new roman"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ } + else if (strcmp(fontname, /* 14 */ "wingding") == 0) { + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"wingdings"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); @@ -365,7 +1065,7 @@ diff -ur root-5.34.00.orig/graf3d/gl/src/TGLFontManager.cxx root-5.34.00/graf3d/ FTFont* ftfont = 0; switch (mode) -@@ -427,9 +503,13 @@ +@@ -427,9 +502,13 @@ break; default: Error("TGLFontManager::GetFont", "invalid FTGL type"); @@ -379,9 +1079,9 @@ diff -ur root-5.34.00.orig/graf3d/gl/src/TGLFontManager.cxx root-5.34.00/graf3d/ ftfont->FaceSize(size); const TGLFont &mf = fFontMap.insert(std::make_pair(TGLFont(size, fileID, mode, ftfont, 0), 1)).first->first; out.CopyAttributes(mf); -diff -ur root-5.34.00.orig/graf3d/gl/src/TGLText.cxx root-5.34.00/graf3d/gl/src/TGLText.cxx ---- root-5.34.00.orig/graf3d/gl/src/TGLText.cxx 2012-06-05 15:31:34.000000000 +0200 -+++ root-5.34.00/graf3d/gl/src/TGLText.cxx 2012-06-09 16:01:50.320197065 +0200 +diff -ur root-5.34.05.orig/graf3d/gl/src/TGLText.cxx root-5.34.05/graf3d/gl/src/TGLText.cxx +--- root-5.34.05.orig/graf3d/gl/src/TGLText.cxx 2013-02-14 23:27:47.000000000 +0100 ++++ root-5.34.05/graf3d/gl/src/TGLText.cxx 2013-02-26 19:27:54.455632367 +0100 @@ -34,6 +34,8 @@ # include "FTGLBitmapFont.h" #endif @@ -391,10 +1091,27 @@ diff -ur root-5.34.00.orig/graf3d/gl/src/TGLText.cxx root-5.34.00/graf3d/gl/src/ #define FTGL_BITMAP 0 #define FTGL_PIXMAP 1 #define FTGL_OUTLINE 2 -@@ -190,16 +192,89 @@ - if (fontid == 13) fontname = "times.ttf"; - if (fontid == 14) fontname = "wingding.ttf"; +@@ -173,33 +175,91 @@ + { + int fontid = fontnumber / 10; +- const char *fontname=0; +- if (fontid == 0) fontname = "arialbd.ttf"; +- if (fontid == 1) fontname = "timesi.ttf"; +- if (fontid == 2) fontname = "timesbd.ttf"; +- if (fontid == 3) fontname = "timesbi.ttf"; +- if (fontid == 4) fontname = "arial.ttf"; +- if (fontid == 5) fontname = "ariali.ttf"; +- if (fontid == 6) fontname = "arialbd.ttf"; +- if (fontid == 7) fontname = "arialbi.ttf"; +- if (fontid == 8) fontname = "cour.ttf"; +- if (fontid == 9) fontname = "couri.ttf"; +- if (fontid == 10) fontname = "courbd.ttf"; +- if (fontid == 11) fontname = "courbi.ttf"; +- if (fontid == 12) fontname = "symbol.ttf"; +- if (fontid == 13) fontname = "times.ttf"; +- if (fontid == 14) fontname = "wingding.ttf"; +- - // try to load font (font must be in Root.TTFontPath resource) - const char *ttpath = gEnv->GetValue("Root.TTFontPath", -# ifdef TTFFONTDIR @@ -410,75 +1127,77 @@ diff -ur root-5.34.00.orig/graf3d/gl/src/TGLText.cxx root-5.34.00/graf3d/gl/src/ + + pat = FcPatternCreate (); + -+ if (strcmp(fontname, /* 13 */ "times.ttf") == 0) { -+ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"times new roman"); -+ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); -+ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); -+ } -+ else if (strcmp(fontname, /* 1 */ "timesi.ttf") == 0) { ++ switch (fontid) { ++ case 1: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"times new roman"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); -+ } -+ else if (strcmp(fontname, /* 2 */ "timesbd.ttf") == 0) { ++ break; ++ case 2: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"times new roman"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); -+ } -+ else if (strcmp(fontname, /* 3 */ "timesbi.ttf") == 0) { ++ break; ++ case 3: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"times new roman"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); -+ } -+ else if (strcmp(fontname, /* 4 */ "arial.ttf") == 0) { ++ break; ++ case 4: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"arial"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); -+ } -+ else if (strcmp(fontname, /* 5 */ "ariali.ttf") == 0) { ++ break; ++ case 5: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"arial"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); -+ } -+ else if (strcmp(fontname, /* 6 and 0 */ "arialbd.ttf") == 0) { ++ break; ++ case 6: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"arial"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); -+ } -+ else if (strcmp(fontname, /* 7 */ "arialbi.ttf") == 0) { ++ break; ++ case 7: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"arial"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); -+ } -+ else if (strcmp(fontname, /* 8 */ "cour.ttf") == 0) { ++ break; ++ case 8: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"courier new"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); -+ } -+ else if (strcmp(fontname, /* 9 */ "couri.ttf") == 0) { ++ break; ++ case 9: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"courier new"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); -+ } -+ else if (strcmp(fontname, /* 10 */ "courbd.ttf") == 0) { ++ break; ++ case 10: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"courier new"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); -+ } -+ else if (strcmp(fontname, /* 11 */ "courbi.ttf") == 0) { ++ break; ++ case 11: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"courier new"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC); -+ } -+ else if (strcmp(fontname, /* 12 */ "symbol.ttf") == 0) { ++ break; ++ case 12: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"symbol"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); -+ } -+ else if (strcmp(fontname, /* 14 */ "wingding.ttf") == 0) { ++ break; ++ case 13: ++ FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"times new roman"); ++ FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); ++ FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; ++ case 14: + FcPatternAddString (pat, FC_FAMILY, (const FcChar8*)"wingdings"); + FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_REGULAR); + FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ROMAN); ++ break; + } - char *ttfont = gSystem->Which(ttpath, fontname, kReadPermission); @@ -490,7 +1209,7 @@ diff -ur root-5.34.00.orig/graf3d/gl/src/TGLText.cxx root-5.34.00/graf3d/gl/src/ if (fGLTextFont) delete fGLTextFont; -@@ -209,5 +284,6 @@ +@@ -209,5 +269,6 @@ if (!fGLTextFont->FaceSize(1)) Error("SetGLTextFont","Cannot set FTGL::FaceSize"), @@ -498,9 +1217,9 @@ diff -ur root-5.34.00.orig/graf3d/gl/src/TGLText.cxx root-5.34.00/graf3d/gl/src/ + FcPatternDestroy (match); + FcPatternDestroy (pat); } -diff -ur root-5.34.00.orig/gui/gui/src/TGApplication.cxx root-5.34.00/gui/gui/src/TGApplication.cxx ---- root-5.34.00.orig/gui/gui/src/TGApplication.cxx 2012-06-05 15:31:42.000000000 +0200 -+++ root-5.34.00/gui/gui/src/TGApplication.cxx 2012-06-09 16:01:50.327197123 +0200 +diff -ur root-5.34.05.orig/gui/gui/src/TGApplication.cxx root-5.34.05/gui/gui/src/TGApplication.cxx +--- root-5.34.05.orig/gui/gui/src/TGApplication.cxx 2013-02-14 23:27:51.000000000 +0100 ++++ root-5.34.05/gui/gui/src/TGApplication.cxx 2013-02-26 19:27:54.455632367 +0100 @@ -83,25 +83,12 @@ gROOT->SetBatch(kFALSE); @@ -528,9 +1247,9 @@ diff -ur root-5.34.00.orig/gui/gui/src/TGApplication.cxx root-5.34.00/gui/gui/sr } // Create the canvas colors early so they are allocated before -diff -ur root-5.34.00.orig/gui/gui/src/TGSpeedo.cxx root-5.34.00/gui/gui/src/TGSpeedo.cxx ---- root-5.34.00.orig/gui/gui/src/TGSpeedo.cxx 2012-06-05 15:31:42.000000000 +0200 -+++ root-5.34.00/gui/gui/src/TGSpeedo.cxx 2012-06-09 16:03:08.260851587 +0200 +diff -ur root-5.34.05.orig/gui/gui/src/TGSpeedo.cxx root-5.34.05/gui/gui/src/TGSpeedo.cxx +--- root-5.34.05.orig/gui/gui/src/TGSpeedo.cxx 2013-02-14 23:27:51.000000000 +0100 ++++ root-5.34.05/gui/gui/src/TGSpeedo.cxx 2013-02-26 19:27:54.455632367 +0100 @@ -119,8 +119,7 @@ TString sc; diff --git a/root-gfal-bits.patch b/root-gfal-bits.patch index ab7afff..edf424e 100644 --- a/root-gfal-bits.patch +++ b/root-gfal-bits.patch @@ -1,15 +1,9 @@ -diff -ur root-5.34.02.orig/io/gfal/src/TGFALFile.cxx root-5.34.02/io/gfal/src/TGFALFile.cxx ---- root-5.34.02.orig/io/gfal/src/TGFALFile.cxx 2012-09-21 16:29:07.000000000 +0200 -+++ root-5.34.02/io/gfal/src/TGFALFile.cxx 2012-10-12 22:59:42.785689152 +0200 -@@ -60,6 +60,11 @@ - // // - ////////////////////////////////////////////////////////////////////////// - -+#ifdef _FILE_OFFSET_BITS -+#undef _FILE_OFFSET_BITS -+#endif -+#define _FILE_OFFSET_BITS 64 -+ - #include "TGFALFile.h" - #include "TROOT.h" - #include "TUrl.h" +diff -ur root-5.34.05.orig/io/gfal/Module.mk root-5.34.05/io/gfal/Module.mk +--- root-5.34.05.orig/io/gfal/Module.mk 2013-02-14 23:27:54.000000000 +0100 ++++ root-5.34.05/io/gfal/Module.mk 2013-02-26 20:58:00.150088502 +0100 +@@ -71,3 +71,5 @@ + $(GFALO) $(GFALDO): CXXFLAGS := $(filter-out -Wshadow,$(CXXFLAGS)) + $(GFALO): CXXFLAGS += $(GFALINCDIR:%=-I%) + $(GFALO): CXXFLAGS += $(SRMIFCEINCDIR:%=-I%) ++$(GFALO): CXXFLAGS += $(shell pkg-config --cflags glib-2.0) ++$(GFALO): CXXFLAGS += -D_FILE_OFFSET_BITS=64 diff --git a/root-glibc.patch b/root-glibc.patch deleted file mode 100644 index b2da159..0000000 --- a/root-glibc.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff -ur root-5.34.00.orig/build/rmkdepend/main.c root-5.34.00/build/rmkdepend/main.c ---- root-5.34.00.orig/build/rmkdepend/main.c 2012-06-05 15:31:46.000000000 +0200 -+++ root-5.34.00/build/rmkdepend/main.c 2012-07-05 20:42:58.938953353 +0200 -@@ -60,7 +60,7 @@ - # endif - # elif defined(__CYGWIN__) - extern int fchmod(int, mode_t); --#else -+# elif !defined(__GLIBC__) || __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 16) - extern int fchmod(int, int); - # endif - #endif -diff -ur root-5.34.00.orig/cint/tool/rmkdepend/main.c root-5.34.00/cint/tool/rmkdepend/main.c ---- root-5.34.00.orig/cint/tool/rmkdepend/main.c 2012-06-05 15:31:30.000000000 +0200 -+++ root-5.34.00/cint/tool/rmkdepend/main.c 2012-07-05 20:42:58.492949104 +0200 -@@ -58,7 +58,7 @@ - #if !defined(MAC_OS_X_VERSION_10_4) - extern int fchmod(); - #endif --#else -+#elif !defined(__GLIBC__) || __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 16) - extern int fchmod(); - #endif - #endif -diff -ur root-5.34.00.orig/core/unix/src/TUnixSystem.cxx root-5.34.00/core/unix/src/TUnixSystem.cxx ---- root-5.34.00.orig/core/unix/src/TUnixSystem.cxx 2012-06-05 15:31:17.000000000 +0200 -+++ root-5.34.00/core/unix/src/TUnixSystem.cxx 2012-07-05 20:29:29.969242837 +0200 -@@ -98,6 +98,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/root-gviz.patch b/root-gviz.patch new file mode 100644 index 0000000..8631327 --- /dev/null +++ b/root-gviz.patch @@ -0,0 +1,116 @@ +diff -ur root-5.34.05.orig/configure root-5.34.05/configure +--- root-5.34.05.orig/configure 2013-02-14 23:27:56.000000000 +0100 ++++ root-5.34.05/configure 2013-03-07 19:40:36.108220359 +0100 +@@ -3639,7 +3639,7 @@ + gvizlib1=$found_lib + gvizlib1raw=$found_raw_lib + gvizlibir=$found_dir +- check_library "libgraph graph" "no" "$gvizlibdir" \ ++ check_library "libgraph graph libcgraph cgraph" "no" "$gvizlibdir" \ + $GVIZ ${GVIZ:+$GVIZ/lib/graphviz} ${GVIZ:+$GVIZ/lib} ${GVIZ:+$GVIZ/.libs} \ + ${finkdir:+$finkdir/lib} \ + /usr/local/lib /usr/lib +diff -ur root-5.34.05.orig/graf2d/gviz/inc/TGraphEdge.h root-5.34.05/graf2d/gviz/inc/TGraphEdge.h +--- root-5.34.05.orig/graf2d/gviz/inc/TGraphEdge.h 2013-02-14 23:27:53.000000000 +0100 ++++ root-5.34.05/graf2d/gviz/inc/TGraphEdge.h 2013-03-07 19:35:10.936220359 +0100 +@@ -20,8 +20,13 @@ + #include "TAttLine.h" + #endif + ++#if !defined(__CINT__) ++#include ++#else + struct Agraph_t; + struct Agedge_t; ++#endif ++ + class TGraphNode; + + ////////////////////////////////////////////////////////////////////////// +diff -ur root-5.34.05.orig/graf2d/gviz/inc/TGraphNode.h root-5.34.05/graf2d/gviz/inc/TGraphNode.h +--- root-5.34.05.orig/graf2d/gviz/inc/TGraphNode.h 2013-02-14 23:27:53.000000000 +0100 ++++ root-5.34.05/graf2d/gviz/inc/TGraphNode.h 2013-03-07 19:35:10.946220359 +0100 +@@ -28,9 +28,12 @@ + #include "TAttLine.h" + #endif + ++#if !defined(__CINT__) ++#include ++#else + struct Agraph_t; + struct Agnode_t; +- ++#endif + + ////////////////////////////////////////////////////////////////////////// + // // +diff -ur root-5.34.05.orig/graf2d/gviz/inc/TGraphStruct.h root-5.34.05/graf2d/gviz/inc/TGraphStruct.h +--- root-5.34.05.orig/graf2d/gviz/inc/TGraphStruct.h 2013-02-14 23:27:53.000000000 +0100 ++++ root-5.34.05/graf2d/gviz/inc/TGraphStruct.h 2013-03-07 19:35:10.954220359 +0100 +@@ -25,7 +25,12 @@ + #include "TList.h" + #endif + ++#if !defined(__CINT__) ++#include ++#else + struct Agraph_t; ++#endif ++ + struct GVC_s; + + ////////////////////////////////////////////////////////////////////////// +diff -ur root-5.34.05.orig/graf2d/gviz/Module.mk root-5.34.05/graf2d/gviz/Module.mk +--- root-5.34.05.orig/graf2d/gviz/Module.mk 2013-02-14 23:27:53.000000000 +0100 ++++ root-5.34.05/graf2d/gviz/Module.mk 2013-03-07 19:35:10.921220359 +0100 +@@ -68,4 +68,4 @@ + distclean:: distclean-$(MODNAME) + + ##### extra rules ###### +-$(GVIZO): CXXFLAGS += $(GRAPHVIZINCDIR:%=-I%) $(GRAPHVIZCFLAGS) ++$(GVIZO) $(GVIZDO): CXXFLAGS += $(GRAPHVIZINCDIR:%=-I%) $(GRAPHVIZCFLAGS) +diff -ur root-5.34.05.orig/graf2d/gviz/src/TGraphEdge.cxx root-5.34.05/graf2d/gviz/src/TGraphEdge.cxx +--- root-5.34.05.orig/graf2d/gviz/src/TGraphEdge.cxx 2013-02-14 23:27:53.000000000 +0100 ++++ root-5.34.05/graf2d/gviz/src/TGraphEdge.cxx 2013-03-07 19:35:10.892220359 +0100 +@@ -81,7 +81,11 @@ + if (gv) { + Agnode_t *n1 = fNode1->GetGVNode(); + Agnode_t *n2 = fNode2->GetGVNode(); ++#ifdef WITH_CGRAPH ++ fGVEdge = agedge(gv, n1, n2, NULL, 1); ++#else + fGVEdge = agedge(gv, n1, n2); ++#endif + } else { + Error("CreateGVEdge","Invalid graphviz graph"); + } +diff -ur root-5.34.05.orig/graf2d/gviz/src/TGraphNode.cxx root-5.34.05/graf2d/gviz/src/TGraphNode.cxx +--- root-5.34.05.orig/graf2d/gviz/src/TGraphNode.cxx 2013-02-14 23:27:53.000000000 +0100 ++++ root-5.34.05/graf2d/gviz/src/TGraphNode.cxx 2013-03-07 19:35:10.904220359 +0100 +@@ -65,7 +65,11 @@ + // Create the GraphViz node into the GraphViz data structure gv. + + if (gv) { ++#ifdef WITH_CGRAPH ++ fGVNode = agnode(gv, (char *)GetName(), 1); ++#else + fGVNode = agnode(gv, (char *)GetName()); ++#endif + } else { + Error("CreateGVNode","Invalid graphviz graph"); + } +diff -ur root-5.34.05.orig/graf2d/gviz/src/TGraphStruct.cxx root-5.34.05/graf2d/gviz/src/TGraphStruct.cxx +--- root-5.34.05.orig/graf2d/gviz/src/TGraphStruct.cxx 2013-02-14 23:27:53.000000000 +0100 ++++ root-5.34.05/graf2d/gviz/src/TGraphStruct.cxx 2013-03-07 19:35:10.913220359 +0100 +@@ -226,7 +226,11 @@ + gvFreeLayout(fGVC,fGVGraph); + agclose(fGVGraph); + } ++#ifdef WITH_CGRAPH ++ fGVGraph = agopen((char*)"GVGraph", Agdirected, 0); ++#else + fGVGraph = agopen((char*)"GVGraph", AGDIGRAPH); ++#endif + + // Put the GV nodes into the GV graph + if (fNodes) { diff --git a/root-no-extra-formats.patch b/root-no-extra-formats.patch new file mode 100644 index 0000000..a3924f4 --- /dev/null +++ b/root-no-extra-formats.patch @@ -0,0 +1,20 @@ +diff -ur root-5.34.05.orig/tutorials/graphics/tmathtext.C root-5.34.05/tutorials/graphics/tmathtext.C +--- root-5.34.05.orig/tutorials/graphics/tmathtext.C 2013-02-14 23:27:35.000000000 +0100 ++++ root-5.34.05/tutorials/graphics/tmathtext.C 2013-03-01 19:00:01.437565765 +0100 +@@ -17,11 +17,11 @@ + l.DrawMathText(0.27, 0.110, "\\mathbb{N} \\subset \\mathbb{R}"); + l.DrawMathText(0.63, 0.100, "\\hbox{RHIC スピン物理 Нью-Йорк}"); + +- c1->Print("c1.gif"); +- c1->Print("c1.jpg"); +- c1->Print("c1.png"); +- c1->Print("c1.ps"); +- c1->Print("c1.eps"); ++ // c1->Print("c1.gif"); ++ // c1->Print("c1.jpg"); ++ // c1->Print("c1.png"); ++ // c1->Print("c1.ps"); ++ // c1->Print("c1.eps"); + + return c1; + } diff --git a/root-rev48681.patch b/root-rev48681.patch new file mode 100644 index 0000000..409ae83 --- /dev/null +++ b/root-rev48681.patch @@ -0,0 +1,199 @@ +Index: proof/proofd/src/XrdProofdProofServMgr.cxx +=================================================================== +--- proof/proofd/src/XrdProofdProofServMgr.cxx (revision 48680) ++++ proof/proofd/src/XrdProofdProofServMgr.cxx (revision 48681) +@@ -32,8 +32,7 @@ + #include "XrdOuc/XrdOucRash.hh" + #include "XrdOuc/XrdOucStream.hh" + #include "XrdSys/XrdSysPriv.hh" +-#include "XrdSut/XrdSutAux.hh" +- ++#include "XrdSys/XrdSysPlugin.hh" + #include "XrdProofdClient.h" + #include "XrdProofdClientMgr.h" + #include "XrdProofdManager.h" +@@ -287,6 +286,8 @@ + fCurrentSessions = 0; + + fSeqSessionN = 0; ++ ++ fCredsSaver = 0; + + // Defaults can be changed via 'proofservmgr' + fCheckFrequency = 30; +@@ -3091,22 +3092,13 @@ + ev[len] = 0; + putenv(ev); + TRACE(DBG, "XrdSecCREDS set"); +- +- // If 'pwd', save AFS key, if any +- if (!strncmp(p->AuthProt()->Entity.prot, "pwd", 3)) { ++ if (fCredsSaver) { + XrdOucString credsdir = udir; + credsdir += "/.creds"; + // Make sure the directory exists + if (!XrdProofdAux::AssertDir(credsdir.c_str(), p->Client()->UI(), fMgr->ChangeOwn())) { +- if (SaveAFSkey(creds, credsdir.c_str(), p->Client()->UI()) == 0) { +- len = strlen("ROOTPROOFAFSCREDS=")+credsdir.length()+strlen("/.afs")+2; +- ev = new char[len]; +- snprintf(ev, len, "ROOTPROOFAFSCREDS=%s/.afs", credsdir.c_str()); +- putenv(ev); +- fprintf(fenv, "ROOTPROOFAFSCREDS has been set\n"); +- TRACE(DBG, ev); +- } else { +- TRACE(DBG, "problems in saving AFS key"); ++ if ((*fCredsSaver)(creds, credsdir.c_str(), p->Client()->UI()) != 0) { ++ TRACE(DBG, "problems in saving authentication creds under "<fOld); + TRACE(DBG, "XrdSecCREDS set"); + +- // If 'pwd', save AFS key, if any +- if (!strncmp(p->AuthProt()->Entity.prot, "pwd", 3)) { ++ if (fCredsSaver) { + XrdOucString credsdir = p->Client()->Sandbox()->Dir(); + credsdir += "/.creds"; + // Make sure the directory exists + if (!XrdProofdAux::AssertDir(credsdir.c_str(), p->Client()->UI(), fMgr->ChangeOwn())) { +- if (SaveAFSkey(creds, credsdir.c_str(), p->Client()->UI()) == 0) { +- len = strlen("ROOTPROOFAFSCREDS=")+credsdir.length()+strlen("/.afs")+2; +- ev = new char[len]; +- snprintf(ev, len, "ROOTPROOFAFSCREDS=%s/.afs", credsdir.c_str()); +- fprintf(fenv, "ROOTPROOFAFSCREDS has been set\n"); +- TRACE(DBG, ev); +- PutEnv(ev, in->fOld); +- } else { +- TRACE(DBG, "problems in saving AFS key"); ++ if ((*fCredsSaver)(creds, credsdir.c_str(), p->Client()->UI()) != 0) { ++ TRACE(DBG, "problems in saving authentication creds under "<size]; +- if (XrdSutFromHex(c->buffer, out, lout) != 0) { +- TRACE(XERR, "problems unparsing hex string"); +- delete [] out; +- return -1; +- } +- +- // Locate the key +- char *key = out + 5; +- if (strncmp(key, "afs:", 4)) { +- TRACE(DBG, "string does not contain an AFS key"); +- delete [] out; +- return 0; +- } +- key += 4; +- +- // Save to file, if not existing already +- XrdOucString fn = dir; +- fn += "/.afs"; +- int rc = 0; +- +- // Open the file, truncating if already existing +- int fd = open(fn.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0600); +- if (fd < 0) { +- TRACE(XERR, "problems creating file - errno: " << errno); +- delete [] out; +- return -1; +- } +- // Write out the key +- int lkey = lout - 9; +- if (XrdProofdAux::Write(fd, key, lkey) != lkey) { +- TRACE(XERR, "problems writing to file - errno: " << errno); +- rc = -1; +- } +- +- // Cleanup +- delete [] out; +- close(fd); +- +- // Make sure the file is owned by the user +- if (XrdProofdAux::ChangeOwn(fn.c_str(), ui) != 0) { +- TRACE(XERR, "can't change ownership of "<= 0 && t < PSMMAXCNTS) + ++// Security handle ++typedef int (*XrdSecCredsSaver_t)(XrdSecCredentials *, const char *fn, const XrdProofUI &ui); ++ + // Aux structure for session set env inputs + typedef struct { + XrdProofdProofServ *fPS; +@@ -161,6 +164,8 @@ + + std::map fDestroyTimes; // Tracks destroyed sessions + ++ XrdSecCredsSaver_t fCredsSaver; // If defined, function to be used to save the credentials ++ + int DoDirectiveProofServMgr(char *, XrdOucStream *, bool); + int DoDirectivePutEnv(char *, XrdOucStream *, bool); + int DoDirectivePutRc(char *, XrdOucStream *, bool); +@@ -268,8 +273,6 @@ + + int SetProofServEnv(XrdProofdProtocol *p, void *in); + int SetProofServEnvOld(XrdProofdProtocol *p, void *in); +- +- int SaveAFSkey(XrdSecCredentials *c, const char *fn, XrdProofUI ui); + int SetUserEnvironment(XrdProofdProtocol *p); + + static int SetProofServEnv(XrdProofdManager *m, XrdROOT *r); diff --git a/root-rev48831.patch b/root-rev48831.patch new file mode 100644 index 0000000..2b016c3 --- /dev/null +++ b/root-rev48831.patch @@ -0,0 +1,619 @@ +Index: cmake/modules/FindXROOTD.cmake +=================================================================== +--- cmake/modules/FindXROOTD.cmake (revision 48830) ++++ cmake/modules/FindXROOTD.cmake (revision 48831) +@@ -28,32 +28,37 @@ + ) + + if (XROOTD_INCLUDE_DIR) +- file(STRINGS ${XROOTD_INCLUDE_DIR}/XrdVersion.hh xrdvers REGEX "^#define XrdVERSION") ++ file(STRINGS ${XROOTD_INCLUDE_DIR}/XrdVersion.hh xrdvers REGEX "^#define XrdVERSION ") + string(REGEX REPLACE "#define[ ]+XrdVERSION[ ]+" "" xrdvers ${xrdvers}) + string(REGEX REPLACE "[^v\\.]+" "" xrdversdots ${xrdvers}) + if (${xrdversdots} STREQUAL "v..") + # Regular version string; parse it out + string(REGEX MATCH "[0-9\\.]+" xrdvers ${xrdvers}) +- string(REGEX MATCH "[0-9]" xrdversmajor ${xrdvers}) +- string(REPLACE "${xrdversmajor}." "" xrdversminor ${xrdvers}) +- string(REGEX MATCH "[0-9]" xrdversminor ${xrdversminor}) +- string(REPLACE "${xrdversmajor}.${xrdversminor}." "" xrdverspatch ${xrdvers}) +- string(REGEX MATCH "[0-9]+" xrdverspatch ${xrdverspatch}) ++ string(REGEX REPLACE "^([^.]*)\\.(.*)\\.(.*)" "\\1" xrdversmajor ${xrdvers}) ++ string(REGEX REPLACE "^([^.]*)\\.(.*)\\.(.*)" "\\2" xrdversminor ${xrdvers}) ++ string(REGEX REPLACE "^([^.]*)\\.(.*)\\.(.*)" "\\3" xrdverspatch ${xrdvers}) + math(EXPR xrdversnum ${xrdversmajor}*100000000+${xrdversminor}*10000+${xrdverspatch}) + else () + # Old version string: we keep only the first numerics, i.e. the date + string(REGEX REPLACE "[v\"]" "" xrdvers ${xrdvers}) +- message(STATUS "Found Xrootd version ${xrdvers}") +- string(REGEX REPLACE "[^0-9-]+" " " xrdvers ${xrdvers}) + string(SUBSTRING ${xrdvers} 0 8 xrdversnum) + endif () ++ if ( ${xrdversnum} EQUAL 300030000 ) ++ SET(XROOTD_FOUND FALSE) ++ message(WARNING " >>> Cannot build with XRootD version 3.3.0: please install >=3.3.1 or <= 3.2.x") ++ else() ++ SET(XROOTD_FOUND TRUE) ++ endif () ++endif() ++ ++if(XROOTD_FOUND) + # This we used as a compiler macro variable + if(NOT XROOTD_FIND_QUIETLY ) +- message(STATUS "Found Xrootd version num: ${xrdvers}") ++ message(STATUS "Found Xrootd version num: ${xrdvers} (setting -DROOTXRDVERS=${xrdversnum})") + endif() + SET(XROOTD_CFLAGS "-DROOTXRDVERS=${xrdversnum}") + +- if ( ${xrdversnum} LESS 300010000 ) ++ if ( ${xrdversnum} LESS 300010000 AND ${xrdversnum} LESS 20111022) + SET(XROOTD_OLDPACK TRUE) + message(STATUS "Setting OLDPACK TRUE") + else() +@@ -72,14 +77,16 @@ + XrdOuc/XrdOucPthread.hh + XrdOuc/XrdOucSemWait.hh + XrdOuc/XrdOucTimer.hh ++ PATHS + ${XROOTD_INCLUDE_DIR} + ) + else() +- if ( ${xrdversnum} LESS 300010000 ) ++ if ( ${xrdversnum} LESS 300010000 AND ${xrdversnum} LESS 20111022) + # DNS stuff was under XrdNet + find_path(XROOTD_INCLUDE_DIR + NAMES + XrdNet/XrdNetDNS.hh ++ PATHS + ${XROOTD_INCLUDE_DIR} + ) + else () +@@ -87,6 +94,7 @@ + find_path(XROOTD_INCLUDE_DIR + NAMES + XrdSys/XrdSysDNS.hh ++ PATHS + ${XROOTD_INCLUDE_DIR} + ) + endif () +@@ -101,9 +109,20 @@ + XrdSys/XrdSysPthread.hh + XrdSys/XrdSysSemWait.hh + XrdSys/XrdSysTimer.hh ++ PATHS + ${XROOTD_INCLUDE_DIR} + ) + endif() ++ ++ if (XROOTD_INCLUDE_DIR) ++ # Check for additional headers in new directories ++ find_path(XROOTD_PRIVATE_INCLUDE_DIR ++ NAMES ++ XrdSys/XrdSysPriv.hh ++ PATHS ++ ${XROOTD_INCLUDE_DIR}/private ++ ) ++ endif() + endif() + if (XROOTD_INCLUDE_DIR) + SET(XROOTD_FOUND TRUE) +@@ -152,7 +171,7 @@ + if(XROOTD_LIBRARIES) + set(XROOTD_FOUND TRUE) + if(NOT XROOTD_FIND_QUIETLY ) +- message(STATUS " include_dir: ${XROOTD_INCLUDE_DIR}") ++ message(STATUS " include_dir: ${XROOTD_INCLUDE_DIR} ${XROOTD_PRIVATE_INCLUDE_DIR}") + message(STATUS " libraries: ${XROOTD_LIBRARIES}") + endif() + else () +@@ -160,7 +179,8 @@ + endif () + endif() + +-mark_as_advanced(XROOTD_INCLUDE_DIR ++mark_as_advanced(XROOTD_INCLUDE_DIR ++ XROOTD_PRIVATE_INCLUDE_DIR + XROOTD_XrdMain_LIBRARY + XROOTD_XrdUtils_LIBRARY + XROOTD_XrdClient_LIBRARY +Index: configure +=================================================================== +--- configure (revision 48830) ++++ configure (revision 48831) +@@ -4577,9 +4577,16 @@ + fi + fi + fi +- echo "$xrdver" ++ # Protect against 3.3.0, first version with 'include/xrootd/private' ++ if [ $decver -eq 300030000 ] ; then ++ echo "Cannot build against version $xrdver (missing headers)" ++ enable_xrootd="no" ++ else ++ echo "$xrdver" ++ fi + fi + ++xrdincprivate="no" + if test "x$enable_xrootd" = "xyes" ; then + + extraxrdflags="-DROOTXRDVERS=$decver" +@@ -4635,6 +4642,15 @@ + fi + + # ++ # Check also if 'include/private' exists: we need to signal this to the build modules ++ # for correct location of some headers available form the dlevel packages for version >= 3.3.x ++ if test "x$enable_xrootd" = "xyes"; then ++ if test -d "$xrdincdir/private"; then ++ xrdincprivate="yes" ++ fi ++ fi ++ ++ # + # Check if bonjour is available for code potentially using it ... + if test "x$enable_xrootd" = "xyes"; then + xrdlibdir="$tmpxrdlibdir" +@@ -6730,6 +6746,7 @@ + -e "s|@xpmlibdir@|$xpmlibdir|" \ + -e "s|@xrdlibdir@|$xrdlibdir|" \ + -e "s|@xrdincdir@|$xrdincdir|" \ ++ -e "s|@xrdincprivate@|$xrdincprivate|" \ + -e "s|@xrdversion@|$decver|" \ + -e "s|@hasxrdutils@|$hasxrdutils|" \ + -e "s|@cfitsioincdir@|$cfitsioincdir|" \ +Index: proof/proofd/src/XrdProofConn.cxx +=================================================================== +--- proof/proofd/src/XrdProofConn.cxx (revision 48830) ++++ proof/proofd/src/XrdProofConn.cxx (revision 48831) +@@ -32,7 +32,6 @@ + + #include "XrdClient/XrdClientConnMgr.hh" + #include "XrdClient/XrdClientConst.hh" +-#include "XrdClient/XrdClientDebug.hh" + #include "XrdClient/XrdClientEnv.hh" + #include "XrdClient/XrdClientLogConnection.hh" + #include "XrdClient/XrdClientPhyConnection.hh" +@@ -41,6 +40,7 @@ + #include "XrdOuc/XrdOucErrInfo.hh" + #include "XrdOuc/XrdOucString.hh" + #include "XrdSec/XrdSecInterface.hh" ++#include "XrdSys/XrdSysLogger.hh" + #include "XrdSys/XrdSysPlatform.hh" + + // Dynamic libs +Index: proof/proofd/src/XpdObject.cxx +=================================================================== +--- proof/proofd/src/XpdObject.cxx (revision 0) ++++ proof/proofd/src/XpdObject.cxx (revision 48831) +@@ -0,0 +1,125 @@ ++// @(#)root/proofd:$Id$ ++// Author: Gerardo Ganis Feb 2013 ++ ++/************************************************************************* ++ * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * ++ * All rights reserved. * ++ * * ++ * For the licensing terms see $ROOTSYS/LICENSE. * ++ * For the list of contributors see $ROOTSYS/README/CREDITS. * ++ *************************************************************************/ ++ ++////////////////////////////////////////////////////////////////////////// ++// // ++// XpdObject // ++// // ++// Authors: G. Ganis, CERN, 2013 // ++// // ++// Auxilliary class to stack protocols. // ++// // ++////////////////////////////////////////////////////////////////////////// ++ ++#include "XpdObject.h" ++#include "XrdProofdAux.h" ++#include "XrdProofdProtocol.h" ++#include "Xrd/XrdScheduler.hh" ++#include "XrdOuc/XrdOucTrace.hh" ++ ++//_______________________________________________________________________ ++XrdProofdProtocol *XpdObjectQ::Pop() ++{ ++ // Pop up a protocol object ++ ++ XpdObject *node; ++ fQMutex.Lock(); ++ if ((node = fFirst)) { ++ fFirst = fFirst->fNext; ++ fCount--; ++ } ++ fQMutex.UnLock(); ++ if (node) return node->fItem; ++ return (XrdProofdProtocol *)0; ++} ++ ++//_______________________________________________________________________ ++void XpdObjectQ::Push(XpdObject *node) ++{ ++ // Push back a protocol ++ ++ node->fQTime = fCurage; ++ fQMutex.Lock(); ++ if (fCount >= fMaxinQ) { ++ delete node->fItem; ++ } else { ++ node->fNext = fFirst; ++ fFirst = node; ++ fCount++; ++ } ++ fQMutex.UnLock(); ++} ++ ++//_______________________________________________________________________ ++void XpdObjectQ::Set(int inQMax, time_t agemax) ++{ ++ // Lock the data area and set the values ++ ++ fQMutex.Lock(); ++ fMaxinQ = inQMax; fMaxage = agemax; ++ if (!(fMininQ = inQMax/2)) fMininQ = 1; ++ fQMutex.UnLock(); ++ ++ // Schedule ourselves using the new values ++ if (agemax > 0) ++ fSched->Schedule((XrdJob *)this, agemax + time(0)); ++} ++ ++//_______________________________________________________________________ ++void XpdObjectQ::DoIt() ++{ ++ // Process method ++ ++ XpdObject *pp, *p; ++ int oldcnt, agemax; ++ ++ // Lock the anchor and see if we met the threshold for deletion ++ // ++ fQMutex.Lock(); ++ agemax = fMaxage; ++ if ((oldcnt = fCount) > fMininQ) { ++ ++ // Prepare to scan down the queue. ++ if ((pp = fFirst)) { ++ p = pp->fNext; ++ } else { p = 0; } ++ ++ // Find the first object that's been idle for too long ++ while(p && (p->fQTime >= fCurage)) { pp = p; p = p->fNext;} ++ ++ // Now delete half of the idle objects. The object queue element must be ++ // part of the actual object being deleted for this to properly work. ++ if (pp) { ++ while (p) { ++ pp->fNext = p->fNext; ++ delete p->fItem; ++ fCount--; ++ p = ((pp = pp->fNext) ? pp->fNext : 0); ++ } ++ } ++ } ++ ++ // Increase the age and unlock the queue ++ fCurage++; ++ fQMutex.UnLock(); ++ ++ // Trace as needed ++ if (fTraceON && fTrace->Tracing(fTraceON)) ++ {fTrace->Beg(fTraceID); ++ cerr <End(); ++ } ++ ++ // Reschedule ourselves if we must do so ++ if (agemax > 0) ++ fSched->Schedule((XrdJob *)this, agemax+time(0)); ++} ++ + +Egenskapsändringar för: proof/proofd/src/XpdObject.cxx +___________________________________________________________________ +Added: svn:eol-style +## -0,0 +1 ## ++LF +\ No newline at end of property +Added: svn:keywords +## -0,0 +1 ## ++Id +\ No newline at end of property +Index: proof/proofd/src/XrdProofdProtocol.cxx +=================================================================== +--- proof/proofd/src/XrdProofdProtocol.cxx (revision 48830) ++++ proof/proofd/src/XrdProofdProtocol.cxx (revision 48831) +@@ -29,6 +29,7 @@ + + #include "XrdVersion.hh" + #include "Xrd/XrdBuffer.hh" ++#include "Xrd/XrdScheduler.hh" + + #include "XrdProofdClient.h" + #include "XrdProofdClientMgr.h" +@@ -54,8 +55,7 @@ + // + // Static area: general protocol managing section + int XrdProofdProtocol::fgCount = 0; +-XrdObjectQ +- XrdProofdProtocol::fgProtStack("ProtStack", ++XpdObjectQ XrdProofdProtocol::fgProtStack("ProtStack", + "xproofd protocol anchor"); + XrdSysRecMutex XrdProofdProtocol::fgBMutex; // Buffer management mutex + XrdBuffManager *XrdProofdProtocol::fgBPool = 0; +@@ -542,8 +542,12 @@ + // Schedule protocol object cleanup; the maximum number of objects + // and the max age are taken from XrdXrootdProtocol: this may need + // some optimization in the future. ++#if 1 + fgProtStack.Set(pi->Sched, XrdProofdTrace, TRACE_MEM); + fgProtStack.Set((pi->ConnMax/3 ? pi->ConnMax/3 : 30), 60*60); ++#else ++ fgProtStack.Set(pi->Sched, 3600); ++#endif + + // Default tracing options: always trace logins and errors for all + // domains; if the '-d' option was specified on the command line then +@@ -789,6 +793,13 @@ + + // Push ourselves on the stack + fgProtStack.Push(&fProtLink); ++#if 0 ++ if(fgProtStack.Push(&fProtLink) != 0) { ++ XrdProofdProtocol *xp = fProtLink.objectItem(); ++ fProtLink.setItem(0); ++ delete xp; ++ } ++#endif + } + + //______________________________________________________________________________ +Index: proof/proofd/inc/XrdProofdProtocol.h +=================================================================== +--- proof/proofd/inc/XrdProofdProtocol.h (revision 48830) ++++ proof/proofd/inc/XrdProofdProtocol.h (revision 48831) +@@ -38,10 +38,10 @@ + #include "XpdSysPthread.h" + + #include "Xrd/XrdLink.hh" +-#include "Xrd/XrdObject.hh" + #include "Xrd/XrdProtocol.hh" + #include "XrdOuc/XrdOucString.hh" + #include "XrdSec/XrdSecInterface.hh" ++#include "XpdObject.h" + #include "XProofProtocol.h" + + class XrdBuffer; +@@ -131,7 +131,7 @@ + // + // Protocol variables + +- XrdObject fProtLink; ++ XpdObject fProtLink; + XrdBuffer *fArgp; + + XrdLink *fLink; +@@ -176,7 +176,7 @@ + // + static bool fgConfigDone; + static int fgCount; +- static XrdObjectQ fgProtStack; ++ static XpdObjectQ fgProtStack; + static XrdBuffManager *fgBPool; // Buffer manager + static int fgMaxBuffsz; // Maximum buffer size we can have + static XrdSysRecMutex fgBMutex; // Buffer management mutex +Index: proof/proofd/inc/XpdObject.h +=================================================================== +--- proof/proofd/inc/XpdObject.h (revision 0) ++++ proof/proofd/inc/XpdObject.h (revision 48831) +@@ -0,0 +1,100 @@ ++// @(#)root/proofd:$Id$ ++// Author: Gerardo Ganis Feb 2013 ++ ++/************************************************************************* ++ * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * ++ * All rights reserved. * ++ * * ++ * For the licensing terms see $ROOTSYS/LICENSE. * ++ * For the list of contributors see $ROOTSYS/README/CREDITS. * ++ *************************************************************************/ ++ ++////////////////////////////////////////////////////////////////////////// ++// // ++// XpdObject // ++// // ++// Authors: G. Ganis, CERN, 2013 // ++// // ++// Auxilliary class to stack protocols. // ++// Adapted version of XrdObject. // ++// // ++////////////////////////////////////////////////////////////////////////// ++ ++#ifndef ROOT_XpdObject ++#define ROOT_XpdObject ++ ++#include ++#include ++#include ++#include ++#include "Xrd/XrdJob.hh" ++#include "XrdOuc/XrdOucTrace.hh" ++#include "XrdSys/XrdSysPthread.hh" ++ ++class XpdObjectQ; ++class XrdProofdProtocol; ++class XrdScheduler; ++ ++class XpdObject { ++public: ++ friend class XpdObjectQ; ++ ++ // Item() supplies the item value associated with itself (used with Next()). ++ XrdProofdProtocol *objectItem() { return fItem; } ++ ++ // Next() supplies the next list node. ++ XpdObject *nextObject() { return fNext; } ++ ++ // Set the item pointer ++ void setItem(XrdProofdProtocol *ival) { fItem = ival; } ++ ++ XpdObject(XrdProofdProtocol *ival=0) { fNext = 0; fItem = ival; fQTime = 0; } ++ ~XpdObject() {} ++ ++private: ++ XpdObject *fNext; ++ XrdProofdProtocol *fItem; ++ time_t fQTime; // Only used for time-managed objects ++}; ++ ++/******************************************************************************/ ++/* x r d _ O b j e c t Q */ ++/******************************************************************************/ ++ ++// Note to properly cleanup this type of queue you must call Set() at least ++// once to cause the time element to be sceduled. ++ ++class XrdOucTrace; ++ ++class XpdObjectQ : public XrdJob { ++public: ++ ++ XrdProofdProtocol *Pop(); ++ void Push(XpdObject *Node); ++ void Set(int inQMax, time_t agemax=1800); ++ void Set(XrdScheduler *sp, XrdOucTrace *tp, int traceChk = 0) ++ {fSched = sp; fTrace = tp; fTraceON = traceChk;} ++ void DoIt(); ++ ++ XpdObjectQ(const char *id, const char *desc) : XrdJob(desc) ++ {fCurage = fCount = 0; fMaxage = 0; fTraceID = id; ++ fMaxinQ = 32; fMininQ = 16; fFirst = 0; } ++ ++ ~XpdObjectQ() {} ++ ++private: ++ ++ XrdSysMutex fQMutex; ++ XpdObject *fFirst; ++ int fCount; ++ int fCurage; ++ int fMininQ; ++ int fMaxinQ; ++ time_t fMaxage; ++ XrdOucTrace *fTrace; ++ XrdScheduler *fSched; ++ int fTraceON; ++ const char *fTraceID; ++}; ++ ++#endif + +Egenskapsändringar för: proof/proofd/inc/XpdObject.h +___________________________________________________________________ +Added: svn:keywords +## -0,0 +1 ## ++Id +\ No newline at end of property +Added: svn:eol-style +## -0,0 +1 ## ++LF +\ No newline at end of property +Index: proof/proofd/Module.mk +=================================================================== +--- proof/proofd/Module.mk (revision 48830) ++++ proof/proofd/Module.mk (revision 48831) +@@ -127,7 +127,11 @@ + ifeq ($(HASXRD),yes) + XPDINCEXTRA := $(XROOTDDIRI:%=-I%) + XPDINCEXTRA += $(PROOFDDIRI:%=-I%) ++ifeq ($(XRDINCPRIVATE),yes) ++XPDINCEXTRA += -I$(XRDINCDIR)/private ++endif + ++ + ifeq ($(HASXRDUTILS),no) + + XPDLIBEXTRA += $(XROOTDDIRL) -lXrdClient -lXrdNet -lXrdOuc \ +Index: proof/proofd/CMakeLists.txt +=================================================================== +--- proof/proofd/CMakeLists.txt (revision 48830) ++++ proof/proofd/CMakeLists.txt (revision 48831) +@@ -7,7 +7,7 @@ + ROOT_USE_PACKAGE(net/rpdutils) + ROOT_USE_PACKAGE(net/auth) + +-include_directories(${XROOTD_INCLUDE_DIR}) ++include_directories(${XROOTD_INCLUDE_DIR} ${XROOTD_PRIVATE_INCLUDE_DIR}) + add_definitions(${XROOTD_CFLAGS}) + + if(WIN32) +Index: proof/proofx/Module.mk +=================================================================== +--- proof/proofx/Module.mk (revision 48830) ++++ proof/proofx/Module.mk (revision 48831) +@@ -63,6 +63,9 @@ + PROOFXINCEXTRA := $(PROOFXDIRI:%=-I%) + PROOFXINCEXTRA += $(XROOTDDIRI:%=-I%) + PROOFXINCEXTRA += $(PROOFDDIRI:%=-I%) ++ifeq ($(XRDINCPRIVATE),yes) ++PROOFXINCEXTRA += -I$(XRDINCDIR)/private ++endif + + # Xrootd client libs + ifeq ($(PLATFORM),win32) +Index: proof/proofx/CMakeLists.txt +=================================================================== +--- proof/proofx/CMakeLists.txt (revision 48830) ++++ proof/proofx/CMakeLists.txt (revision 48831) +@@ -16,7 +16,7 @@ + ROOT_GLOB_SOURCES(sources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cxx) + endif() + +-include_directories(${XROOTD_INCLUDE_DIR}) ++include_directories(${XROOTD_INCLUDE_DIR} ${XROOTD_PRIVATE_INCLUDE_DIR}) + link_directories(${XROOTD_LIBRARY_DIR}) + add_definitions(${XROOTD_CFLAGS}) + +Index: net/netx/Module.mk +=================================================================== +--- net/netx/Module.mk (revision 48830) ++++ net/netx/Module.mk (revision 48831) +@@ -55,6 +55,9 @@ + ifneq ($(EXTRA_XRDFLAGS),) + NETXINCEXTRA += -I$(ROOT_SRCDIR)/proof/proofd/inc + endif ++ifeq ($(XRDINCPRIVATE),yes) ++NETXINCEXTRA += -I$(XRDINCDIR)/private ++endif + + # Xrootd client libs + ifeq ($(PLATFORM),win32) +Index: net/netx/CMakeLists.txt +=================================================================== +--- net/netx/CMakeLists.txt (revision 48830) ++++ net/netx/CMakeLists.txt (revision 48831) +@@ -6,7 +6,7 @@ + ROOT_USE_PACKAGE(net/net) + ROOT_USE_PACKAGE(proof/proofd) + +-include_directories(${XROOTD_INCLUDE_DIR}) ++include_directories(${XROOTD_INCLUDE_DIR} ${XROOTD_PRIVATE_INCLUDE_DIR}) + add_definitions(${XROOTD_CFLAGS}) + #--------------------------------------------------------------------------- + +Index: config/Makefile.in +=================================================================== +--- config/Makefile.in (revision 48830) ++++ config/Makefile.in (revision 48831) +@@ -255,6 +255,7 @@ + EXTRA_XRDFLAGS := @extraxrdflags@ + XRDVERSION := @xrdversion@ + HASXRDUTILS := @hasxrdutils@ ++XRDINCPRIVATE := @xrdincprivate@ + + SRPLIBDIR := @srplibdir@ + SRPLIB := @srplib@ diff --git a/root-tclass-fix.patch b/root-tclass-fix.patch deleted file mode 100644 index 98c11bf..0000000 --- a/root-tclass-fix.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- v5-34-00-patches/core/meta/src/TClass.cxx 2012/08/24 14:30:19 45695 -+++ v5-34-00-patches/core/meta/src/TClass.cxx 2012/10/05 21:03:30 46365 -@@ -2544,7 +2544,10 @@ - if (objType) { - const char *typdfName = objType->GetTypeName(); - if (typdfName && strcmp(typdfName, name)) { -- cl = TClass::GetClass(typdfName, load); -+ TString alternateName(typdfName); -+ // TClass::GetClass might get call GetTypeName and thus -+ // re-use the static storage use by GetTypeName! -+ cl = TClass::GetClass(alternateName, load); - return cl; - } - } -@@ -3206,9 +3209,6 @@ - fRealData->Delete(); - delete fRealData; fRealData=0; - -- if (fStreamerInfo) -- fStreamerInfo->Delete(); -- delete fStreamerInfo; fStreamerInfo=0; - } - } - diff --git a/root.spec b/root.spec index 521b261..766711b 100644 --- a/root.spec +++ b/root.spec @@ -26,9 +26,9 @@ %endif Name: root -Version: 5.34.02 +Version: 5.34.05 %global libversion %(cut -d. -f 1-2 <<< %{version}) -Release: 3%{?dist} +Release: 1%{?dist} Summary: Numerical data analysis framework Group: Applications/Engineering @@ -55,19 +55,22 @@ Patch0: %{name}-ftgl.patch Patch1: %{name}-fontconfig.patch # Use system unuran: Patch2: %{name}-unuran.patch -# Fixes for xrootd bonjour +# Remove broken xrootd test: Patch3: %{name}-xrootd.patch -# Fix hardcoded include path +# Fix hardcoded include path: # https://savannah.cern.ch/bugs/index.php?91463 Patch4: %{name}-meta.patch -# Fixes for latest glibc headers -Patch5: %{name}-glibc.patch -# Missing Include -Patch6: %{name}-gfal-bits.patch -# Backport meta fixes -Patch7: %{name}-tclass-fix.patch -# Revert THtml change -Patch8: %{name}-thtml-revert.patch +# Missing include path: +Patch5: %{name}-gfal-bits.patch +# Revert THtml change: +Patch6: %{name}-thtml-revert.patch +# Don't save in all image formats: +Patch7: %{name}-no-extra-formats.patch +# Graphviz libgraph deprecated: +Patch8: %%{name}-gviz.patch +# Backport xrootd 3.3 support: +Patch9: %{name}-rev48681.patch +Patch10: %{name}-rev48831.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # The build segfaults on ppc64 during an invocation of cint: # https://savannah.cern.ch/bugs/index.php?70542 @@ -113,9 +116,6 @@ BuildRequires: python26-devel %endif %if %{?fedora}%{!?fedora:0} >= 9 || %{?rhel}%{!?rhel:0} >= 6 BuildRequires: qt4-devel -%if %{?fedora}%{!?fedora:0} >= 14 -BuildRequires: qt4-webkit-devel -%endif %endif BuildRequires: ruby BuildRequires: ruby-devel @@ -127,7 +127,8 @@ BuildRequires: libtool-ltdl-devel BuildRequires: desktop-file-utils BuildRequires: dcap-devel BuildRequires: dpm-devel -BuildRequires: xrootd-devel +BuildRequires: xrootd-client-devel +BuildRequires: xrootd-private-devel BuildRequires: cfitsio-devel BuildRequires: gfal-devel BuildRequires: srm-ifce-devel @@ -148,6 +149,22 @@ BuildRequires: liberation-fonts %endif # This contains a Symbol font that can be used by fontconfig BuildRequires: urw-fonts +%if %{?fedora}%{!?fedora:0} >= 11 || %{?rhel}%{!?rhel:0} >= 6 +BuildRequires: font(droidsansfallback) +%endif +%if %{?fedora}%{!?fedora:0} >= 18 || %{?rhel}%{!?rhel:0} >= 7 +BuildRequires: font(stix) +%else +%if %{?fedora}%{!?fedora:0} >= 14 +BuildRequires: font(stixgeneral) +BuildRequires: font(stixsizeonesym) +%else +%if %{?fedora}%{!?fedora:0} >= 11 || %{?rhel}%{!?rhel:0} >= 6 +BuildRequires: font(stixgeneral) +BuildRequires: font(stixsize1) +%endif +%endif +%endif Requires: hicolor-icon-theme %description @@ -227,6 +244,22 @@ Requires: liberation-fonts %endif # This contains a Symbol font that can be used by fontconfig Requires: urw-fonts +%if %{?fedora}%{!?fedora:0} >= 11 || %{?rhel}%{!?rhel:0} >= 6 +Requires: font(droidsansfallback) +%endif +%if %{?fedora}%{!?fedora:0} >= 18 || %{?rhel}%{!?rhel:0} >= 7 +Requires: font(stix) +%else +%if %{?fedora}%{!?fedora:0} >= 14 +Requires: font(stixgeneral) +Requires: font(stixsizeonesym) +%else +%if %{?fedora}%{!?fedora:0} >= 11 || %{?rhel}%{!?rhel:0} >= 6 +Requires: font(stixgeneral) +Requires: font(stixsize1) +%endif +%endif +%endif %description core This package contains the core libraries used by ROOT: libCore, libNew, @@ -1033,6 +1066,8 @@ fi %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p0 +%patch10 -p0 find . '(' -name '*.cxx' -o -name '*.cpp' -o -name '*.C' -o -name '*.c' -o \ -name '*.h' -o -name '*.hh' -o -name '*.hi' -o -name '*.py' -o \ @@ -1107,7 +1142,8 @@ sed s/c1/c1simp/g -i tutorials/hsimple.C %if "%{?rhel}" == "5" # Build PyROOT for python 2.6 cp -pr bindings/pyroot bindings/pyroot26 -sed 's/python /python26 /' -i bindings/pyroot26/Module.mk +sed -e 's/= pyroot/= pyroot26/' -e 's/python /python26 /' \ + -i bindings/pyroot26/Module.mk %endif %build @@ -1138,10 +1174,10 @@ unset QTINC --enable-fftw3 \ --enable-fitsio \ --enable-gdml \ + --enable-genvector \ --enable-gfal \ --with-gfal-incdir=%{_includedir} \ --with-gfal-libdir=%{_libdir} \ - --enable-genvector \ --enable-globus \ --enable-gsl-shared \ --enable-gviz \ @@ -1315,6 +1351,7 @@ rm ${RPM_BUILD_ROOT}%{_datadir}/%{name}/svninfo.txt %if %{?fedora}%{!?fedora:0} < 13 && %{?rhel}%{!?rhel:0} < 6 rm ${RPM_BUILD_ROOT}%{_libdir}/%{name}/libAfterImage.a %endif +rm ${RPM_BUILD_ROOT}%{_libdir}/%{name}/libmathtext.a rm ${RPM_BUILD_ROOT}%{_bindir}/setxrd* rm ${RPM_BUILD_ROOT}%{_bindir}/thisroot* rm ${RPM_BUILD_ROOT}%{_mandir}/man1/cint.1 @@ -1345,6 +1382,7 @@ rm ${RPM_BUILD_ROOT}%{_datadir}/%{name}/macros/fileopen.C pushd ${RPM_BUILD_ROOT}%{_datadir}/%{name}/plugins rm TAFS/P010_TAFS.C rm TDataProgressDialog/P010_TDataProgressDialog.C +rm TDataSetManager/P020_TDataSetManagerAliEn.C rm TFile/P030_TCastorFile.C rm TFile/P060_TChirpFile.C rm TFile/P070_TAlienFile.C @@ -1403,6 +1441,7 @@ cat includelist-geom-geom* > includelist-geom cat includelist-roofit-roo* > includelist-roofit cat includelist-gui-qt* > includelist-gui-qt cat includelist-graf2d-x11ttf >> includelist-graf2d-x11 +cat includelist-graf2d-mathtext >> includelist-graf2d-x11 cat includelist-gui-guihtml >> includelist-gui-gui cat includelist-io-xmlparser >> includelist-io-xml cat includelist-proof-proofplayer >> includelist-proof-proof @@ -1781,9 +1820,11 @@ fi %{_bindir}/proofserv %{_bindir}/proofserv.exe %{_bindir}/xproofd +%{_bindir}/xpdtest %{_mandir}/man1/proofd.1* %{_mandir}/man1/proofserv.1* %{_mandir}/man1/xproofd.1* +%{_mandir}/man1/xpdtest.1* %{_initrddir}/proofd %files rootd @@ -2287,6 +2328,12 @@ fi %{emacs_lispdir}/root/*.el %changelog +* Wed Feb 27 2013 Mattias Ellert - 5.34.05-1 +- Update to 5.34.05 +- Rebuild for xrootd 3.3 +- Patch for latest graphviz (libcgraph) +- Drop patches root-glibc.patch and root-tclass-fix.patch + * Thu Feb 14 2013 Fedora Release Engineering - 5.34.02-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild diff --git a/sources b/sources index 49f0898..b0b813c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cf47c9e9f2b0b6b77eb2ded0f6acba94 root-5.34.02.tar.gz +0dd415d539f5bb8ec21c9f49b2f9c5fd root-5.34.05.tar.gz