From f473757692fe466a5202dbffebbbe54bfd012af0 Mon Sep 17 00:00:00 2001 From: John (J5) Palmieri Date: Aug 18 2011 19:32:04 +0000 Subject: update to upstream 1.10.0 --- diff --git a/.gitignore b/.gitignore index ebdb0cf..5babf54 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /pycairo-1.8.10.tar.bz2 +/pycairo-1.10.0.tar.bz2 diff --git a/0001-Add-support-for-libdir.patch b/0001-Add-support-for-libdir.patch deleted file mode 100644 index cfd54d6..0000000 --- a/0001-Add-support-for-libdir.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 2fbc506f34ea0844b9cda366a8031dd022efcc09 Mon Sep 17 00:00:00 2001 -From: Steve Chaplin <> -Date: Sat, 18 Sep 2010 04:29:45 +0800 -Subject: [PATCH 1/4] Add support for - ./waf configure --libdir=XXX - Fixes #30230. - ---- - -diff --git a/src/wscript b/src/wscript -index 7fdeffc..ca51a88 100644 ---- a/src/wscript -+++ b/src/wscript -@@ -7,12 +7,15 @@ d = 'src' - - def build(ctx): - print(' %s/build()' %d) -+ pycairoLibDir = os.path.join(ctx.env['LIBDIR'], -+ 'python'+ctx.env['PYTHON_VERSION'], -+ 'site-packages', 'cairo') - - # .py files - ctx.new_task_gen( - features = 'py', - source = '__init__.py', -- install_path = '${PYTHONDIR}/cairo', -+ install_path = pycairoLibDir, - ) - - # C extension module -@@ -22,7 +25,7 @@ def build(ctx): - target = '_cairo', - includes = '.', - uselib = 'CAIRO', -- install_path = '${PYTHONDIR}/cairo', -+ install_path = pycairoLibDir, - ) - - # C API -diff --git a/wscript b/wscript -index 91ebe93..a55ae55 100644 ---- a/wscript -+++ b/wscript -@@ -13,6 +13,7 @@ cairo_version_required = '1.8.10' - - def set_options(ctx): - print(' %s/set_options()' %d) -+ ctx.tool_options('gnu_dirs') - ctx.tool_options('compiler_cc') - ctx.tool_options('python') # options for disabling pyc or pyo compilation - -@@ -28,6 +29,7 @@ def configure(ctx): - print(' %s/configure()' %d) - - env = ctx.env -+ ctx.check_tool('gnu_dirs') - ctx.check_tool('misc') - ctx.check_tool('compiler_cc') - ctx.check_tool('python') -@@ -48,8 +50,8 @@ def configure(ctx): - - ctx.write_config_header('src/config.h') - -- import Options -- print("%-40s : %s" % ('Prefix', Options.options.prefix)) -+ print("%-40s : %s" % ('PREFIX', env['PREFIX'])) -+ print("%-40s : %s" % ('LIBDIR', env['LIBDIR'])) - - - def build(ctx): -@@ -65,12 +67,7 @@ def build(ctx): - 'prefix' : ctx.env['PREFIX'], - 'includedir': os.path.join(ctx.env['PREFIX'], 'include'), - } -- obj.install_path = os.path.join(ctx.env['PREFIX'], 'lib', 'pkgconfig') -- -- --#def dist(): # create archives of project --# print(' %s/dist()' %d) --# dist is predefined -+ obj.install_path = os.path.join(ctx.env['LIBDIR'], 'pkgconfig') - - - def dist_hook(): --- -1.7.2.3 - diff --git a/0001-use-PyCapsule-API-instead-of-the-deprecated-PyCObjec.patch b/0001-use-PyCapsule-API-instead-of-the-deprecated-PyCObjec.patch deleted file mode 100644 index 67a1b47..0000000 --- a/0001-use-PyCapsule-API-instead-of-the-deprecated-PyCObjec.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 9d0e3399dfd0e1d34723d21607de1682d9dd3f01 Mon Sep 17 00:00:00 2001 -From: John (J5) Palmieri -Date: Tue, 28 Sep 2010 15:49:37 -0400 -Subject: [PATCH] use PyCapsule API instead of the deprecated PyCObject API - -* PyCObject is deprecated in 3.1 and removed in 3.2 ---- - src/cairomodule.c | 2 +- - src/py3cairo.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/cairomodule.c b/src/cairomodule.c -index 58e665c..144757a 100644 ---- a/src/cairomodule.c -+++ b/src/cairomodule.c -@@ -377,7 +377,7 @@ PyInit__cairo(void) - (PyObject *)&PycairoXlibSurface_Type); - #endif - -- PyModule_AddObject(m, "CAPI", PyCObject_FromVoidPtr(&CAPI, NULL)); -+ PyModule_AddObject(m, "CAPI", PyCapsule_New(&CAPI, "cairo.CAPI", NULL)); - - /* constants */ - #if CAIRO_HAS_ATSUI_FONT -diff --git a/src/py3cairo.h b/src/py3cairo.h -index 35b4240..d919d3c 100644 ---- a/src/py3cairo.h -+++ b/src/py3cairo.h -@@ -199,7 +199,7 @@ typedef struct { - * 2) Add 'Pycairo_IMPORT;' to the init function - */ - #define Pycairo_IMPORT \ -- Pycairo_CAPI = (Pycairo_CAPI_t*) PyCObject_Import("cairo", "CAPI") -+ Pycairo_CAPI = (Pycairo_CAPI_t*) PyCapsule_Import("cairo.CAPI", 0) - - #endif /* ifndef _INSIDE_PYCAIRO_ */ - --- -1.7.2.3 - diff --git a/pycairo-1.8.10-pypath.patch b/pycairo-1.8.10-pypath.patch deleted file mode 100644 index 07d4e1b..0000000 --- a/pycairo-1.8.10-pypath.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -up wafadmin/Tools/python.py.pypath wafadmin/Tools/python.py ---- wafadmin/Tools/python.py.pypath 2011-02-10 15:30:44.118506004 -0500 -+++ wafadmin/Tools/python.py 2011-02-10 15:32:50.922506002 -0500 -@@ -156,6 +156,9 @@ MACOSX_DEPLOYMENT_TARGET = %r - env.append_value('LINKFLAGS_PYEMBED',python_LDFLAGS.split()) - result=False - name='python'+env['PYTHON_VERSION'] -+ python_config=conf.find_program('python%s-config'%('.'.join(env['PYTHON_VERSION'].split('.')[:2])),var='PYTHON_CONFIG') -+ if not python_config: -+ python_config=conf.find_program('python-config-%s'%('.'.join(env['PYTHON_VERSION'].split('.')[:2])),var='PYTHON_CONFIG') - if python_LIBDIR is not None: - path=[python_LIBDIR] - conf.log.write("\n\n# Trying LIBDIR: %r\n"%path) -@@ -169,6 +172,12 @@ MACOSX_DEPLOYMENT_TARGET = %r - path=[os.path.join(python_prefix,"libs")] - name='python'+env['PYTHON_VERSION'].replace('.','') - result=conf.check(lib=name,uselib='PYEMBED',libpath=path) -+ if not result and python_config: -+ conf.log.write("\n\n# try again with help of python-config\n") -+ for libstr in Utils.cmd_output("%s %s --libs"%(python,python_config)).strip().split(): -+ if(libstr.startswith('-lpython')): -+ name=libstr[2:] -+ result=conf.check(lib=name,uselib='PYEMBED',libpath=path) - if result: - env['LIBPATH_PYEMBED']=path - env.append_value('LIB_PYEMBED',name) -@@ -177,9 +186,6 @@ MACOSX_DEPLOYMENT_TARGET = %r - if(sys.platform=='win32'or sys.platform.startswith('os2')or sys.platform=='darwin'or Py_ENABLE_SHARED): - env['LIBPATH_PYEXT']=env['LIBPATH_PYEMBED'] - env['LIB_PYEXT']=env['LIB_PYEMBED'] -- python_config=conf.find_program('python%s-config'%('.'.join(env['PYTHON_VERSION'].split('.')[:2])),var='PYTHON_CONFIG') -- if not python_config: -- python_config=conf.find_program('python-config-%s'%('.'.join(env['PYTHON_VERSION'].split('.')[:2])),var='PYTHON_CONFIG') - includes=[] - if python_config: - for incstr in Utils.cmd_output("%s %s --includes"%(python,python_config)).strip().split(): diff --git a/python3-cairo.spec b/python3-cairo.spec index ec7aa4a..c6a5f6c 100644 --- a/python3-cairo.spec +++ b/python3-cairo.spec @@ -1,10 +1,10 @@ -%define cairo_version 1.8.10 +%define cairo_version 1.10.2 ### Abstract ### Name: python3-cairo -Version: 1.8.10 -Release: 12%{?dist} +Version: 1.10.0 +Release: 1%{?dist} License: MPLv1.1 or LGPLv2 Group: Development/Languages Summary: Python 3 bindings for the cairo library @@ -12,16 +12,6 @@ URL: http://cairographics.org/pycairo BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Source: http://cairographics.org/releases/pycairo-%{version}.tar.bz2 -Patch0: 0001-Add-support-for-libdir.patch -Patch1: 0001-use-PyCapsule-API-instead-of-the-deprecated-PyCObjec.patch - -# Patch to the embedded copy of waf to fix compiling against python 3.2 -# (due to PEP-3149), by using the appropriate python-config tool, rather -# than trying to find the libraries by directly using PYTHON_VERSION -# -# Not yet sent upstream -Patch3: pycairo-1.8.10-pypath.patch - ### Build Dependencies ### BuildRequires: cairo-devel >= %{cairo_version} @@ -45,8 +35,6 @@ libraries so that they interoperate with python3-cairo. %prep %setup -q -n pycairo-%{version} -%patch0 -p1 -b .add_libdir -%patch1 -p1 -b .use_pycapsule # Ensure that ./waf has created the cached unpacked version # of the wafadmin source tree. @@ -54,16 +42,12 @@ libraries so that they interoperate with python3-cairo. # .waf3-1.5.18-a7b91e2a913ce55fa6ecdf310df95752 python3 ./waf --version -# Patch the unpacked version of waf: -pushd .waf3* -%patch3 -p0 -b .pypath -popd - %build # FIXME: we should be using the system version of waf (e.g. %{_bindir}/waf) # however it is not yet python 3 compatible but should be when 1.6.0 # is released - https://bugzilla.redhat.com/show_bug.cgi?id=637935 -export CFLAGS="$RPM_OPT_FLAGS" +export CFLAGS="$RPM_OPT_FLAGS" +export PYTHON=python3 python3 ./waf --prefix=%{_usr} \ --libdir=%{_libdir} \ configure @@ -99,6 +83,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/py3cairo.pc %changelog +* Thu Aug 18 2011 John (J5) Palmieri - 1.10.0-1 +- update to upstream 1.10.0 + * Thu Feb 10 2011 John (J5) Palmieri - 1.8.10-12 - remove cairo_rectangle_int_t patch as it was rejected upstream and is no longer needed diff --git a/sources b/sources index 0f31da9..f133ef3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ddc544943d791e3c22ca8f019e10e1e3 pycairo-1.8.10.tar.bz2 +e6fd3f2f1e6a72e0db0868c4985669c5 pycairo-1.10.0.tar.bz2