Bug 210741

Summary: /graphics/mupdf Compile failed in gmake
Product: Ports & Packages Reporter: drhowarddrfine
Component: Individual Port(s)Assignee: Pawel Pekala <pawel>
Status: Closed FIXED    
Severity: Affects Only Me CC: jakub_lach, pawel, tobik, uzsolt
Priority: ---    
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
Portmaster output
none
mupdf.diff uzsolt: maintainer-approval+

Description drhowarddrfine 2016-07-01 12:27:10 UTC
Created attachment 172000 [details]
Portmaster output

Tried to upgrade to mupdf-1.9a,1 Attached output of failed compile.
Comment 1 drhowarddrfine 2016-07-01 12:28:59 UTC
FreeBSD-10.3-RELEASE-p4
Comment 2 Baptiste Daroussin freebsd_committer freebsd_triage 2016-07-01 12:46:14 UTC
Just for maintainer information, mupdf fails are building if mupdf is already installed
Comment 3 Tobias Kortkamp freebsd_committer freebsd_triage 2016-07-01 16:36:23 UTC
(In reply to Baptiste Daroussin from comment #2)
I couldn't replicate this with mupdf-1.9a,1 already installed, so I downgraded to mupdf-1.8 first and tried building mupdf-1.9a,1 again. The build failed almost immediately.

My guess is that the port tries to use headers from /usr/local/include during the build, which fails if an older version is installed.
Comment 4 Tobias Kortkamp freebsd_committer freebsd_triage 2016-07-01 16:41:09 UTC
Created attachment 172011 [details]
mupdf.diff

Sorry for spamming, but the fix was really easy. See patch.
Comment 5 Zsolt Udvari freebsd_committer freebsd_triage 2016-07-01 17:50:00 UTC
(In reply to Baptiste Daroussin from comment #2)
Thanks Baptiste, it was my idea too but I hadn't time to see it.
It was a (legacy) hack in the previous version which add '-I${LOCALBASE}/include' to CFLAGS in mupdf's Makefile and I thought it's required so I moved into CFLAGS of port's Makefile.
Sorry my fault and thanks the report and your helps.
Comment 6 commit-hook freebsd_committer freebsd_triage 2016-07-02 11:42:18 UTC
A commit references this bug:

Author: pawel
Date: Sat Jul  2 11:41:26 UTC 2016
New revision: 417928
URL: https://svnweb.freebsd.org/changeset/ports/417928

Log:
  Remove -I${LOCALBASE}/include from CFLAGS, it leads to
  broken build when older version is already installed on the
  system. Newer mupdf tries to build against old headers and in
  meanwhile API has changed considerably.

  PR:		210741
  Submitted by:	Tobias Kortkamp
  Reported by:	drhowarddrfine@charter.net

Changes:
  head/graphics/mupdf/Makefile