[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:29:46 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 |
Oops, I attached the wrong file. Hopefully right this time.
S.
On 04/03/12 18:26, Stuart Hughes wrote:
> 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 ltib config/userspace/packages.lkc dist/lf... |
Date: |
Sun, 04 Mar 2012 18:24:30 +0000 |
CVSROOT: /sources/ltib
Module name: ltib
Changes by: Stuart Hughes <seh> 12/03/04 18:24:30
Modified files:
. : ltib
config/userspace: packages.lkc
dist/lfs-5.1/cairo: cairo.spec
Log message:
Add selectable back-ends for cairo. Submitted to the mailing list by
Fritz Mueller on 20120212
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ltib/ltib?cvsroot=ltib&r1=1.80&r2=1.81
http://cvs.savannah.gnu.org/viewcvs/ltib/config/userspace/packages.lkc?cvsroot=ltib&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/ltib/dist/lfs-5.1/cairo/cairo.spec?cvsroot=ltib&r1=1.2&r2=1.3
Patches:
Index: ltib
===================================================================
RCS file: /sources/ltib/ltib/ltib,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -b -r1.80 -r1.81
--- ltib 4 Mar 2012 17:41:53 -0000 1.80
+++ ltib 4 Mar 2012 18:24:30 -0000 1.81
@@ -115,7 +115,7 @@
TOOLCHAIN_CFLAGS DISTRO PKG_UCLIBC PKG_GLIBC
LIBC_HACKING",
app_version => "11.4.1",
- cvs_version => '$Revision: 1.80 $',
+ cvs_version => '$Revision: 1.81 $',
config_dir => "$top/config",
platforms_dir => "$top/config/platform",
plat_dir => "",
@@ -264,7 +264,12 @@
PKG_PPP => [ qw/PKG_PPP_WANT_FILTER/ ],
PKG_SKELL => [ qw/PKG_SKELL_WANT_TERMINFO PKG_NSS_MDNS/ ],
PKG_DBUS => [ qw/PKG_AVAHI/ ],
- PKG_CAIRO => [ qw/PKG_XORG_SERVER/ ],
+ PKG_CAIRO => [ qw/PKG_XORG_SERVER
+ 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/ ],
PKG_BZIP2 => [ qw/PKG_BZIP2_WANT_SHARED/ ]
};
Index: config/userspace/packages.lkc
===================================================================
RCS file: /sources/ltib/ltib/config/userspace/packages.lkc,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- config/userspace/packages.lkc 4 Mar 2012 17:41:54 -0000 1.48
+++ config/userspace/packages.lkc 4 Mar 2012 18:24:30 -0000 1.49
@@ -316,11 +316,34 @@
config PKG_CAIRO
depends CAP_HAS_MMU
select PKG_LIBPNG
- select PKG_DIRECTFB
+ select PKG_FONTCONFIG
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"
+ default y
+
+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
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- dist/lfs-5.1/cairo/cairo.spec 24 Aug 2009 09:30:14 -0000 1.2
+++ dist/lfs-5.1/cairo/cairo.spec 4 Mar 2012 18:24:30 -0000 1.3
@@ -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
--- End Message ---