Bug 224354

Summary: [PATCH] graphics/imlib2: fix X11 dependency (again)
Product: Ports & Packages Reporter: Dominik Honnef <dominik>
Component: Individual Port(s)Assignee: Niclas Zeising <zeising>
Status: Closed FIXED    
Severity: Affects Only Me Keywords: patch
Priority: --- Flags: zeising: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
imlib2 patch fixing --without-x11 builds none

Description Dominik Honnef 2017-12-15 02:15:35 UTC
Created attachment 188849 [details]
imlib2 patch fixing --without-x11 builds

When imlib2 is built without support for X11, Imlib2.h #includes X11/Xlib.h conditionally, guarded by an #ifndef X_DISPLAY_MISSING – X_DISPLAY_MISSING, however, isn't set, causing Imlib2.h to unsuccessfully include the header. This was previously addressed in bug #187147 by patching Imlib2.h, but the patch isn't working anymore, for two reasons.

1) When the Makefile was updated to use the new, conditional version of post-patch, the condition was accidentally negated, applying the patch only when imlib2 was being built *with* X11 support (bug #210609)

2) Whitespace around the macros in Imlib2.h changed.

The attached patch fixes both.
Comment 1 commit-hook freebsd_committer 2017-12-31 12:42:53 UTC
A commit references this bug:

Author: zeising
Date: Sun Dec 31 12:42:19 UTC 2017
New revision: 457685
URL: https://svnweb.freebsd.org/changeset/ports/457685

Log:
  Properly fix when X11 option is off.

  When the X11 option is off, there are still things in the Imlib2.h header
  that uses X11, fix this by removing those bits when building without X11.

  PR:		224354
  Submitted by:	Dominik Honnef

Changes:
  head/graphics/imlib2/Makefile
Comment 2 Niclas Zeising freebsd_committer 2017-12-31 12:44:50 UTC
Fixed, apologies for taking so long to get to this.