Bug 193067 - textproc/antiword broken looking for mapping file (and other path issues)
Summary: textproc/antiword broken looking for mapping file (and other path issues)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-27 14:45 UTC by John Hein
Modified: 2014-08-29 19:43 UTC (History)
3 users (show)

See Also:


Attachments
fix mapping file search & other prefix issues; look for fonts in LOCALBASE, not PREFIX (824 bytes, text/plain)
2014-08-27 14:45 UTC, John Hein
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2014-08-27 14:45:29 UTC
Created attachment 146379 [details]
fix mapping file search & other prefix issues; look for fonts in LOCALBASE, not PREFIX

antiword-0.37_2 broke as of r361831.

Now, running it gives:

If path in antiword.h not fixed, you get:

===================
I can't open your mapping file (UTF-8.txt)
It is not in '/h/jhein/.antiword' nor in '/usr/share/antiword'.
        Name: antiword
        Purpose: Display MS-Word files
        Author: (C) 1998-2005 Adri van Os
        Version: 0.37  (21 Oct 2005)
        Status: GNU General Public License
        Usage: antiword [switches] wordfile1 [wordfile2 ...]
        Switches: [-f|-t|-a papersize|-p papersize|-x dtd][-m mapping][-w #][-i #][-Ls]
                -f formatted text output
                -t text output (default)
                -a <paper size name> Adobe PDF output
                -p <paper size name> PostScript output
                   paper size like: a4, letter or legal
                -x <dtd> XML output
                   like: db (DocBook)
                -m <mapping> character mapping file
                -w <width> in characters of text output
                -i <level> image level (PostScript only)
Beginning of bufferuse landscape mode (PostScript only)                                                                                             -r Show removed text
                -s Show hidden (by Word) text
===================

That's because of the /usr/share in antiword.h

Also, fontinfo.pl should replace /usr/share with ${LOCALBASE}/share, not ${PREFIX}/share.

And if you build with PREFIX != /usr/local, then the /usr/local/bin in the Makefile will make a packaging failure.

Before r361831, the 'find | xargs sed' found all the instances of /usr/local and /usr/share and replaced them.  After that was removed, some cases of these hard-coded paths were missed.

Attached is a patch to address these issues.
Comment 1 John Hein 2014-08-27 14:46:23 UTC
Add maintainer.
Comment 2 commit-hook freebsd_committer freebsd_triage 2014-08-28 19:59:57 UTC
A commit references this bug:

Author: leeym
Date: Thu Aug 28 19:59:16 UTC 2014
New revision: 366452
URL: http://svnweb.freebsd.org/changeset/ports/366452

Log:
  - fix mapping file search & other prefix issues; look for fonts in LOCALBASE, not PREFIX

  PR:		193067
  Submitted by:	z7dr6ut7gs@snkmail.com

Changes:
  head/textproc/antiword/Makefile
Comment 3 Carlo Strub freebsd_committer freebsd_triage 2014-08-29 19:43:01 UTC
Committed. Thank you very much.