Skip to content

Commit

Permalink
2007-08-09 Sebastien Pouliot <sebastien@ximian.com>
Browse files Browse the repository at this point in the history
	* 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 committed Aug 9, 2007
1 parent 5f67445 commit 03fb41b
Show file tree
Hide file tree
Showing 8 changed files with 122 additions and 72 deletions.
14 changes: 14 additions & 0 deletions ChangeLog
@@ -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> 2007-07-24 Wade Berrier <wberrier@novell.com>


* configure.in: version bump -> 1.2.5 * configure.in: version bump -> 1.2.5
Expand Down
3 changes: 1 addition & 2 deletions Makefile.am
@@ -1,5 +1,4 @@
SUBDIRS = cairo src tests SUBDIRS = $(CAIRO_DIR) src tests
#libpixman


pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig


Expand Down
2 changes: 1 addition & 1 deletion 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
15 changes: 15 additions & 0 deletions README
Expand Up @@ -16,3 +16,18 @@ To build:
To install: To install:


make 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).
27 changes: 11 additions & 16 deletions TODO
Expand Up @@ -5,10 +5,9 @@ have to be fixed in libgdiplus.


* Image formats * Image formats


- EXIF. There is libexif - WMF and EMF. We have limited support metafiles.
- WMF and EMF. We do not support metafiles. See libwmf.


---- Not implemented functions ---- Not implemented / partially implemented functions


* Handle functions * Handle functions


Expand Down Expand Up @@ -36,8 +35,6 @@ GdipSetImageAttributesThreshold
GdipSetImageAttributesOutputChannelColorProfile GdipSetImageAttributesOutputChannelColorProfile
GdipGetImageAttributesAdjustedPalette GdipGetImageAttributesAdjustedPalette
GdipSetImageAttributesOutputChannel GdipSetImageAttributesOutputChannel
GdipDrawImagePointsRect
GdipDrawImagePointsRectI
GdipLoadImageFromStream GdipLoadImageFromStream
GdipSaveImageToStream GdipSaveImageToStream
GdipSaveAdd GdipSaveAdd
Expand Down Expand Up @@ -71,7 +68,7 @@ Notes
[3] Function exists (return Ok) but only display a warning on the console [3] Function exists (return Ok) but only display a warning on the console
[4] Partially implemented. GpGraphics is ignored. [4] Partially implemented. GpGraphics is ignored.


---- Cairo limitations ---- Known Limitations


* Maximum of 32bpp * Maximum of 32bpp


Expand All @@ -83,17 +80,15 @@ Notes
GDI+ supports 32bips of precision (Cairo is limited to 15bits) GDI+ supports 32bips of precision (Cairo is limited to 15bits)
http://bugzilla.ximian.com/show_bug.cgi?id=79729 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 http://bugzilla.ximian.com/show_bug.cgi?id=77937
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.


We have to review these calls to make sure that we are releasing propertly * Cairo doesn't implement cairo_stroke_to_path
the handles and not leaving them created when their associated object
(GpGraphics in this case) is destroyed.


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
38 changes: 26 additions & 12 deletions autogen.sh
Expand Up @@ -125,24 +125,38 @@ automake --add-missing --gnu $am_opt ||
echo "Running autoconf ..." echo "Running autoconf ..."
autoconf || { echo "**Error**: autoconf failed."; exit 1; } autoconf || { echo "**Error**: autoconf failed."; exit 1; }


if test -d $srcdir/libpixman; then #if test -d $srcdir/libpixman; then
echo Running libpixman/autogen.sh ... # echo Running libpixman/autogen.sh ...
(cd $srcdir/libpixman ; NOCONFIGURE=1 ./autogen.sh "$@") # (cd $srcdir/libpixman ; NOCONFIGURE=1 ./autogen.sh "$@")
echo Done running autogen.sh in libpixman... # echo Done running autogen.sh in libpixman...
fi #fi


if test -d $srcdir/cairo; then CONF_OPTIONS=""
echo Running cairo/autogen.sh ... CAIRO_AUTOGEN_REQUIRED=1
(cd $srcdir/cairo ; NOCONFIGURE=1 ./autogen.sh "$@") until [ -z "$1" ]
echo Done running autogen.sh in cairo... 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 fi




conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c


if test x$NOCONFIGURE = x; then if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ... echo Running $srcdir/configure $conf_flags $CONF_OPTIONS ...
$srcdir/configure $conf_flags "$@" \ $srcdir/configure $conf_flags $CONF_OPTIONS \
&& echo Now type \`make\' to compile $PKG_NAME || exit 1 && echo Now type \`make\' to compile $PKG_NAME || exit 1
else else
echo Skipping configure process. echo Skipping configure process.
Expand Down
89 changes: 51 additions & 38 deletions configure.in
Expand Up @@ -15,39 +15,52 @@ fi
GLIB_REQUIRED_VERSION="2.2.3" GLIB_REQUIRED_VERSION="2.2.3"
PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION) PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION)


# force subdirectories (cairo, specifically) to build their static GDIPLUS_LIBS="`pkg-config --libs glib-2.0 `"
# libraries using position independent code. GDIPLUS_CFLAGS="`pkg-config --cflags glib-2.0 `"
ac_configure_args="$ac_configure_args --with-pic=yes"

# Optional use (still unsupported) of the system's Cairo library
# disable the PDF and SVG surface backends of Cairo (unrequired for GDI+) AC_ARG_WITH(cairo, [ --with-cairo=internal,system],[cairo_v=system],[cairo_v=internal])
ac_configure_args="$ac_configure_args --disable-pdf --disable-svg"

# Optional use (experimental and unsupported) of Pango's text rendering on top of Cairo
AC_CONFIG_SUBDIRS(cairo) AC_ARG_WITH(pango, [ --with-pango],[text_v=pango],[text_v=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' if test $cairo_v = "internal"; then
AC_DEFINE(USE_INCLUDED_CAIRO,1,[Use Cairo bundled in libgdiplus]) # force subdirectories (cairo, specifically) to build their static

# libraries using position independent code.
# Activate this when we support linking to an already exiting Cairo installation ac_configure_args="$ac_configure_args --with-pic=yes"
#default_cairo=included
#AC_ARG_WITH(cairo, [ --with-cairo=included,installed],[cairo_v=$with_cairo],[cairo_v=$default_cairo]) # disable the PDF and SVG surface backends of Cairo (unrequired for GDI+)
# ac_configure_args="$ac_configure_args --disable-pdf --disable-svg"
#if test $cairo_v = "included";
#then AC_CONFIG_SUBDIRS(cairo)
# #AC_CONFIG_SUBDIRS(libpixman) CAIRO_DIR='cairo'
# AC_CONFIG_SUBDIRS(cairo) CAIRO_LIBS='$(top_builddir)/cairo/src/libcairo.la'
# 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'
# 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])
# AC_DEFINE(USE_INCLUDED_CAIRO,1,[Use Cairo bundled in libgdiplus])
#else if test $text_v = "pango"; then
# if pkg-config --exact-version 0.3.0 cairo; then AC_MSG_ERROR("Pango text rendering is only possible with --with-cairo=system")
# echo Cairo installation OK fi
# else else
# AC_MSG_ERROR("Did not find Cairo == 0.3.0"); CAIRO_REQUIRED_VERSION="1.4"
# fi PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_REQUIRED_VERSION)
# CAIRO_DIR=""
# CAIRO_LIBS="`pkg-config --libs cairo`" CAIRO_LIBS="`pkg-config --libs cairo `"
# CAIRO_CFLAGS="`pkg-config --cflags cairo`" CAIRO_CFLAGS="`pkg-config --cflags cairo `"
#fi 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 # Fall back to using fontconfig/freetype-config if their .pc is not found
PKG_CHECK_MODULES(FONTCONFIG, fontconfig, PKG_CHECK_MODULES(FONTCONFIG, fontconfig,
Expand All @@ -72,8 +85,8 @@ if test "x$FREETYPE2" = "xno"; then
fi fi
fi fi


GDIPLUS_LIBS="`pkg-config --libs glib-2.0 ` $FONTCONFIG_LIBS $FREETYPE2_LIBS" GDIPLUS_LIBS="$GDIPLUS_LIBS $FONTCONFIG_LIBS $FREETYPE2_LIBS"
GDIPLUS_CFLAGS="`pkg-config --cflags glib-2.0 ` $FONTCONFIG_CFLAGS $FREETYPE2_CFLAGS" 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 # 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 `" GDIPLUS_LIBS="$GDIPLUS_LIBS `pkg-config --libs xrender `"
Expand Down Expand Up @@ -338,13 +351,11 @@ fi
GDIPLUS_PKG_LIBS="$GDIPLUS_LIBS" GDIPLUS_PKG_LIBS="$GDIPLUS_LIBS"
GDIPLUS_PKG_CFLAGS="$GDIPLUS_CFLAGS" GDIPLUS_PKG_CFLAGS="$GDIPLUS_CFLAGS"


GDIPLUS_LIBS="$CAIRO_LIBS $GDIPLUS_LIBS"
GDIPLUS_CFLAGS="$CAIRO_CFLAGS $GDIPLUS_CFLAGS"

AC_SUBST(GDIPLUS_LIBS) AC_SUBST(GDIPLUS_LIBS)
AC_SUBST(GDIPLUS_CFLAGS) AC_SUBST(GDIPLUS_CFLAGS)
AC_SUBST(GDIPLUS_PKG_LIBS) AC_SUBST(GDIPLUS_PKG_LIBS)
AC_SUBST(GDIPLUS_PKG_CFLAGS) AC_SUBST(GDIPLUS_PKG_CFLAGS)
AC_SUBST(GDIPLUS_PKG_REQ)


AC_OUTPUT([ AC_OUTPUT([
Makefile Makefile
Expand All @@ -356,6 +367,8 @@ echo "---"
echo "Configuration summary" echo "Configuration summary"
echo "" echo ""
echo " * Installation prefix = $prefix" echo " * Installation prefix = $prefix"
echo " * Cairo = $cairo_v"
echo " * Text = $text_v"
echo " * EXIF tags = $libexif_pkgconfig" echo " * EXIF tags = $libexif_pkgconfig"
echo " * Codecs supported:" echo " * Codecs supported:"
echo "" echo ""
Expand Down
6 changes: 3 additions & 3 deletions libgdiplus.pc.in
Expand Up @@ -7,6 +7,6 @@ includedir=@includedir@
Name: libgdiplus Name: libgdiplus
Description: GDI+ implementation Description: GDI+ implementation
Version: @VERSION@ Version: @VERSION@
Requires: glib-2.0 gmodule-2.0 gthread-2.0 Requires: glib-2.0 gmodule-2.0 gthread-2.0 @GDIPLUS_PKG_REQ@
Libs: -L${libdir} -lgdiplus @GDIPLUS_PKG_LIBS@ Libs: -L${libdir} -lgdiplus
Cflags: -I${includedir} @GDIPLUS_PKG_CFLAGS@ Cflags: -I${includedir}

0 comments on commit 03fb41b

Please sign in to comment.