Opened 14 years ago

Closed 14 years ago

#23420 closed defect (fixed)

qhull-2010.1 Fix list and location of installed header files

Reported by: davidm@… Owned by: mamoll (Mark Moll)
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: haspatch Cc: jjstickel@…
Port: qhull

Description

qhull 2010.1 uses a new build system based on cmake. The earlier version (2003.1) used autotools. The new build system installs an incomplete set of header files thereby breaking existing programs the use them. It also creates only a static library; no shared library.

The two attached files (one patch for Portfile and one new patch file for the "files" subdir) fix both of these problems. The changes to src/CMakeLists.txt come courtesy of the PLplot development team (thanks, guys!).

Dave

Attachments (2)

Portfile-qhull.patch (511 bytes) - added by davidm@… 14 years ago.
patch-src-CMakeLists.txt.diff (2.5 KB) - added by davidm@… 14 years ago.

Download all attachments as: .zip

Change History (9)

Changed 14 years ago by davidm@…

Attachment: Portfile-qhull.patch added

Changed 14 years ago by davidm@…

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Keywords: haspatch added
Owner: changed from macports-tickets@… to mmoll@…

Please remember to cc the maintainer.

comment:2 Changed 14 years ago by mamoll (Mark Moll)

The latest version of the qhull port is for qhull 2010.1. It should install both the static and dynamic libraries, and the header file libqhull.h. Is this not working for you?

comment:3 Changed 14 years ago by davidm@…

My comments about qhull 2010.1 only creating a static library were, I think, only valid for the unpatched qhull distribution. The qhull port already includes patches to generate a shared library. Sorry about that part of my report, but...

The libqhull.h header file alone is not sufficient. One of the first things it does is...

#include "user.h"

...where user.h is another qhull include file that does not get installed by the 2010.1 install process. The new src/CMakeLists.txt file I attached installs all (or at least more of) the qhull headers (including libqhull.h) in /opt/local/include/qhull. The include file needed for PLplot is "qhull/qhull_a.h"; that's how I discovered the problem. The PLplot developers are working with the qhull developers to get this change incorporated upstream, but until then this new src/CMakeLists.txt file (and the small patch to the Portfile) is necessary, AFAICT.

comment:4 Changed 14 years ago by jjstickel@…

Cc: jjstickel@… added

Cc Me!

comment:5 Changed 14 years ago by mamoll (Mark Moll)

I incorporated a slightly simplified version of the attached patches in r63289. You will now also get the man pages. Let me know if this works for you.

comment:6 Changed 14 years ago by davidm@…

Seems good except that I think the headers should go in ${prefix}/include/qhull rather than just ${prefix}/include. Many of them are very generically named (e.g. io.h, mem.h, etc.) so leaving them in ".../include" seems like asking for trouble (plus existing client code expects to include them via #include <qhull/qhull_a.h>).

$ port contents qhull | grep include
  /opt/local/include/geom.h
  /opt/local/include/io.h
  /opt/local/include/libqhull.h
  /opt/local/include/mem.h
  /opt/local/include/merge.h
  /opt/local/include/poly.h
  /opt/local/include/qhull.h
  /opt/local/include/qhull_a.h
  /opt/local/include/qset.h
  /opt/local/include/random.h
  /opt/local/include/stat.h
  /opt/local/include/user.h

A simple change to the last line of files/patch-src-CMakeLists.txt.diff (r63289) takes care of that...

+install(FILES ${qhull_hdr} DESTINATION include/qhull)

$ port contents qhull | grep include
  /opt/local/include/qhull/geom.h
  /opt/local/include/qhull/io.h
  /opt/local/include/qhull/libqhull.h
  /opt/local/include/qhull/mem.h
  /opt/local/include/qhull/merge.h
  /opt/local/include/qhull/poly.h
  /opt/local/include/qhull/qhull.h
  /opt/local/include/qhull/qhull_a.h
  /opt/local/include/qhull/qset.h
  /opt/local/include/qhull/random.h
  /opt/local/include/qhull/stat.h
  /opt/local/include/qhull/user.h

comment:7 Changed 14 years ago by mamoll (Mark Moll)

Resolution: fixed
Status: newclosed

Done. See r63293. Closing this ticket.

Note: See TracTickets for help on using tickets.