Bug 224354 - [PATCH] graphics/imlib2: fix X11 dependency (again)
Summary: [PATCH] graphics/imlib2: fix X11 dependency (again)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Niclas Zeising
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-12-15 02:15 UTC by Dominik Honnef
Modified: 2017-12-31 12:44 UTC (History)
0 users

See Also:
zeising: maintainer-feedback+


Attachments
imlib2 patch fixing --without-x11 builds (486 bytes, patch)
2017-12-15 02:15 UTC, Dominik Honnef
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.