From dannyman@arh0300.urh.uiuc.edu  Thu Mar 12 23:15:05 1998
Received: from arh0300.urh.uiuc.edu (arh0300.urh.uiuc.edu [130.126.72.10])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA07352;
          Thu, 12 Mar 1998 23:15:04 -0800 (PST)
          (envelope-from dannyman@arh0300.urh.uiuc.edu)
Received: (from dannyman@localhost)
	by arh0300.urh.uiuc.edu (8.8.8/8.8.5) id BAA17835;
	Fri, 13 Mar 1998 01:15:08 -0600 (CST)
Message-Id: <199803130715.BAA17835@arh0300.urh.uiuc.edu>
Date: Fri, 13 Mar 1998 01:15:08 -0600 (CST)
From: dannyman <dannyman@arh0300.urh.uiuc.edu>
Reply-To: dannyman@arh0300.urh.uiuc.edu
To: FreeBSD-gnats-submit@freebsd.org
Cc: chuckr@freebsd.org, jeff@cetlink.net
Subject: gnuplot doesn't support gif
X-Send-Pr-Version: 3.2

>Number:         5993
>Category:       ports
>Synopsis:       gnuplot doesn't support gif
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    chuckr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 12 23:20:01 PST 1998
>Closed-Date:    Sun Apr 19 16:22:43 PDT 1998
>Last-Modified:  Sun Apr 19 16:24:17 PDT 1998
>Originator:     dannyman
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
>Environment:
>Description:

	When compiling gnuplot out of ports, the configure bit will not detect the
gd library, which I have also installed from ports.  As a result, gnuplot is
built without gif support.

>How-To-Repeat:
>Fix:
	
	Dunno.  I tried to hack term.h to build the gd stuff anyway but it failed
with stuff like;
cc -o gnuplot alloc.o binary.o bitmap.o command.o contour.o datafile.o eval.o
fit.o graphics.o graph3d.o help.o hidden3d.o internal.o interpol.o matrix.o
misc.o parse.o plot.o plot2d.o plot3d.o readline.o scanner.o set.o show.o
specfun.o standard.o term.o time.o util.o  util3d.o version.o -L/usr/local/lib
-lpng -lz -lreadline -ltermcap -lm
term.o: Undefined symbol `_gdFontSmall' referenced from text segment
term.o: Undefined symbol `_gdFontSmall' referenced from text segment
term.o: Undefined symbol `_gdFontMediumBold' referenced from text segment
term.o: Undefined symbol `_gdFontLarge' referenced from text segment
term.o: Undefined symbol `_gdImageCreate' referenced from text segment
term.o: Undefined symbol `_gdImageColorAllocate' referenced from text segment
term.o: Undefined symbol `_gdImageColorTransparent' referenced from text
segment
term.o: Undefined symbol `_gdImageInterlace' referenced from text segment
term.o: Undefined symbol `_gdImageGif' referenced from text segment
term.o: Undefined symbol `_gdImageDestroy' referenced from text segment
term.o: Undefined symbol `_gdImageLine' referenced from text segment
term.o: Undefined symbol `_gdImageStringUp' referenced from text segment
term.o: Undefined symbol `_gdImageString' referenced from text segment
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.

* Possibly relevant lines from gnuplot/configure;

if test -n "$maybe_gddriver"
then
  echo $ac_n "checking for Tom Boutell's gd library""... $ac_c" 1>&6
  echo $ac_n "checking for -lgd""... $ac_c" 1>&6
ac_lib_var=`echo gd'_'gdImageCreate | tr './+\055' '__p_'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3344 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gdImageCreate();

int main() { return 0; }
int t() {
gdImageCreate()
; return 0; }
EOF
if { (eval echo configure:3356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; };
the
n
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_LIBGD 1
EOF
 TERMLIBS="$TERMLIBS -lgd"
    ac_save_CPPFLAGS="$CPPFLAGS"; CPPFLAGS="$CPPFLAGS -I$includedir"
    ac_safe=`echo "gd.h" | tr './\055' '___'`
echo $ac_n "checking for gd.h""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 3380 "configure"
#include "confdefs.h"
#include <gd.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
CPPFLAGS="$ac_save_CPPFLAGS"
      echo "configure: warning: please add path to `echo $ac_safe|sed
's/\_/\./'
` to INCLUDES in Makefile" 1>&2
    
fi

else
  echo "$ac_t""no" 1>&6
    echo "$ac_t""- see term/gif.trm for download details" 1>&6
  
fi
fi

* I have no idea about this stuff, or if it as an issue for gnuplot maintainer
* or gd. :(

Dan
>Release-Note:
>Audit-Trail:

From: Jeremy Lea <reg@shale.csir.co.za>
To: dannyman@arh0300.urh.uiuc.edu, FreeBSD-gnats-submit@FreeBSD.ORG
Cc: chuckr@FreeBSD.ORG, jeff@cetlink.net
Subject: Re: ports/5993: gnuplot doesn't support gif
Date: Fri, 13 Mar 1998 10:41:07 +0200

 Hi...
 
 On Fri, Mar 13, 1998 at 01:15:08AM -0600, dannyman wrote:
 > >Synopsis:       gnuplot doesn't support gif
 
 The following patch upgrades the port to beta340 and also enables both png
 and gif. I haven't tested this support extensively... Submitted this to the
 maintainer but looking back into my archives I noticed I did this at one
 point when I was using mutt compiled with "hidden host" support, so my
 return address was wrong. Could someone please remove that as a default from
 the mutt port... It bites people who don't realise it's there, and people
 who want it should know that they want to enable it.
 
  -Jeremy
 
 diff -ur gnuplot/Makefile gnuplot.340/Makefile
 --- gnuplot/Makefile	Mon Sep  1 09:41:23 1997
 +++ gnuplot.340/Makefile	Wed Dec  3 18:33:16 1997
 @@ -6,21 +6,24 @@
  # $Id: Makefile,v 1.13 1997/09/01 07:41:23 cwt Exp $
  #
  
 -DISTNAME=	gnuplot-beta336
 -PKGNAME=	gnuplot-336
 +DISTNAME=	gnuplot-beta340
 +PKGNAME=	gnuplot-340
  CATEGORIES=	math graphics
 -MASTER_SITES=	http://www.ipc.chiba-u.ac.jp/~yamaga/gnuplot%2B/3.6base/
 +MASTER_SITES=	ftp://cmpc1.phys.soton.ac.uk/pub/ \\
 +		http://science.nas.nasa.gov/~woo/gnuplot/beta/ \\
 +		http://www.ipc.chiba-u.ac.jp/~yamaga/gnuplot%2B/3.6base/
  
  MAINTAINER=	chuckr@FreeBSD.org
  
 -LIB_DEPENDS=	png\\.0\\.[7-9]:${PORTSDIR}/graphics/png
 +LIB_DEPENDS=	png\\.0\\.[7-9]:${PORTSDIR}/graphics/png \\
 +		gd:${PORTSDIR}/graphics/gd
  
  WRKSRC=		${WRKDIR}/gnuplot
  GNU_CONFIGURE=	yes
  CONFIGURE_ARGS=	--exec-prefix=${PREFIX} \
  		--includedir=${PREFIX}/include --libdir=${PREFIX}/lib \
  		--with-x --without-linux-vga \
 -		--with-gnu-readline --with-lasergnu --with-png 
 +		--with-gnu-readline --with-lasergnu
  
  MAN1=		gnuplot.1 lasergnu.1
  
 diff -ur gnuplot/files/md5 gnuplot.340/files/md5
 --- gnuplot/files/md5	Sat Jul 19 03:09:16 1997
 +++ gnuplot.340/files/md5	Wed Dec  3 17:58:56 1997
 @@ -1 +1 @@
 -MD5 (gnuplot-beta336.tar.gz) = ac848528127e8582b1803a28b938ba43
 +MD5 (gnuplot-beta340.tar.gz) = c9cd9f1bc66df570ff6471599d8bb6a5
 diff -ur gnuplot/patches/patch-aa gnuplot.340/patches/patch-aa
 --- gnuplot/patches/patch-aa	Mon Sep  1 09:43:11 1997
 +++ gnuplot.340/patches/patch-aa	Wed Dec  3 18:15:37 1997
 @@ -1,27 +1,11 @@
 ---- configure	Mon May 26 18:28:46 1997
 -+++ configure	Sun Aug 31 23:26:12 1997
 -@@ -1029,6 +1029,7 @@
 -   LASERGNU=lasergnu_noinstall
 - fi
 - 
 -+LASERGNU=lasergnu_install
 - 
 - maybe_linuxdriver=
 - # Check whether --with-linux-vga or --without-linux-vga was given.
 -@@ -3419,7 +3420,7 @@
 -   echo $ac_n "(cached) $ac_c" 1>&6
 - else
 -   ac_save_LIBS="$LIBS"
 --LIBS="-lpng -lz $LIBS"
 -+LIBS="-L$libdir -lpng -lz $LIBS"
 - cat > conftest.$ac_ext <<EOF
 - #line 3425 "configure"
 +--- configure.orig	Wed Dec  3 18:01:49 1997
 ++++ configure	Wed Dec  3 18:15:18 1997
 +@@ -3546,7 +3546,7 @@
 +   cat > conftest.$ac_ext <<EOF
 + #line 3547 "configure"
   #include "confdefs.h"
 -@@ -3450,6 +3451,7 @@
 - #define HAVE_LIBPNG 1
 +-#include <gd.h>
 ++#include <gd/gd.h>
   EOF
 -  TERMLIBS="$TERMLIBS -lpng -lz"
 -+ LDFLAGS="$LDFLAGS -L$libdir"
 -     ac_save_CPPFLAGS="$CPPFLAGS"; CPPFLAGS="$CPPFLAGS -I$includedir"
 -     for ac_hdr in png.h zlib.h
 - do
 + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 + { (eval echo configure:3552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 diff -ur gnuplot/patches/patch-ab gnuplot.340/patches/patch-ab
 --- gnuplot/patches/patch-ab	Sun Jan 12 22:07:29 1997
 +++ gnuplot.340/patches/patch-ab	Wed Dec  3 18:19:59 1997
 @@ -1,6 +1,6 @@
 ---- Makefile.in.orig	Sun Jan 12 13:32:41 1997
 -+++ Makefile.in	Sun Jan 12 13:34:53 1997
 -@@ -330,7 +330,7 @@
 +--- Makefile.in.orig	Wed Dec  3 17:58:59 1997
 ++++ Makefile.in	Wed Dec  3 18:00:49 1997
 +@@ -337,7 +337,7 @@
   	@LINUXSUID@
   
   lasergnu_install: lasergnu docs/lasergnu.1
 diff -ur gnuplot/patches/patch-ac gnuplot.340/patches/patch-ac
 --- gnuplot/patches/patch-ac	Tue Jul 22 04:38:29 1997
 +++ gnuplot.340/patches/patch-ac	Wed Dec  3 18:16:26 1997
 @@ -1,11 +1,17 @@
 ---- term/gif.trm.orig	Mon Jul 21 22:26:10 1997
 -+++ term/gif.trm	Mon Jul 21 22:26:43 1997
 -@@ -79,7 +79,7 @@
 +--- term/gif.trm.orig	Wed Dec  3 17:54:09 1997
 ++++ term/gif.trm	Wed Dec  3 17:57:36 1997
 +@@ -79,10 +79,10 @@
   TERM_PUBLIC int GIF_text_angle __PROTO((int ang));
   TERM_PUBLIC void GIF_reset __PROTO((void));
   
  -#include "gd.h"
 -+#include <gd/gd.h>
 - extern gdFontPtr gdFontSmall;  /* 6x12 */
 - extern gdFontPtr gdFontLarge;  /* 8x16 */
 - extern gdFontPtr gdFontMediumBold;  /* 7x13 */
 +-extern gdFontPtr gdFontSmall;  /* 6x12 */
 +-extern gdFontPtr gdFontLarge;  /* 8x16 */
 +-extern gdFontPtr gdFontMediumBold;  /* 7x13 */
 ++#include "gd/gd.h"
 ++#include "gd/gdfonts.h"  /* 6x12 */
 ++#include "gd/gdfontl.h"  /* 8x16 */
 ++#include "gd/gdfontmb.h" /* 7x13 */
 + 
 + 
 + #define GREG_XMAX 640
 
 -- 
 .sig.gz
Responsible-Changed-From-To: freebsd-ports->chuckr 
Responsible-Changed-By: steve 
Responsible-Changed-When: Sun Apr 19 09:39:47 PDT 1998 
Responsible-Changed-Why:  
Assign to port's maintainer. 
State-Changed-From-To: open->closed 
State-Changed-By: chuckr 
State-Changed-When: Sun Apr 19 16:22:43 PDT 1998 
State-Changed-Why:  
Added gif terminal as requested, and added dependency on ports/graphics/gd. 
>Unformatted:
Does now, and added dependency on ports/graphics/gd.
