--- libphp-jpgraph-1.5.2.orig/debian/changelog +++ libphp-jpgraph-1.5.2/debian/changelog @@ -0,0 +1,135 @@ +libphp-jpgraph (1.5.2-13.1) unstable; urgency=medium + + * Non maintainer upload by the Reproducible Builds team. + * No source change upload to rebuild on buildd with .buildinfo files. + + -- Holger Levsen Sun, 03 Jan 2021 14:24:48 +0100 + +libphp-jpgraph (1.5.2-13) unstable; urgency=medium + + * Fix deprecated split,ereg,&new to support php7 (Closes: #821526) + * Add dependency to fonts-arkpandora and fix demos accordingly + + -- Christian Bayle Tue, 25 Oct 2016 00:08:00 +0200 + +libphp-jpgraph (1.5.2-12.1) unstable; urgency=low + + * Non-maintainer upload. + * debian/control: + - Drop ttf-mscorefonts-installer from dependencies. (Closes: #691933) + - Depends on fonts-liberation instead of dummy ttf-liberation + transitional package. + * src/jpgraph_dir.php: adjust to fonts-liberation path. + + -- David Prévot Tue, 13 Nov 2012 19:29:03 -0400 + +libphp-jpgraph (1.5.2-12) unstable; urgency=low + + * Add support for free LIBERATION fonts + and depends on ttf-liberation (Thanks to Alain Peyrat) or non free + alternate ttf-mscorefonts-installer (Closes: #490037) + * Claim support for php5 and remove php4 depends in control + file (Closes: #524172) + * Changed section from web to php + + -- Christian Bayle Sun, 26 Apr 2009 23:46:16 +0200 + +libphp-jpgraph (1.5.2-11+u1) unstable; urgency=low + + * Non-maintainer upload. + * Applied patch that prevented PHP5 compile time generated warning + "Non-static method called statically" to appear on screen and corrupts + the output of graphics. The usual error_reporting and display_errors + had no effect as a custom error handler was installed by the library. + Closes: #436289 + + -- Christian Hammers Sat, 10 Jan 2009 00:10:30 +0100 + +libphp-jpgraph (1.5.2-11) unstable; urgency=low + + * Added support for php5(-gd), reviewed all example that seems to work + (Closes: #424795) affected by php4-removal + + -- Christian Bayle Wed, 23 May 2007 01:24:50 +0200 + +libphp-jpgraph (1.5.2-10.1) unstable; urgency=low + + * Non-Maintainer upload with maintainer consent. + + * Apply patch to make $gd2 global really global (Closes: #354637). + + * Bring out-of-sync debhelper version in sync to level 5. + * Install upstream Changelog. + * Update FSF address in debian/copyright. + * Checked for policy version 3.7.2. + + -- Thijs Kinkhorst Wed, 5 Jul 2006 16:51:18 +0200 + +libphp-jpgraph (1.5.2-10) unstable; urgency=low + + * msttcorefonts dir changed (in package msttcorefonts) + from /usr/share/fonts/truetype/ to /usr/share/fonts/truetype/msttcorefonts/ + (Closes: #275281) + + -- Christian Bayle Thu, 7 Oct 2004 21:24:42 +0200 + +libphp-jpgraph (1.5.2-9) unstable; urgency=low + + * Applied a patch proposed by Guillaume Smet that add a fake + SetMargin method and a doing nothing ExplodeSlice method, to make this + make work better with gforge package. + * Finnaly commented the fake SetMargin + + -- Christian Bayle Mon, 13 Sep 2004 22:34:42 +0200 + +libphp-jpgraph (1.5.2-8) unstable; urgency=low + + * Changed dependancy on php4-gd2 with php4-gd (Closes: #257999) + * I explain in copyright file why I don't upgrade to new QPLed + non + commercial use clause upstream version, this is not DFSG compliant (Closes: #258104) + + -- Christian Bayle Wed, 1 Sep 2004 22:58:59 +0200 + +libphp-jpgraph (1.5.2-7) unstable; urgency=low + + * Added alternate depend on libapache2-mod-php4 to support apache2 + (closes bug#255315) + + -- Christian Bayle Fri, 25 Jun 2004 09:52:29 +0200 + +libphp-jpgraph (1.5.2-6) stable; urgency=low + + * Woody backport + + -- Christian Bayle Thu, 15 Apr 2004 11:22:26 +0200 + +libphp-jpgraph (1.5.2-5) unstable; urgency=low + + * Changed dependancy on php4-gd for php4-gd2 + * Changed density in jpgraph_gantt.php as suggested by Joseph Miller (joff) + + -- Christian Bayle Thu, 15 Apr 2004 11:20:58 +0200 + +libphp-jpgraph (1.5.2-4) stable; urgency=low + + * Woody backport + + -- Christian Bayle Sat, 27 Mar 2004 17:45:25 +0100 + +libphp-jpgraph (1.5.2-3) unstable; urgency=low + + * New First upload (closes #173601) ITP + * This package was released by Luis Bustamante + * Luis who allowed me to upload the package will maintain the package + when he will have more time to work on it. + * For some licensing reason it was probably rejected + * This is the packaging of and older GPLed release + * I changed cache and ttf path in ./src/jpgraph_dir.php + * I disabled caching in ./src/jpgraph.php + * I corrected imagefilledelipse broken function + * I corrected path in examples + * I corrected font names + * I added gantt->SetMargin function needed by gforge package + + -- Christian Bayle Thu, 19 Feb 2004 23:50:14 +0100 + --- libphp-jpgraph-1.5.2.orig/debian/compat +++ libphp-jpgraph-1.5.2/debian/compat @@ -0,0 +1 @@ +5 --- libphp-jpgraph-1.5.2.orig/debian/control +++ libphp-jpgraph-1.5.2/debian/control @@ -0,0 +1,33 @@ +Source: libphp-jpgraph +Section: php +Priority: optional +Maintainer: Christian Bayle +Build-Depends: debhelper (>= 5) +Standards-Version: 3.8.1.0 + +Package: libphp-jpgraph +Architecture: all +Depends: ${misc:Depends}, libapache2-mod-php | php | php-cgi, php-gd, fonts-liberation, fonts-arkpandora +Description: Object oriented graph library for php + JpGraph is an object oriented class library for php. JpGraph makes + it easy to draw both "quick and dirty" graphs with a minimum of code + and complex professional graphs which requires a very fine grain + control. JpGraph is equally well suited for both scientific and + business type of graphs. Though claimed as non php works perfectly + for all samples with php. This is the last GPLed version, + more recent version are non DFSG complianti (See copyright file). + +Package: libphp-jpgraph-examples +Architecture: all +Depends: ${misc:Depends}, libphp-jpgraph +Description: Object oriented graph library for php (examples) + JpGraph is an object oriented class library for php. JpGraph makes + it easy to draw both "quick and dirty" graphs with a minimum of code + and complex professional graphs which requires a very fine grain + control. JpGraph is equally well suited for both scientific and + business type of graphs. Though claimed as non php works perfectly + for all samples with php. This is the last GPLed version, + more recent version are non DFSG complianti (See copyright file). + . + This package contains examples for using JpGraph library. + --- libphp-jpgraph-1.5.2.orig/debian/copyright +++ libphp-jpgraph-1.5.2/debian/copyright @@ -0,0 +1,37 @@ +This package was debianized by Luis Bustamante on +Thu, 19 Dec 2002 13:48:02 -0500. +For licensing reasons only GPLed 1.5.2 is now packaged by Christian Bayle + + +To be clear for those that would ask why I don't upload the new 1.17 QPLed +version. You can read on the home page: + +"JpGraph is released under a dual license. QPL 1.0 (Qt Free Licensee) For +non-commercial, open-source and educational use and JpGraph Professional +License for commercial use." +This is not compliant with DFSG #6 +"The license must not restrict anyone from making use of the program in a +specific field of endeavor. For example, it may not restrict the program from +being used in a business, or from being used for genetic research." + +It was downloaded from: +http://www.aditus.nu/jpgraph/downloads/jpgraph-1.5.2.tar.gz + +Upstream Author: Johan Persson +Copyright (C) 2001 Johan Persson + +Copyright: + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License with + the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL-2; + if not, write to the Free Software Foundation, Inc., 51 Franklin Street, + Fifth Floor, Boston, MA 02110-1301, USA --- libphp-jpgraph-1.5.2.orig/debian/install +++ libphp-jpgraph-1.5.2/debian/install @@ -0,0 +1 @@ +src/*.php /usr/share/jpgraph --- libphp-jpgraph-1.5.2.orig/debian/libphp-jpgraph.dirs +++ libphp-jpgraph-1.5.2/debian/libphp-jpgraph.dirs @@ -0,0 +1,3 @@ +usr/share/jpgraph/ +var/cache/jpgraph/ + --- libphp-jpgraph-1.5.2.orig/debian/libphp-jpgraph.docs +++ libphp-jpgraph-1.5.2/debian/libphp-jpgraph.docs @@ -0,0 +1 @@ +README --- libphp-jpgraph-1.5.2.orig/debian/rules +++ libphp-jpgraph-1.5.2/debian/rules @@ -0,0 +1,39 @@ +#!/usr/bin/make -f +# rules for libphp-jpgraph package +# by Luis Bustamante (luferbu@fluidsignal.com) + +build: + +clean: + dh_testdir + dh_testroot + dh_prep + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + dh_install + +build-arch: build + +build-indep: build + +binary: binary-indep + +binary-arch: install + +binary-indep: install + dh_testdir + dh_testroot + dh_installdocs + dh_installexamples -plibphp-jpgraph-examples src/Examples/* + chmod 644 $(CURDIR)/debian/libphp-jpgraph-examples/usr/share/doc/libphp-jpgraph-examples/examples/* + dh_installchangelogs src/Changelog + dh_compress + dh_gencontrol + dh_md5sums + dh_builddeb + --- libphp-jpgraph-1.5.2.orig/src/Examples/backgroundex01.php +++ libphp-jpgraph-1.5.2/src/Examples/backgroundex01.php @@ -1,6 +1,6 @@ + --- libphp-jpgraph-1.5.2.orig/src/Examples/show-image.php +++ libphp-jpgraph-1.5.2/src/Examples/show-image.php @@ -1,4 +1,4 @@ - + --- libphp-jpgraph-1.5.2.orig/src/Examples/show-source.php +++ libphp-jpgraph-1.5.2/src/Examples/show-source.php @@ -1 +1 @@ - + --- libphp-jpgraph-1.5.2.orig/src/Examples/spiderex1.php +++ libphp-jpgraph-1.5.2/src/Examples/spiderex1.php @@ -1,6 +1,6 @@ SetColor("white"); --- libphp-jpgraph-1.5.2.orig/src/Examples/spiderlogex1.php +++ libphp-jpgraph-1.5.2/src/Examples/spiderlogex1.php @@ -1,7 +1,7 @@ Test suit done."; /* EOF */ -?> \ No newline at end of file +?> --- libphp-jpgraph-1.5.2.orig/src/Examples/text-example1.php +++ libphp-jpgraph-1.5.2/src/Examples/text-example1.php @@ -1,6 +1,6 @@ General PHP error:
".$GLOBALS['php_errormsg']); + // Disabled by Debian to prevent showing PHP5 warnings + // ("Non-static method called statically") + // JpGraphError::Raise("General PHP error:
".$GLOBALS['php_errormsg']); } // // Check what version of the GD library is being used // if(function_exists('imagecopyresampled') ) { - $gd2 = true; + $GLOBALS['gd2'] = true; $copyfunc = "imagecopyresampled"; } elseif(function_exists('imagecopyresized')) { $copyfunc = "imagecopyresized"; - $gd2 = false; + $GLOBALS['gd2'] = false; } else { JpGraphError::Raise("JpGraph Error: Your PHP installation does not @@ -280,10 +285,10 @@ $img_format="gif"; elseif( $supported & IMG_JPG ) $img_format="jpeg"; - if( !isset($HTTP_SERVER_VARS['PHP_SELF']) ) + if( !isset($_SERVER['PHP_SELF']) ) JpGraphError::Raise("JpGraph Error: Can't access PHP_SELF, PHP global variable. You can't run PHP from command line if you want to use the 'auto' naming of cache or image files."); - $fname=basename($HTTP_SERVER_VARS['PHP_SELF']); + $fname=basename($_SERVER['PHP_SELF']); // Replace the ".php" extension with the image format extension return substr($fname,0,strlen($fname)-4).".".$img_format; } @@ -426,6 +431,11 @@ //--------------- // PUBLIC METHODS + // OW : fake method to have reporting working + //function SetMargin($x1, $x2, $x3, $x4) { + // return true; + //} + // Should the grid be in front or back of the plot? function SetGridDepth($aDepth) { $this->grid_depth=$aDepth; @@ -490,6 +500,8 @@ // Specify a background image function SetBackgroundImage($aFileName,$aBgType=BKIMG_FILLPLOT,$aImgFormat="png") { +/* CB Not any more bugging + if( $GLOBALS["gd2"] && !USE_TRUECOLOR ) { JpGraphError::Raise("JpGraph Error:You are using GD 2.x and are trying to use a background images on a non truecolor image.
@@ -500,6 +512,7 @@ using any truetype fonts with truecolor images will result in very poor quality fonts."); } +*/ $this->background_image = $aFileName; $this->background_image_type=$aBgType; @@ -1064,6 +1077,10 @@ $this->img->Rectangle(0,0,$this->img->width-1,$this->img->height-1); } } + // Set Margin by Christian Bayle + function SetMargin($lm,$rm,$tm,$bm) { + $this->img->SetMargin($lm,$rm,$tm,$bm); + } } // Class @@ -1078,13 +1095,14 @@ function TTF() { // Base file names for available fonts $this->font_fam=array( - FF_COURIER => TTF_DIR."courier", - FF_VERDANA => TTF_DIR."verdana", - FF_TIMES => TTF_DIR."times", - FF_HANDWRT => TTF_DIR."handwriting", - FF_COMIC => TTF_DIR."comic", - FF_ARIAL => TTF_DIR."arial", - FF_BOOK => TTF_DIR."bookant"); + FF_COURIER => TTF_DIR."Courier_New", + FF_VERDANA => TTF_DIR."Veranda", + FF_TIMES => TTF_DIR."Times", + FF_HANDWRT => TTF_DIR."Handwriting", + FF_COMIC => TTF_DIR."Comic", + FF_ARIAL => TTF_DIR."Aerial", + FF_BOOK => TTF_DIR."Bookant", + FF_LIBERATION_SANS => LIBERATION_DIR."LiberationSans-Regular"); } //--------------- @@ -1096,11 +1114,11 @@ switch( $style ) { case FS_NORMAL: break; - case FS_BOLD: $f .= "bd"; + case FS_BOLD: $f .= "Bd"; break; - case FS_ITALIC: $f .= "i"; + case FS_ITALIC: $f .= "It"; break; - case FS_BOLDIT: $f .= "bi"; + case FS_BOLDIT: $f .= "BdIt"; break; default: JpGraphError::Raise("JpGraph Error: Unknown TTF Style."); @@ -3010,7 +3028,7 @@ // Get the specific height for a text string function GetTextHeight($txt="",$angle=0) { // Builtin font? - $tmp = split("\n",$txt); + $tmp = explode("\n",$txt); $n = count($tmp); $m=0; for($i=0; $iGetTextHeight($tmp[0],$angle); } @@ -3043,7 +3061,7 @@ // Get actual width of text in absolute pixels function GetTextWidth($txt,$angle=0) { // Builtin font? - $tmp = split("\n",$txt); + $tmp = explode("\n",$txt); $n = count($tmp); $m=0; for($i=0; $iimg,$this->font_family,$x,$y,$txt,$this->current_color); else { - if (ereg("\n",$txt)) { - $tmp = split("\n",$txt); + if (preg_match("/\n/",$txt)) { + $tmp = explode("\n",$txt); for($i=0; $iGetTextWidth($tmp[$i]); if( $paragraph_align=="left" ) { @@ -3183,7 +3201,7 @@ } } } - elseif($this->font_family >= FF_COURIER && $this->font_family <= FF_BOOK) { // TTF font + elseif($this->font_family >= FF_COURIER && $this->font_family <= FF_LIBERATION_SANS) { // TTF font $file = $this->ttf->File($this->font_family,$this->font_style); $angle=$dir; $bbox=ImageTTFBBox($this->font_size,$angle,$file,$txt); @@ -3208,7 +3226,7 @@ } } else - JpGraphError::Raise("JpGraph Error: Unknown font font family specification. "); + JpGraphError::Raise("JpGraph Error: Unknown font family specification: ". $this->font_family); } function SetMargin($lm,$rm,$tm,$bm) { @@ -3490,7 +3508,16 @@ } function FilledCircle($xc,$yc,$r) { - imagefilledellipse($this->img,$xc,$yc,2*$r,2*$r,$this->current_color); + if( $GLOBALS['gd2'] ) { + imagefilledellipse($this->img,$xc,$yc,2*$r,2*$r,$this->current_color); + } + else { + for( $i=1; $i < 2*$r; $i += 2 ) { + $this->Arc($xc,$yc,$i,$i,0,360); + $this->Arc($xc,$yc,$i+1,$i,0,360); + $this->Arc($xc,$yc,$i+1,$i+1,0,360); + } + } } // Linear Color InterPolation @@ -3983,19 +4010,19 @@ } // Check if we should stroke the image to an arbitrary file - if( $aStrokeFileName!="" ) { - if( $aStrokeFileName == "auto" ) - $aStrokeFileName = GenImgName(); - if( file_exists($aStrokeFileName) ) { - // Delete the old file - if( !@unlink($aStrokeFileName) ) - JpGraphError::Raise("JpGraph Error: Can't delete cached image $aStrokeFileName. Permission problem?"); + if( $aStrokeFileName!="" && USE_CACHE) { + if( $astrokefilename == "auto" ) + $astrokefilename = genimgname(); + if( file_exists($astrokefilename) ) { + // delete the old file + if( !@unlink($astrokefilename) ) + jpgrapherror::raise("jpgraph error: can't xxxx delete cached image $astrokefilename. permission problem?"); } - $aImage->Stream($aStrokeFileName); + $aimage->stream($astrokefilename); return; } - if( $aCacheFileName != "" && USE_CACHE) { + if( $acachefilename != "" && USE_CACHE ) { $aCacheFileName = $this->cache_dir . $aCacheFileName; if( file_exists($aCacheFileName) ) { @@ -4010,7 +4037,7 @@ return; } if( !@unlink($aCacheFileName) ) - JpGraphError::Raise("JpGraph Error: Can't delete cached image $aStrokeFileName. Permission problem?"); + JpGraphError::Raise("JpGraph Error: ZZZZ Can't delete cached image $aStrokeFileName. Permission problem?"); $aImage->Stream($aCacheFileName); } else { --- libphp-jpgraph-1.5.2.orig/src/jpgraph_dir.php +++ libphp-jpgraph-1.5.2/src/jpgraph_dir.php @@ -16,7 +16,7 @@ //------------------------------------------------------------------ // The full absolute name of directory to be used as a cache. This directory MUST // be readable and writable for PHP. Must end with '/' -DEFINE("CACHE_DIR","/tmp/jpgraph_cache/"); +DEFINE("CACHE_DIR","/var/cache/jpgraph/"); // The URL relative name where the cache can be found, i.e // under what HTTP directory can the cache be found. Normally @@ -25,6 +25,9 @@ DEFINE("APACHE_CACHE_DIR","/jpgraph_cache/"); // Directory for TTF fonts. Must end with '/' -DEFINE("TTF_DIR","/usr/local/fonts/ttf/"); +DEFINE("TTF_DIR","/usr/share/fonts/truetype/arkpandora/"); + +// Add Free liberation font as suggested by Alain Peyrat +DEFINE("LIBERATION_DIR","/usr/share/fonts/truetype/liberation/"); ?> --- libphp-jpgraph-1.5.2.orig/src/jpgraph_gantt.php +++ libphp-jpgraph-1.5.2/src/jpgraph_gantt.php @@ -386,7 +386,7 @@ // width for each column. function GetWidth($aImg,$aUseTabs=false,$aTabExtraMargin=1.1) { if( strlen($this->iText)== 0 ) return; - $tmp = split("\t",$this->iText); + $tmp = explode("\t",$this->iText); $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); if( count($tmp) <= 1 || !$aUseTabs ) { return $aImg->GetTextWidth($this->iText); @@ -425,7 +425,7 @@ $aImg->StrokeText($aX,$aY,str_replace("\t"," ",$this->iText)); } else { - $tmp = split("\t",$this->iText); + $tmp = explode("\t",$this->iText); $n = min(count($tmp),count($aX)); for($i=0; $i<$n; ++$i) { $aImg->StrokeText($aX[$i],$aY,$tmp[$i]); @@ -1157,9 +1157,9 @@ $this->iCaptionMargin=$aMarg; } - function GetLineNbr() { - return 0; - } +// function GetLineNbr() { +// return 0; +// } function GetAbsHeight($aImg) { return 0; @@ -1189,7 +1189,7 @@ $this->iProgress = $aProg; } - function SetPattern($aPattern,$aColor="blue",$aDensity=98) { + function SetPattern($aPattern,$aColor="blue",$aDensity=100) { $this->iPattern = $aPattern; $this->iColor = $aColor; $this->iDensity = $aDensity; --- libphp-jpgraph-1.5.2.orig/src/jpgraph_pie3d.php +++ libphp-jpgraph-1.5.2/src/jpgraph_pie3d.php @@ -88,7 +88,7 @@ function ExplodeSlice($e) { - JpGraphError::Raise("JpGraph Error: Exploding slices are not (yet) implemented for 3d pies graphs."); + //JpGraphError::Raise("JpGraph Error: Exploding slices are not (yet) implemented for 3d pies graphs."); //$this->explode_slice=$e; } --- libphp-jpgraph-1.5.2.orig/src/jpgraph_spider.php +++ libphp-jpgraph-1.5.2/src/jpgraph_spider.php @@ -426,18 +426,18 @@ JpGraphError::Raise("Illegal scale for spiderplot ($axtype). Must be \"lin\" or \"log\""); } if( $axtype=="lin" ) { - $this->yscale = & new LinearScale(1,1); - $this->yscale->ticks = & new SpiderLinearTicks(); + $this->yscale = new LinearScale(1,1); + $this->yscale->ticks = new SpiderLinearTicks(); $this->yscale->ticks->SupressMinorTickMarks(); } elseif( $axtype=="log" ) { - $this->yscale = & new LogScale(1,1); - $this->yscale->ticks = & new SpiderLogTicks(); + $this->yscale = new LogScale(1,1); + $this->yscale->ticks = new SpiderLogTicks(); //JpGraphError::Raise("JpGraph Error: Logarithmic spider plots are not yet supported"); } - $this->axis = & new SpiderAxis($this->img,$this->yscale); - $this->grid = & new SpiderGrid(); + $this->axis = new SpiderAxis($this->img,$this->yscale); + $this->grid = new SpiderGrid(); } function SetPlotSize($s) { @@ -554,4 +554,4 @@ } // Class /* EOF */ -?> \ No newline at end of file +?>