Bug 195953 - [patch] graphics/py3-cairo: Fails to build with python3.4 on amd64
Summary: [patch] graphics/py3-cairo: Fails to build with python3.4 on amd64
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-gnome (Nobody)
URL:
Keywords: easy, needs-qa, patch
Depends on:
Blocks:
 
Reported: 2014-12-13 22:18 UTC by rsmith
Modified: 2015-01-15 11:37 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments
Patch for the port Makefile. (382 bytes, patch)
2014-12-13 22:18 UTC, rsmith
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description rsmith 2014-12-13 22:18:13 UTC
Created attachment 150552 [details]
Patch for the port Makefile.

Python 3.4 is installed:

  > pkg info -x python
  py34-ipython-2.3.0
  python-2.7_2,2
  python-doc-html-2.7.8
  python2-2_3
  python27-2.7.8_6
  python3-3_2
  python34-3.4.2_1

Trying to build graphics/py3-cairo:
----------
root:/usr/ports/graphics/py3-cairo # make
===>  Found saved configuration for cairo-1.10.2_5,2
===>   py34-cairo-1.10.0_2 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by py34-cairo-1.10.0_2 for building
===>  Extracting for py34-cairo-1.10.0_2
=> SHA256 Checksum OK for pycairo-1.10.0.tar.bz2.
===>  Patching for py34-cairo-1.10.0_2
===>  Applying FreeBSD patches for py34-cairo-1.10.0_2
===>   py34-cairo-1.10.0_2 depends on executable: pkgconf - found
===>   py34-cairo-1.10.0_2 depends on file: /usr/local/bin/python3.4 - found
===>   py34-cairo-1.10.0_2 depends on executable: python3 - found
===>   py34-cairo-1.10.0_2 depends on shared library: libcairo.so - found (/usr/local/lib/libcairo.so.2.11200.18)
===>  Configuring for py34-cairo-1.10.0_2
  ./options()
Setting top to                           : /usr/ports/graphics/py3-cairo/work/pycairo-1.10.0 
Setting out to                           : /usr/ports/graphics/py3-cairo/work/pycairo-1.10.0/build_directory 
  ./configure()
Checking for 'gcc' (c compiler)          : ok 
Checking for program python              : /usr/local/bin/python3.4 
Checking for python version              : (3, 4, 2, 'final', 0) 
Checking for library python3.4 in LIBDIR : not found 
Checking for library python3.4 in python_LIBPL : not found 
Checking for library python3.4 in $prefix/libs : not found 
Checking for library python3.4m in LIBDIR      : yes 
Checking for program python3.4-config          : /usr/local/bin/python3.4-config 
command ['/usr/local/bin/python3.4', '/usr/local/bin/python3.4-config', '--includes'] returned 1
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/py3-cairo
----------

The program usr/local/bin/python3.4-config is a shell-script, so it is not surprising that this doesn't work!

Unfortunately the code for the build tool waf is dense, badly formatted and undocumented.

For the build to succeed, the following needed to be added to the CONFIGURE_ENV
in the port Makefile:

   PYTHON_CONFIG="/usr/local/lib/python3.4/config-3.4m/python-config.py"

This can be generalized to:

   PYTHON_CONFIG=${PYTHONPREFIX_LIBDIR}/config-${PYTHON_VER}m/python-config.py

This is added to CONFIGURE_ENV via the attached patch.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-12-13 22:18:13 UTC
Auto-assigned to maintainer gnome@FreeBSD.org
Comment 2 Koop Mast freebsd_committer freebsd_triage 2015-01-15 11:37:04 UTC
This was fixed in revision 376593.