[Pkg-octave-devel] Patch for using system's FTGL in OctPlot

Rafael Laboissiere rafael at debian.org
Sat Jan 14 15:06:16 UTC 2006


Hi Shai,

We (the Debian Octave Group, http://pkg-octave.alioth.debian.org) tried
to get OctPlot 0.3.0 packaged for Debian, but it was rejected by our
ftp-admin team due to copyright issues (see message below).  Also, it was
suggested to us to use the pre-packaged FGTL when building OctPlot,
instead of compiling the sources shipped with the OctPlot tarball.

I prepared a patch (attached below as ftgl-use-system-library.patch;
CAVEAT: all patches are against the released 0.3.0 version, not against
the CVS sources) that changes both configure.in and src/Makefile.am to
check for the presence of the FTGL library in the system (through
pkg-config) and conditionally use it or the version shipped in the
tarball.  I tried to make the code in configure.in as bullet-proof as
possible, but more extensive tests must be done.  At any rate, It works
here when FTGL is either installed or not (or when pkg-config is not
installed).

There is a second patch that fixes an unrelated problem
(drop-distclean.patch).  It removes the rule for distclean from the
top-level Makefile.  The configure and Makefile files were being removed
by "make distclean".  This is wrong, since "make disclean" should not
delete files that are shipped in the tarball.

As we are talking about patches, we are applying another patch to the
Debian package (below as octplot.figure.cpp.patch) which is necessary
when compiling against the libfltk1.1-dev package.

Do you think that you would integrate the FTGL patch (or something
similar) in OctPlot?  If your answer is yes, do you know when the next
version of OctPlot will be released?  I am asking these questions because
because if you answer "no" to any of them, we will go ahead and integrate
the patches in the Debian package.  I would much prefer that they get
applied upstream, though.

Best regards,

-- 
Rafael



----- Forwarded message from Joerg Jaspert <ftpmaster at debian.org> -----

From: Joerg Jaspert <ftpmaster at debian.org>
Subject: [Pkg-octave-devel] octplot_0.3.0-1_i386.changes REJECTED
Date: Tue, 27 Dec 2005 15:22:33 -0800
To: Rafael Laboissiere <rafael at debian.org>,
	Debian Octave Group <pkg-octave-devel at lists.alioth.debian.org>
Cc: Debian Installer <installer at ftp-master.debian.org>

Hi Maintainer,

rejected, as your debian/copyright doesnt have all information it needs
to have. At least NEWs has a different (C) notice attached, you are
missing the additional (C) holders many files have, and that at least
src/__contourc__.cc has a different license (LGPL).

Additionally your source includes FTGL, a library which also has LGPL as
its license, different authors, etc. And it already exists as a debian
package in ftgl[-dev]. Please use the already packaged one if possible.

The fonts have GPL, but a different (C) holder, and an added exception.

Please fix this by listing all different licenses, affected files, (C)
holders and if possible using the pre-packaged FTGL version and then
reupload. Thx.

-- 
bye Joerg



===

If you don't understand why your files were rejected, or if the
override file requires editing, reply to this email.

_______________________________________________
Pkg-octave-devel mailing list
Pkg-octave-devel at lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-octave-devel



----- End forwarded message -----

-------------- next part --------------
--- octplot-0.3.0.orig/configure.in
+++ octplot-0.3.0/configure.in
@@ -181,19 +181,40 @@
 
 
 dnl -----------------------------------------------------------
-dnl FTGL flags
+dnl FTGL settings
 dnl
 dnl
 dnl
 dnl
 
-AC_CHECK_FT2([9.0.3],[],
-             [AC_MSG_ERROR([FreeType2 is required to compile this library])])
+PKG_CONFIG=
+FTGL_CFLAGS=
+FTGL_LIBS=
+USE_LOCAL_FTGL=true
+
+AC_CHECK_PROGS(PKG_CONFIG, pkg-config)
+
+if test "$PKG_CONFIG" ; then
+    if $PKG_CONFIG ftgl ; then
+        FTGL_CFLAGS=`$PKG_CONFIG ftgl --cflags`
+        CFLAGS="$CFLAGS $FTGL_CFLAGS"
+        FTGL_LIBS=`$PKG_CONFIG ftgl --libs`
+        USE_LOCAL_FTGL=false
+    else
+        AC_CHECK_FT2([9.0.3],[],
+            [AC_MSG_ERROR([FreeType2 is required to compile this library])])
+        FTGL_CFLAGS=$FT2_CFLAGS
+        FTGL_LIBS=$FT2_LIBS
+        AC_MSG_WARN([File ftgl.pc not found.  Using local FTGL library])
+    fi
+else
+    AC_MSG_WARN([pkg-config program not found.  Using local FTGL library])
+fi
 
-dnl the duplication of FTGL_LIBS is needed in cygwin since the linker
-dnl is dependent on the order of the libs in the command line
-LIBS="$LIBS $FT2_LIBS"
+AM_CONDITIONAL(USE_LOCAL_FTGL, test $USE_LOCAL_FTGL = true)
+
+LIBS="$LIBS $FTGL_LIBS"
 
 AC_DEFINE_UNQUOTED(
 	MINPATH, 
--- octplot-0.3.0.orig/src/Makefile.am
+++ octplot-0.3.0/src/Makefile.am
@@ -3,8 +3,8 @@
 
 destination_PROGRAMS  = octplot
 
-octplot_LDFLAGS  = $(AM_LDFLAGS) $(FT2_LIBS)
-octplot_CXXFLAGS = $(AM_CXXFLAGS) $(FT2_CFLAGS)
+octplot_LDFLAGS  = $(AM_LDFLAGS) $(FTGL_LIBS)
+octplot_CXXFLAGS = $(AM_CXXFLAGS) $(FTGL_CFLAGS)
 
 octplot_SOURCES = \
   axes.cpp             gl2ps.c           patch.h          prop_scalar.h \
@@ -20,7 +20,10 @@
   ftglfontmanager.cpp  op_com.cpp        prop_radio.h     text.h \
   ftglfontmanager.h    op_com.h          prop_scalar.cpp  util.cpp \
   line_plotter.h       line_plotter.cpp  patch.h          patch.cpp\
-  mathutils.cpp	       mathutils.h       surface.cpp      surface.h \
+  mathutils.cpp	       mathutils.h       surface.cpp      surface.h
+
+if USE_LOCAL_FTGL
+octplot_SOURCES += \
   FTGL/FTBBox.h                 FTGL/FTGLPolygonFont.cpp \
   FTGL/FTBitmapGlyph.cpp        FTGL/FTGLPolygonFont.h \
   FTGL/FTBitmapGlyph.h          FTGL/FTGLTextureFont.cpp \
@@ -48,6 +51,7 @@
   FTGL/FTGLOutlineFont.h        FTGL/FTVectoriser.cpp \
   FTGL/FTGLPixmapFont.cpp       FTGL/FTVectoriser.h \
   FTGL/FTGLPixmapFont.h
+endif
 
 destination_SCRIPTS = \
   octplot_command.oct __contourc__.oct \
-------------- next part --------------
--- octplot-0.3.0.orig/Makefile.am
+++ octplot-0.3.0/Makefile.am
@@ -11,6 +11,4 @@
 EXTRA_DIST = ReleaseNotes.txt README.linux README.cygwin README.mac README
 SUBDIRS = fonts src demos
 
-distclean: clean
-	rm -f *~
-	rm -f configure Makefile.in
+CLEANFILES = *~
-------------- next part --------------
--- octplot-0.3.0/src/figure.cpp	2005-11-05 18:48:08.000000000 +0000
+++ octplot-0.3.0.new/src/figure.cpp	2005-12-05 00:01:20.351540408 +0000
@@ -16,7 +16,7 @@
 //  
 
 #include <iostream>
-#include "Fl/Fl.h"
+#include "Fl/Fl.H"
 #include "Fl/fl_draw.H"
 
 #include "axes.h"


More information about the Pkg-octave-devel mailing list