Browse Source

upgrading package: cairo 1.2.6 -> 1.4.6

Ralf S. Engelschall 18 years ago
parent
commit
645a20fc40
2 changed files with 21 additions and 26 deletions
  1. 3 15
      cairo/cairo.patch
  2. 18 11
      cairo/cairo.spec

+ 3 - 15
cairo/cairo.patch

@@ -1,7 +1,7 @@
 Index: configure
---- configure.orig	2006-11-12 12:09:11 +0100
-+++ configure	2006-11-12 12:10:38 +0100
-@@ -26071,7 +26071,7 @@
+--- configure.orig	2007-05-01 22:25:17 +0200
++++ configure	2007-05-02 07:32:14 +0200
+@@ -27159,7 +27159,7 @@
  fi
  
      if test "x$freetype_pkgconfig" = "xyes"; then
@@ -10,15 +10,3 @@ Index: configure
      else
  
        if test -z "$FREETYPE_CONFIG"; then
-Index: src/cairoint.h
---- src/cairoint.h.orig	2006-11-02 23:53:40 +0100
-+++ src/cairoint.h	2006-11-12 12:09:11 +0100
-@@ -171,8 +171,6 @@
- #endif
- 
- #ifndef CAIRO_MUTEX_DECLARE
--# error "No mutex declarations. Cairo will not work with multiple threads." \
--	"(Remove this #error directive to acknowledge & accept this limitation)."
- # define CAIRO_MUTEX_DECLARE(name)
- # define CAIRO_MUTEX_DECLARE_GLOBAL(name)
- # define CAIRO_MUTEX_LOCK(name)

+ 18 - 11
cairo/cairo.spec

@@ -32,14 +32,15 @@ Distribution: OpenPKG Community
 Class:        EVAL
 Group:        Graphics
 License:      MIT-style
-Version:      1.2.6
-Release:      20061112
+Version:      1.4.6
+Release:      20070517
 
 #   package options
-%option       with_pdf   yes
-%option       with_ps    yes
-%option       with_png   yes
-%option       with_x11   yes
+%option       with_pdf      yes
+%option       with_ps       yes
+%option       with_png      yes
+%option       with_x11      yes
+%option       with_threads  yes
 
 #   list of sources
 Source0:      http://cairographics.org/releases/cairo-%{version}.tar.gz
@@ -50,8 +51,8 @@ Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
 BuildPreReq:  OpenPKG, openpkg >= 20040130, pkgconfig
 PreReq:       OpenPKG, openpkg >= 20040130
-BuildPreReq:  fontconfig, freetype, libpixman
-PreReq:       fontconfig, freetype, libpixman
+BuildPreReq:  fontconfig, freetype
+PreReq:       fontconfig, freetype
 %if "%{with_png}" == "yes"
 BuildPreReq:  png >= 1.2.8-20050204, zlib
 PreReq:       png >= 1.2.8-20050204, zlib
@@ -83,7 +84,7 @@ AutoReqProv:  no
     prog cairo = {
         version   = %{version}
         url       = http://cairographics.org/releases/
-        regex     = cairo-(__VER__)\.tar\.gz
+        regex     = \bcairo-(__VER__)\.tar\.gz
     }
 
 %prep
@@ -91,8 +92,6 @@ AutoReqProv:  no
     %patch -p0
 
 %build
-    ( echo "ac_cv_header_pthread_h=no"
-    ) >config.cache
     %{l_shtool} subst \
         -e 's;libpng12;libpng;g' \
         configure
@@ -107,6 +106,9 @@ AutoReqProv:  no
 %if "%{with_png}" == "yes"
     export PNG_CFLAGS="%{l_cppflags}"
     export PNG_LIBS="%{l_ldflags} -lpng -lz"
+%endif
+%if "%{with_threads}" != "yes"
+    CPPFLAGS="$CPPFLAGS -DCAIRO_NO_MUTEX=1"
 %endif
     export PKG_CONFIG="%{l_prefix}/bin/pkg-config"
     ./configure \
@@ -134,6 +136,11 @@ AutoReqProv:  no
         --enable-xlib \
 %else
         --disable-xlib \
+%endif
+%if "%{with_threads}" == "yes"
+        --enable-pthread \
+%else
+        --disable-pthread \
 %endif
         --enable-freetype \
         --disable-xcb \