Bug 202083 - print/freetype2: ftconfig.h TYPEOF shadows other TYPEOFs
Summary: print/freetype2: ftconfig.h TYPEOF shadows other TYPEOFs
Status: Closed FIXED
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:
Depends on:
Blocks:
 
Reported: 2015-08-04 17:35 UTC by Rainer Hurling
Modified: 2015-12-10 22:16 UTC (History)
2 users (show)

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


Attachments
patch to change TYPEOF into FT_TYPEOF (3.90 KB, patch)
2015-08-04 17:35 UTC, Rainer Hurling
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Hurling freebsd_committer freebsd_triage 2015-08-04 17:35:43 UTC
Created attachment 159544 [details]
patch to change TYPEOF into FT_TYPEOF

I had some trouble trying to build the package 'Cairo-1.5.8.tar.gz' [1] for math/R. It turns out, that there is an underlying problem with print/freetype2 (thanks to Simon Urbanek from the R Project for his help on this).

In [2] Tim Smith explained, that "ftconfig.h exports a TYPEOF macro that can conflict with and shadow macros with the same name in client applications. This breaks building the current version of the R programming language interpreter against the current version of freetype when cairo support is enabled (though R only uses freetype if pango support is disabled). It would be nice if the macro was called FT_TYPEOF or something similar."

This work is done on the GitHub master of freetype2, but not released until now [3].

I filed a patch against freetype2 version 2.6 in the ports tree, which only changes TYPEOF() into FT_TYPEOF(). No other commits of the freetype2 master on GitHub are included. So this patched port should have no functional changes, except the TYPEOF() problem.

[1] http://cran.at.r-project.org/web/packages/Cairo/index.html
[2] https://savannah.nongnu.org/bugs/index.php?45376
[3] http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=5931268eecaeda3e05580bdc8885348fecc43fa8
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-12-10 22:14:27 UTC
A commit references this bug:

Author: kwm
Date: Thu Dec 10 22:13:59 UTC 2015
New revision: 403474
URL: https://svnweb.freebsd.org/changeset/ports/403474

Log:
  Update freetype2 to 2.6.2. [1]

  Mark magicpoint broken, maintainer is notified.

  Exp-runs run by antoine@

  This version also fixes shadowing of TYPEOF in ftconfig.h [2]

  PR:		203554 [1], 202083 [2]
  Submitted by:	rhurlin@gwdg.de [2]

Changes:
  head/audio/lmms/files/patch-plugins_zynaddsubfx_fltk_CMakeLists.txt
  head/graphics/libprojectm/files/patch-cmake_FindFreetype2.cmake
  head/graphics/xpaint/Makefile
  head/graphics/xpaint/files/patch-configure
  head/graphics/xpaint/files/patch-rw_configure
  head/misc/magicpoint/Makefile
  head/multimedia/ffmpeg0/Makefile
  head/print/freetype2/Makefile
  head/print/freetype2/distinfo
  head/print/freetype2/files/patch-5cd2155
  head/print/freetype2/files/patch-builds_unix_detect.mk
  head/print/freetype2/pkg-plist
  head/www/firefox/files/patch-1194520
  head/www/seamonkey/files/patch-1194520
  head/x11-fm/xfe/files/patch-configure
  head/x11-fonts/fontmatrix/files/patch-cmake__modules__FREETYPEConfig.cmake
Comment 2 Koop Mast freebsd_committer freebsd_triage 2015-12-10 22:16:34 UTC
Freetype update committed that contained the fix. Thanks for the detailed report.