Created attachment 356438 [details] build log The subject ebuild fails to build in prefix (I have ~amd64-linux and ~x86-linux here). REQUIRED DEPENDENCIES AND EXTENSIONS numpy: yes [version 1.7.0] dateutil: yes [using dateutil version 2.1] tornado: yes [tornado was not found. It is required for the WebAgg backend. pip/easy_install may attempt to install it after matplotlib.] pyparsing: yes [using pyparsing version 2.0.1] pycxx: yes [pkg-config information for 'PyCXX' could not be found. Using local copy.] libagg: yes [pkg-config information for 'libagg' could not be found. Using local copy.] freetype: no [The C/C++ header for freetype2 (ft2build.h) could not be found. You may need to install the development package.] png: yes [version 1.6.3] media-libs/freetype-2.4.12 is installed in prefix but the headers do not exist on the host OS(s). I suspect the prefix include directory is not being searched for the ft2build.h header since it exists.
The following changes to the 1.3.0 ebuild do allow the freetype2 headers to be located in prefix and matplotlib does appear to build correctly: @@ -7,7 +7,7 @@ PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} ) PYTHON_REQ_USE='tk?' -inherit distutils-r1 eutils flag-o-matic +inherit distutils-r1 eutils flag-o-matic prefix DESCRIPTION="Pure python plotting library with matlab like syntax" HOMEPAGE="http://matplotlib.org/" @@ -115,6 +115,8 @@ # common switches. cat > "${BUILD_DIR}"/setup.cfg <<-EOF + [directories] + basedirlist = @GENTOO_PORTAGE_EPREFIX@/usr, /usr [provide_packages] pytz = False dateutil = False @@ -142,6 +144,8 @@ $(use_setup wxwidgets wx) EOF fi + + eprefixify "${BUILD_DIR}"/setup.cfg } wrap_setup() { but perhaps something else can be done without using the prefix eclass. Also the /usr may not be needed in basedirlist.
If you create the file from the ebuild, you as well can just use ${EPREFIX}, so you don't need to inherit prefix and call eprefixify afterwards. We typically use that on stuff that's on file already. Thanks!
Created attachment 359176 [details, diff] matplotlib-1.3.0.patch Taking suggestion from Fabian. Python herd, would you please review the patch for prefix? It is straightforward: I'll commit it if there is no objection within one week.
(In reply to Benda Xu from comment #3) > Created attachment 359176 [details, diff] [details, diff] > matplotlib-1.3.0.patch > > Taking suggestion from Fabian. Python herd, would you please review the > patch for prefix? It is straightforward: I'll commit it if there is no > objection within one week. If it helps ya, go for it.
Thanks, in tree. 22 Sep 2013; Benda Xu <heroxbd@gentoo.org> matplotlib-1.3.0.ebuild: set basedir into Prefix for headers and libraries, bug 481684. Credits to Steven.