Permalink
Browse files

2007-08-09 Sebastien Pouliot <sebastien@ximian.com>

	* autogen.sh: Skip running cairo/autogen.sh if we're not using our
	internal copy of Cairo.
	* configure.in: Add --with-cairo=internal,system and --with-pango
	(unsupported) options.
	* libgdiplus.pc.in: Add additional requirements if the system's Cairo
	and/or Pango are being used.
	* Makefile.am: Don't include cairo in SUBDIRS if we're not using our
	internal copy of Cairo.
	* NEWS: Link to mono-project.com
	* README: Added new build options
	* TODO: refreshed


svn path=/trunk/libgdiplus/; revision=83745
  • Loading branch information...
Sebastien Pouliot
Sebastien Pouliot committed Aug 9, 2007
1 parent 5f67445 commit 03fb41b49087daec2cf1cc85d9ca7302cf6b2a27
Showing with 122 additions and 72 deletions.
  1. +14 −0 ChangeLog
  2. +1 −2 Makefile.am
  3. +1 −1 NEWS
  4. +15 −0 README
  5. +11 −16 TODO
  6. +26 −12 autogen.sh
  7. +51 −38 configure.in
  8. +3 −3 libgdiplus.pc.in
View
@@ -1,3 +1,17 @@
+2007-08-09 Sebastien Pouliot <sebastien@ximian.com>
+
+ * autogen.sh: Skip running cairo/autogen.sh if we're not using our
+ internal copy of Cairo.
+ * configure.in: Add --with-cairo=internal,system and --with-pango
+ (unsupported) options.
+ * libgdiplus.pc.in: Add additional requirements if the system's Cairo
+ and/or Pango are being used.
+ * Makefile.am: Don't include cairo in SUBDIRS if we're not using our
+ internal copy of Cairo.
+ * NEWS: Link to mono-project.com
+ * README: Added new build options
+ * TODO: refreshed
+
2007-07-24 Wade Berrier <wberrier@novell.com>
* configure.in: version bump -> 1.2.5
View
@@ -1,5 +1,4 @@
-SUBDIRS = cairo src tests
-#libpixman
+SUBDIRS = $(CAIRO_DIR) src tests
pkgconfigdir = $(libdir)/pkgconfig
View
2 NEWS
@@ -1 +1 @@
-First release of libgdiplus, spun off from Mono's C# library.
+See http://www.mono-project.com/Libgdiplus for the most recent details
View
15 README
@@ -16,3 +16,18 @@ To build:
To install:
make install
+
+
+Optional build options [UNSUPPORTED]
+
+ --with-cairo=system
+
+ This build libgdiplus using the system's libcairo (and not the
+ internal copy of Cairo that libgdiplus bundles). Minimum Cairo
+ version is 1.4.
+
+ --with-pango
+
+ This build libgdiplus using Pango to render (measure and draw)
+ all of it's text. This can only be enabled if --with-cairo=system
+ and requires Pango version 1.10 (or later).
View
27 TODO
@@ -5,10 +5,9 @@ have to be fixed in libgdiplus.
* Image formats
-- EXIF. There is libexif
-- WMF and EMF. We do not support metafiles. See libwmf.
+- WMF and EMF. We have limited support metafiles.
----- Not implemented functions
+---- Not implemented / partially implemented functions
* Handle functions
@@ -36,8 +35,6 @@ GdipSetImageAttributesThreshold
GdipSetImageAttributesOutputChannelColorProfile
GdipGetImageAttributesAdjustedPalette
GdipSetImageAttributesOutputChannel
-GdipDrawImagePointsRect
-GdipDrawImagePointsRectI
GdipLoadImageFromStream
GdipSaveImageToStream
GdipSaveAdd
@@ -71,7 +68,7 @@ Notes
[3] Function exists (return Ok) but only display a warning on the console
[4] Partially implemented. GpGraphics is ignored.
----- Cairo limitations
+---- Known Limitations
* Maximum of 32bpp
@@ -83,17 +80,15 @@ Notes
GDI+ supports 32bips of precision (Cairo is limited to 15bits)
http://bugzilla.ximian.com/show_bug.cgi?id=79729
----- Issues
+* Cairo doesn't support 8-bit pseudocolor visuals
-* All the functions that create Cairo resources have to be review to make
-sure that we do not over reference the handles. For example, calling
-cairo_create and cairo_reference will set the internal cairo reference count
-to two. A single cairo_destroy will decrease the internal counter to 1 but
-it will not release the resource.
+ http://bugzilla.ximian.com/show_bug.cgi?id=77937
-We have to review these calls to make sure that we are releasing propertly
-the handles and not leaving them created when their associated object
-(GpGraphics in this case) is destroyed.
+* Cairo doesn't implement cairo_stroke_to_path
+ GdipWidenPath implementation depends on this feature.
+ http://bugzilla.ximian.com/show_bug.cgi?id=78110
-last updated: January 12th, 2007
+----
+
+last updated: August 9th, 2007
View
@@ -125,24 +125,38 @@ automake --add-missing --gnu $am_opt ||
echo "Running autoconf ..."
autoconf || { echo "**Error**: autoconf failed."; exit 1; }
-if test -d $srcdir/libpixman; then
- echo Running libpixman/autogen.sh ...
- (cd $srcdir/libpixman ; NOCONFIGURE=1 ./autogen.sh "$@")
- echo Done running autogen.sh in libpixman...
-fi
-
-if test -d $srcdir/cairo; then
- echo Running cairo/autogen.sh ...
- (cd $srcdir/cairo ; NOCONFIGURE=1 ./autogen.sh "$@")
- echo Done running autogen.sh in cairo...
+#if test -d $srcdir/libpixman; then
+# echo Running libpixman/autogen.sh ...
+# (cd $srcdir/libpixman ; NOCONFIGURE=1 ./autogen.sh "$@")
+# echo Done running autogen.sh in libpixman...
+#fi
+
+CONF_OPTIONS=""
+CAIRO_AUTOGEN_REQUIRED=1
+until [ -z "$1" ]
+do
+ if [ "$1" = "--with-cairo=system" ]; then
+ echo Skipping internal cairo/autogen.sh ...
+ CAIRO_AUTOGEN_REQUIRED=0
+ fi
+ CONF_OPTIONS="$CONF_OPTIONS $1"
+ shift
+done
+
+if test "$CAIRO_AUTOGEN_REQUIRED" -eq 1; then
+ if test -d $srcdir/cairo; then
+ echo Running cairo/autogen.sh ...
+ (cd $srcdir/cairo ; NOCONFIGURE=1 ./autogen.sh "$@")
+ echo Done running autogen.sh in cairo...
+ fi
fi
conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
if test x$NOCONFIGURE = x; then
- echo Running $srcdir/configure $conf_flags "$@" ...
- $srcdir/configure $conf_flags "$@" \
+ echo Running $srcdir/configure $conf_flags $CONF_OPTIONS ...
+ $srcdir/configure $conf_flags $CONF_OPTIONS \
&& echo Now type \`make\' to compile $PKG_NAME || exit 1
else
echo Skipping configure process.
View
@@ -15,39 +15,52 @@ fi
GLIB_REQUIRED_VERSION="2.2.3"
PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION)
-# force subdirectories (cairo, specifically) to build their static
-# libraries using position independent code.
-ac_configure_args="$ac_configure_args --with-pic=yes"
-
-# disable the PDF and SVG surface backends of Cairo (unrequired for GDI+)
-ac_configure_args="$ac_configure_args --disable-pdf --disable-svg"
-
-AC_CONFIG_SUBDIRS(cairo)
-CAIRO_LIBS='$(top_builddir)/cairo/src/libcairo.la'
-CAIRO_CFLAGS='-I$(top_builddir)/cairo/pixman/src -I$(top_srcdir)/cairo/pixman/src -I$(top_builddir)/cairo/src -I$(top_srcdir)/cairo/src'
-AC_DEFINE(USE_INCLUDED_CAIRO,1,[Use Cairo bundled in libgdiplus])
-
-# Activate this when we support linking to an already exiting Cairo installation
-#default_cairo=included
-#AC_ARG_WITH(cairo, [ --with-cairo=included,installed],[cairo_v=$with_cairo],[cairo_v=$default_cairo])
-#
-#if test $cairo_v = "included";
-#then
-# #AC_CONFIG_SUBDIRS(libpixman)
-# AC_CONFIG_SUBDIRS(cairo)
-# CAIRO_LIBS='$(top_builddir)/cairo/src/libcairo.la'
-# CAIRO_CFLAGS='-I$(top_builddir)/cairo/pixman/src -I$(top_srcdir)/cairo/pixman/src -I$(top_builddir)/cairo/src -I$(top_srcdir)/cairo/src'
-# AC_DEFINE(USE_INCLUDED_CAIRO,1,[Use Cairo bundled in libgdiplus])
-#else
-# if pkg-config --exact-version 0.3.0 cairo; then
-# echo Cairo installation OK
-# else
-# AC_MSG_ERROR("Did not find Cairo == 0.3.0");
-# fi
-#
-# CAIRO_LIBS="`pkg-config --libs cairo`"
-# CAIRO_CFLAGS="`pkg-config --cflags cairo`"
-#fi
+GDIPLUS_LIBS="`pkg-config --libs glib-2.0 `"
+GDIPLUS_CFLAGS="`pkg-config --cflags glib-2.0 `"
+
+# Optional use (still unsupported) of the system's Cairo library
+AC_ARG_WITH(cairo, [ --with-cairo=internal,system],[cairo_v=system],[cairo_v=internal])
+
+# Optional use (experimental and unsupported) of Pango's text rendering on top of Cairo
+AC_ARG_WITH(pango, [ --with-pango],[text_v=pango],[text_v=cairo])
+
+if test $cairo_v = "internal"; then
+ # force subdirectories (cairo, specifically) to build their static
+ # libraries using position independent code.
+ ac_configure_args="$ac_configure_args --with-pic=yes"
+
+ # disable the PDF and SVG surface backends of Cairo (unrequired for GDI+)
+ ac_configure_args="$ac_configure_args --disable-pdf --disable-svg"
+
+ AC_CONFIG_SUBDIRS(cairo)
+ CAIRO_DIR='cairo'
+ CAIRO_LIBS='$(top_builddir)/cairo/src/libcairo.la'
+ CAIRO_CFLAGS='-I$(top_builddir)/cairo/pixman/src -I$(top_srcdir)/cairo/pixman/src -I$(top_builddir)/cairo/src -I$(top_srcdir)/cairo/src'
+ AC_DEFINE(USE_INCLUDED_CAIRO,1,[Use Cairo bundled in libgdiplus])
+
+ if test $text_v = "pango"; then
+ AC_MSG_ERROR("Pango text rendering is only possible with --with-cairo=system")
+ fi
+else
+ CAIRO_REQUIRED_VERSION="1.4"
+ PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_REQUIRED_VERSION)
+ CAIRO_DIR=""
+ CAIRO_LIBS="`pkg-config --libs cairo `"
+ CAIRO_CFLAGS="`pkg-config --cflags cairo `"
+ GDIPLUS_PKG_REQ="cairo"
+
+ if test $text_v = "pango"; then
+ PANGO_REQUIRED_VERSION="1.10"
+ PKG_CHECK_MODULES(PANGO, pango >= $PANGO_REQUIRED_VERSION)
+ PANGO_LIBS="`pkg-config --libs pangocairo `"
+ PANGO_CFLAGS="`pkg-config --cflags pangocairo `"
+ AC_DEFINE(USE_PANGO_RENDERING,1,[Use Pango to measure and draw text])
+ GDIPLUS_PKG_REQ="$GDIPLUS_PKG_REQ pangocairo-1.0"
+ fi
+fi
+
+GDIPLUS_LIBS="$GDIPLUS_LIBS $CAIRO_LIBS $PANGO_LIBS"
+GDIPLUS_CFLAGS="$GDIPLUS_CFLAGS $CAIRO_CFLAGS $PANGO_CFLAGS"
# Fall back to using fontconfig/freetype-config if their .pc is not found
PKG_CHECK_MODULES(FONTCONFIG, fontconfig,
@@ -72,8 +85,8 @@ if test "x$FREETYPE2" = "xno"; then
fi
fi
-GDIPLUS_LIBS="`pkg-config --libs glib-2.0 ` $FONTCONFIG_LIBS $FREETYPE2_LIBS"
-GDIPLUS_CFLAGS="`pkg-config --cflags glib-2.0 ` $FONTCONFIG_CFLAGS $FREETYPE2_CFLAGS"
+GDIPLUS_LIBS="$GDIPLUS_LIBS $FONTCONFIG_LIBS $FREETYPE2_LIBS"
+GDIPLUS_CFLAGS="$GDIPLUS_CFLAGS $FONTCONFIG_CFLAGS $FREETYPE2_CFLAGS"
# Add xrender here so that we don't fail to find glib if we won't have xrender.pc
GDIPLUS_LIBS="$GDIPLUS_LIBS `pkg-config --libs xrender `"
@@ -338,13 +351,11 @@ fi
GDIPLUS_PKG_LIBS="$GDIPLUS_LIBS"
GDIPLUS_PKG_CFLAGS="$GDIPLUS_CFLAGS"
-GDIPLUS_LIBS="$CAIRO_LIBS $GDIPLUS_LIBS"
-GDIPLUS_CFLAGS="$CAIRO_CFLAGS $GDIPLUS_CFLAGS"
-
AC_SUBST(GDIPLUS_LIBS)
AC_SUBST(GDIPLUS_CFLAGS)
AC_SUBST(GDIPLUS_PKG_LIBS)
AC_SUBST(GDIPLUS_PKG_CFLAGS)
+AC_SUBST(GDIPLUS_PKG_REQ)
AC_OUTPUT([
Makefile
@@ -356,6 +367,8 @@ echo "---"
echo "Configuration summary"
echo ""
echo " * Installation prefix = $prefix"
+echo " * Cairo = $cairo_v"
+echo " * Text = $text_v"
echo " * EXIF tags = $libexif_pkgconfig"
echo " * Codecs supported:"
echo ""
View
@@ -7,6 +7,6 @@ includedir=@includedir@
Name: libgdiplus
Description: GDI+ implementation
Version: @VERSION@
-Requires: glib-2.0 gmodule-2.0 gthread-2.0
-Libs: -L${libdir} -lgdiplus @GDIPLUS_PKG_LIBS@
-Cflags: -I${includedir} @GDIPLUS_PKG_CFLAGS@
+Requires: glib-2.0 gmodule-2.0 gthread-2.0 @GDIPLUS_PKG_REQ@
+Libs: -L${libdir} -lgdiplus
+Cflags: -I${includedir}

0 comments on commit 03fb41b

Please sign in to comment.