[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ltib] patch: selectable back-ends for cairo
From: |
Stuart Hughes |
Subject: |
Re: [Ltib] patch: selectable back-ends for cairo |
Date: |
Sun, 04 Mar 2012 18:26:44 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 |
Hi Fritz,
I've checked in your patch with a couple of small changes (see
attached). The changes are:
* The default enabled back-end is directfb
* Cairo selected fontconfig (this failed when not selected).
Thanks for the patch.
Regards, Stuart
On 10/02/12 00:11, Fritz Mueller wrote:
> Here is a proposed patch to allow manual selection of back-ends for the cairo
> graphics library. In our application, we use cairo to render to in-memory
> bitmaps only, which are then transferred to OLED displays. The existing
> cairo package configuration forced us to select the DirectFB package and
> backend, and also the SVG, PS, and PDF backends which were not useful/needed
> in our application.
>
> Index: ltib
> ===================================================================
> RCS file: /sources/ltib/ltib/ltib,v
> retrieving revision 1.78
> diff -u -a -r1.78 ltib
> --- ltib 29 Nov 2011 07:43:55 -0000 1.78
> +++ ltib 9 Feb 2012 19:58:24 -0000
> @@ -262,8 +262,12 @@
> PKG_BASH => [ qw/PKG_BASH_WANT_NO_SH_SYMLINK/ ],
> PKG_DHCP => [ qw/PKG_DHCP_WANT_SERVER PKG_DHCP_WANT_CLIENT/ ],
> PKG_PPP => [ qw/PKG_PPP_WANT_FILTER/ ],
> PKG_SKELL => [ qw/PKG_SKELL_WANT_TERMINFO/ ],
> - PKG_CAIRO => [ qw/PKG_XORG_SERVER/ ],
> + PKG_CAIRO => [ qw/PKG_CAIRO_WANT_DIRECTFB
> + PKG_CAIRO_WANT_PDF
> + PKG_CAIRO_WANT_PS
> + PKG_CAIRO_WANT_SVG
> + PKG_CAIRO_WANT_XLIB/ ],
> PKG_BOOST => [ qw/PKG_BOOST_WANT_HEADER_ONLY/ ],
> };
>
> Index: config/userspace/packages.lkc
> ===================================================================
> RCS file: /sources/ltib/ltib/config/userspace/packages.lkc,v
> retrieving revision 1.45
> diff -u -a -r1.45 packages.lkc
> --- config/userspace/packages.lkc 31 Oct 2011 20:34:42 -0000 1.45
> +++ config/userspace/packages.lkc 9 Feb 2012 19:58:24 -0000
> @@ -296,11 +296,32 @@
> config PKG_CAIRO
> depends CAP_HAS_MMU
> select PKG_LIBPNG
> - select PKG_DIRECTFB
> bool "cairo"
> help
> A 2D vectorial drawing library needed by GTK from 2.8.0
>
> +config PKG_CAIRO_WANT_DIRECTFB
> + depends PKG_CAIRO
> + depends PKG_DIRECTFB
> + bool "include DirectFB back end"
> +
> +config PKG_CAIRO_WANT_PDF
> + depends PKG_CAIRO
> + bool "include PDF back end"
> +
> +config PKG_CAIRO_WANT_PS
> + depends PKG_CAIRO
> + bool "include PostScript back end"
> +
> +config PKG_CAIRO_WANT_SVG
> + depends PKG_CAIRO
> + bool "include SVG back end"
> +
> +config PKG_CAIRO_WANT_XLIB
> + depends PKG_CAIRO
> + depends PKG_LIBX11
> + bool "include Xlib back end"
> +
> config PKG_CAN4LINUX
> bool "can4linux"
> help
> Index: dist/lfs-5.1/cairo/cairo.spec
> ===================================================================
> RCS file: /sources/ltib/ltib/dist/lfs-5.1/cairo/cairo.spec,v
> retrieving revision 1.2
> diff -u -a -r1.2 cairo.spec
> --- dist/lfs-5.1/cairo/cairo.spec 24 Aug 2009 09:30:14 -0000 1.2
> +++ dist/lfs-5.1/cairo/cairo.spec 9 Feb 2012 19:58:24 -0000
> @@ -22,15 +22,31 @@
> %Build
> XTRA_OPTS="--disable-win32"
>
> -if ! rpm --dbpath %{_dbpath} -q xorg-server &>/dev/null
> +if [ "$PKG_CAIRO_WANT_DIRECTFB" = "y" ]
> then
> - XTRA_OPTS='--disable-xlib';
> + XTRA_OPTS="$XTRA_OPTS --enable-directfb"
> fi
>
> -if [ -n "$PKG_DIRECTFB" ]
> +if [ "$PKG_CAIRO_WANT_PDF" != "y" ]
> then
> - XTRA_OPTS="$XTRA_OPTS --enable-directfb"
> + XTRA_OPTS="$XTRA_OPTS --disable-pdf"
> +fi
> +
> +if [ "$PKG_CAIRO_WANT_PS" != "y" ]
> +then
> + XTRA_OPTS="$XTRA_OPTS --disable-ps"
> +fi
> +
> +if [ "$PKG_CAIRO_WANT_SVG" != "y" ]
> +then
> + XTRA_OPTS="$XTRA_OPTS --disable-svg"
> +fi
> +
> +if [ "$PKG_CAIRO_WANT_XLIB" != "y" ]
> +then
> + XTRA_OPTS="$XTRA_OPTS --disable-xlib"
> fi
> +
> ./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build} $XTRA_OPTS
> make
>
>
--- Begin Message ---
Subject: |
[Ltib] patch: selectable back-ends for cairo |
Date: |
Thu, 9 Feb 2012 16:11:58 -0800 |
Here is a proposed patch to allow manual selection of back-ends for the cairo
graphics library. In our application, we use cairo to render to in-memory
bitmaps only, which are then transferred to OLED displays. The existing cairo
package configuration forced us to select the DirectFB package and backend, and
also the SVG, PS, and PDF backends which were not useful/needed in our
application.
Index: ltib
===================================================================
RCS file: /sources/ltib/ltib/ltib,v
retrieving revision 1.78
diff -u -a -r1.78 ltib
--- ltib 29 Nov 2011 07:43:55 -0000 1.78
+++ ltib 9 Feb 2012 19:58:24 -0000
@@ -262,8 +262,12 @@
PKG_BASH => [ qw/PKG_BASH_WANT_NO_SH_SYMLINK/ ],
PKG_DHCP => [ qw/PKG_DHCP_WANT_SERVER PKG_DHCP_WANT_CLIENT/ ],
PKG_PPP => [ qw/PKG_PPP_WANT_FILTER/ ],
PKG_SKELL => [ qw/PKG_SKELL_WANT_TERMINFO/ ],
- PKG_CAIRO => [ qw/PKG_XORG_SERVER/ ],
+ PKG_CAIRO => [ qw/PKG_CAIRO_WANT_DIRECTFB
+ PKG_CAIRO_WANT_PDF
+ PKG_CAIRO_WANT_PS
+ PKG_CAIRO_WANT_SVG
+ PKG_CAIRO_WANT_XLIB/ ],
PKG_BOOST => [ qw/PKG_BOOST_WANT_HEADER_ONLY/ ],
};
Index: config/userspace/packages.lkc
===================================================================
RCS file: /sources/ltib/ltib/config/userspace/packages.lkc,v
retrieving revision 1.45
diff -u -a -r1.45 packages.lkc
--- config/userspace/packages.lkc 31 Oct 2011 20:34:42 -0000 1.45
+++ config/userspace/packages.lkc 9 Feb 2012 19:58:24 -0000
@@ -296,11 +296,32 @@
config PKG_CAIRO
depends CAP_HAS_MMU
select PKG_LIBPNG
- select PKG_DIRECTFB
bool "cairo"
help
A 2D vectorial drawing library needed by GTK from 2.8.0
+config PKG_CAIRO_WANT_DIRECTFB
+ depends PKG_CAIRO
+ depends PKG_DIRECTFB
+ bool "include DirectFB back end"
+
+config PKG_CAIRO_WANT_PDF
+ depends PKG_CAIRO
+ bool "include PDF back end"
+
+config PKG_CAIRO_WANT_PS
+ depends PKG_CAIRO
+ bool "include PostScript back end"
+
+config PKG_CAIRO_WANT_SVG
+ depends PKG_CAIRO
+ bool "include SVG back end"
+
+config PKG_CAIRO_WANT_XLIB
+ depends PKG_CAIRO
+ depends PKG_LIBX11
+ bool "include Xlib back end"
+
config PKG_CAN4LINUX
bool "can4linux"
help
Index: dist/lfs-5.1/cairo/cairo.spec
===================================================================
RCS file: /sources/ltib/ltib/dist/lfs-5.1/cairo/cairo.spec,v
retrieving revision 1.2
diff -u -a -r1.2 cairo.spec
--- dist/lfs-5.1/cairo/cairo.spec 24 Aug 2009 09:30:14 -0000 1.2
+++ dist/lfs-5.1/cairo/cairo.spec 9 Feb 2012 19:58:24 -0000
@@ -22,15 +22,31 @@
%Build
XTRA_OPTS="--disable-win32"
-if ! rpm --dbpath %{_dbpath} -q xorg-server &>/dev/null
+if [ "$PKG_CAIRO_WANT_DIRECTFB" = "y" ]
then
- XTRA_OPTS='--disable-xlib';
+ XTRA_OPTS="$XTRA_OPTS --enable-directfb"
fi
-if [ -n "$PKG_DIRECTFB" ]
+if [ "$PKG_CAIRO_WANT_PDF" != "y" ]
then
- XTRA_OPTS="$XTRA_OPTS --enable-directfb"
+ XTRA_OPTS="$XTRA_OPTS --disable-pdf"
+fi
+
+if [ "$PKG_CAIRO_WANT_PS" != "y" ]
+then
+ XTRA_OPTS="$XTRA_OPTS --disable-ps"
+fi
+
+if [ "$PKG_CAIRO_WANT_SVG" != "y" ]
+then
+ XTRA_OPTS="$XTRA_OPTS --disable-svg"
+fi
+
+if [ "$PKG_CAIRO_WANT_XLIB" != "y" ]
+then
+ XTRA_OPTS="$XTRA_OPTS --disable-xlib"
fi
+
./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build} $XTRA_OPTS
make
_______________________________________________
LTIB home page: http://ltib.org
Ltib mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/ltib
--- End Message ---
- Re: [Ltib] patch: selectable back-ends for cairo,
Stuart Hughes <=