Description: Patches that were in Debian before native got banned
Author: Mark Brown <broonie@debian.org>

--- cvsgraph-1.7.0.orig/configure.in
+++ cvsgraph-1.7.0/configure.in
@@ -73,8 +73,6 @@ AC_PROG_LEX
 AC_PROG_YACC
 AC_PATH_PROG(ac_prog_pkg_config, pkg-config)
 
-AC_CHECK_LIB(m, sqrt)
-
 AC_CHECK_LIB(freetype, FT_Load_Glyph)
 if test "$ac_cv_lib_freetype_FT_Load_Glyph" != "yes"
 then
@@ -84,6 +82,8 @@ fi
 # find out what the GD library uses
 AX_CHECK_GD
 
+AC_CHECK_LIB(m, atan2)
+
 # Checks for header files.
 AC_HEADER_STDC
 AC_CHECK_HEADERS([getopt.h sys/wait.h gd.h])
--- /dev/null
+++ cvsgraph-1.7.0/contrib/Makefile
@@ -0,0 +1,307 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# contrib/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+pkgdatadir = $(datadir)/cvsgraph
+pkglibdir = $(libdir)/cvsgraph
+pkgincludedir = $(includedir)/cvsgraph
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = contrib
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(srcdir)/cvsgraphwrapper.php.in $(srcdir)/mkimage.php.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = mkimage.php cvsgraphwrapper.php
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/broonie/src/packages/cvsgraph/cvsgraph-1.7.0/missing --run aclocal-1.10
+AMTAR = ${SHELL} /home/broonie/src/packages/cvsgraph/cvsgraph-1.7.0/missing --run tar
+AUTOCONF = ${SHELL} /home/broonie/src/packages/cvsgraph/cvsgraph-1.7.0/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/broonie/src/packages/cvsgraph/cvsgraph-1.7.0/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/broonie/src/packages/cvsgraph/cvsgraph-1.7.0/missing --run automake-1.10
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
+CPP = gcc -E
+CPPFLAGS = -D_FORTIFY_SOURCE=2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+GDLIB_CONFIG = 
+GD_CFLAGS = 
+GD_LDFLAGS = 
+GD_LIBS = 
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LDFLAGS = -Wl,-z,relro
+LEX = flex
+LEXLIB = -lfl
+LEX_OUTPUT_ROOT = lex.yy
+LIBOBJS = 
+LIBS =   -lfreetype -lm 
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/broonie/src/packages/cvsgraph/cvsgraph-1.7.0/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+OBJEXT = o
+PACKAGE = cvsgraph
+PACKAGE_BUGREPORT = cvsgraph@akhphd.au.dk
+PACKAGE_NAME = cvsgraph
+PACKAGE_STRING = cvsgraph 1.7.0
+PACKAGE_TARNAME = cvsgraph
+PACKAGE_VERSION = 1.7.0
+PATH_SEPARATOR = :
+SET_MAKE = 
+SHELL = /bin/bash
+STRIP = 
+VERSION = 1.7.0
+YACC = bison -y
+YFLAGS = 
+abs_builddir = /home/broonie/src/packages/cvsgraph/cvsgraph-1.7.0/contrib
+abs_srcdir = /home/broonie/src/packages/cvsgraph/cvsgraph-1.7.0/contrib
+abs_top_builddir = /home/broonie/src/packages/cvsgraph/cvsgraph-1.7.0
+abs_top_srcdir = /home/broonie/src/packages/cvsgraph/cvsgraph-1.7.0
+ac_ct_CC = gcc
+ac_prog_pkg_config = /usr/bin/pkg-config
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build_alias = 
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host_alias = 
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${prefix}/share/info
+install_sh = $(SHELL) /home/broonie/src/packages/cvsgraph/cvsgraph-1.7.0/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${prefix}/share/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = /etc/cvsgraph
+target_alias = 
+top_builddir = ..
+top_srcdir = ..
+AUTOMAKE_OPTIONS = gnu
+CLEANFILES = cvsgraphwrapper.php mkimage.php
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  contrib/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  contrib/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+mkimage.php: $(top_builddir)/config.status $(srcdir)/mkimage.php.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+cvsgraphwrapper.php: $(top_builddir)/config.status $(srcdir)/cvsgraphwrapper.php.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+	distclean-generic distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null
+++ cvsgraph-1.7.0/contrib/cvsgraphwrapper.php
@@ -0,0 +1,69 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<?php
+	/* Some basic checks are in place */
+	isset($r) || die("CVSroot must be set\n");
+	isset($m) || die("CVSmodule must be set\n");
+	isset($f) || die("File must be set\n");
+	if(strchr($r, "'") || strchr($m, "'") || strchr($f, "'"))
+		die("Invalid characters in arguments\n");
+?>
+<html>
+<head>
+	<title> <?php echo "CvsGraph of '$f'\n"; ?></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+	<meta name="generator" content="handcrafted">
+</head>
+<body bgcolor="#f0f0f0">
+<center>
+<?php
+	/* I'll be paranoid, set root and module here so no one can get access elsewhere */
+	/* Remove this or change it to suit your needs */
+//	$r = "/home/cvsgraph";
+//	$m = "cvsgraph";
+
+	/* Shell escape, PHP4 has functions for this, use them */
+	$sr = "'" . $r . "'";
+	$sm = "'" . $m . "'";
+	$sf = "'" . $f . ",v'";
+
+	/* Image references must be encoded properly */
+	$ur = urlencode($r);
+	$um = urlencode($m);
+	$uf = urlencode($f);
+	if(isset($cvsroot) && $cvsroot != "")
+		$ucr= "&cvsroot=" . urlencode($cvsroot);	/* The cvsweb.cgi root */
+	else
+		$ucr = "";
+
+	/* I expose the paths here (accessible via the server). */
+	/* Set this to a private place to make it secure. */
+	$prefix = "/usr";
+	$exec_prefix = "${prefix}";
+	$cvsgraph = "${exec_prefix}/bin/cvsgraph";
+	$cvsgraph_conf = "/etc/cvsgraph/cvsgraph.conf";
+
+	/* Print a head line */
+	echo "<h1>CvsGraph of '$f'</h1>\n";
+
+	/* Generate an imagemap */
+	$mapname = "CvsGraphMap";
+	$arg9 = "-9 './'";
+	$arg8 = "-8 '$ucr'";
+	$arg0 = "-0 'Branch:'";
+	$arg1 = "-1 'Revision:'";
+	$arg2 = "-2 'Diff:'";
+	$argM = "-M '$mapname'";
+	passthru("$cvsgraph $arg0 $arg1 $arg2 $arg8 $arg9 $argM -i -c $cvsgraph_conf -r $sr -m $sm $sf");
+
+	/* Link a CvsGraph image */
+	echo "<img border=\"0\" usemap=\"#$mapname\" src=\"./mkimage.php?r=$ur&amp;m=$um&amp;f=$uf\" alt=\"CvsGraph of '$f'\">\n";
+	echo "<p>\nClick on the revisions/branches to display them\n";
+	echo "<br>\nClick between the revisions to display the diffs\n";
+?>
+<hr>
+</center>
+<address>
+Created with <a href="http://www.akhphd.au.dk/~bertho/cvsgraph/">CvsGraph</a>
+</address>
+</body>
+</html>
--- /dev/null
+++ cvsgraph-1.7.0/contrib/mkimage.php
@@ -0,0 +1,29 @@
+<?php
+	/* Some basic checks are in place */
+	isset($r) || die("CVSroot must be set\n");
+	isset($m) || die("CVSmodule must be set\n");
+	isset($f) || die("File must be set\n");
+	if(strchr($r, "'") || strchr($m, "'") || strchr($f, "'"))
+		die("Invalid characters in arguments\n");
+
+	/* I'll be paranoid, set root and module here so no one can get access elsewhere */
+	/* Remove this or change it to suit your needs */
+//	$r = "/home/cvsgraph";
+//	$m = "cvsgraph";
+
+	/* Shell escape, PHP4 has functions for this, use them */
+	$r = "'" . $r . "'";
+	$m = "'" . $m . "'";
+	$f = "'" . $f . ",v'";
+
+	/* I expose the paths here (accessible via the server). */
+	/* Set this to a private place to make it secure. */
+	$prefix = "/usr";
+	$exec_prefix = "${prefix}";
+	$cvsgraph = "${exec_prefix}/bin/cvsgraph";
+	$cvsgraph_conf = "/etc/cvsgraph/cvsgraph.conf";
+
+	/* Default I generate PNG */
+	Header("Content-Type: image/png");
+	passthru("$cvsgraph -q -c $cvsgraph_conf -r $r -m $m $f");
+?>
--- cvsgraph-1.7.0.orig/cvsgraph.conf
+++ cvsgraph-1.7.0/cvsgraph.conf
@@ -124,7 +124,7 @@
 #	CVS/RCS repository can be found
 # cvsmodule <string>
 #
-cvsroot		= "/var/cvs";
+cvsroot		= "/var/lib/cvs";
 cvsmodule	= "";
 
 # color_bg <color>
@@ -132,7 +132,7 @@ cvsmodule	= "";
 # transparent_bg <boolean>
 #	Make color_bg the transparent color (only useful with PNG)
 color_bg	= "#ffffff";
-transparent_bg	= false;
+#transparent_bg	= false;
 
 # date_format <string>
 #	The strftime(3) format string for date and time
