[MacPorts] #29548: hugin-app: hardcodes prefix and applications_dir
#29548: hugin-app: hardcodes prefix and applications_dir -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: hvdwolf@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: hugin-app -------------------------------------+-------------------------------------- hugin-app's CMakeLists.txt file has hardcoded strings /opt/local and /Applications/MacPorts; this will do the wrong thing if the user is not using the default values of ${prefix} or ${applications_dir}. The port should fix CMakeLists.txt to handle these situations correctly. In fact there are several other source files that hardcode /opt/local and /sw which might need to be fixed as well. -- Ticket URL: <https://trac.macports.org/ticket/29548> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29548: hugin-app: hardcodes prefix and applications_dir -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: hvdwolf@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: hugin-app -------------------------------------+-------------------------------------- Comment(by hvdwolf@…): I do not exactly understand what you mean. The relevant part in the CMakeLists.txt file is: IF (CMAKE_INSTALL_PREFIX STREQUAL "/opt/local") # MacPorts SET(INSTALL_OSX_BUNDLE_DIR /Applications/MacPorts CACHE DOCSTRING "Install directory Hugin and HuginStitchProject application bundles") ELSE(CMAKE_INSTALL_PREFIX STREQUAL "/opt/local") # fink or other custom system. SET(INSTALL_OSX_BUNDLE_DIR ${CMAKE_INSTALL_PREFIX}/Applications CACHE DOCSTRING "Install directory Hugin and HuginStitchProject application bundles") ENDIF(CMAKE_INSTALL_PREFIX STREQUAL "/opt/local") This means that it looks to /opt/local by default on Apple, but if another CMAKE_INSTALL_PREFIX is specified it will take that one. I use it myself as well to define other locations for test builds (especially at /usr/local). I thought that macports set it's own CMAKE_INSTALL_PREFIX as part of the "PortGroup cmake 1.0" option. No matter whether macports is really in /opt or in some other location, the macports CMAKE_INSTALL_PREFIX will be picked up by the CMake file. Or doesn't macports set this cmake variable? Other files that possibly seem to hardcode /opt and /sw are the cmake macros FIND<whatever>. In these files also /usr, /usr/local, etcetera are hardcoded to make cmake find libraries/frameworks at places other than the system paths. If this hardcoded paths are also in other parts, please let me know. -- Ticket URL: <https://trac.macports.org/ticket/29548#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29548: hugin-app: hardcodes prefix and applications_dir ---------------------------+-------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Resolution: | Keywords: Port: hugin-app | ---------------------------+-------------------------------- Changes (by ryandesign@…): * owner: hvdwolf@… => macports-tickets@… -- Ticket URL: <https://trac.macports.org/ticket/29548#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#29548: hugin-app: hardcodes prefix and applications_dir ---------------------------+-------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Resolution: fixed | Keywords: Port: hugin-app | ---------------------------+-------------------------------- Changes (by ryandesign@…): * status: new => closed * resolution: => fixed Comment: Replying to [comment:1 hvdwolf@…]:
I do not exactly understand what you mean. The relevant part in the CMakeLists.txt file is:
{{{ IF (CMAKE_INSTALL_PREFIX STREQUAL "/opt/local") # MacPorts SET(INSTALL_OSX_BUNDLE_DIR /Applications/MacPorts CACHE DOCSTRING "Install directory Hugin and HuginStitchProject application bundles") ELSE(CMAKE_INSTALL_PREFIX STREQUAL "/opt/local") # fink or other custom system. SET(INSTALL_OSX_BUNDLE_DIR ${CMAKE_INSTALL_PREFIX}/Applications CACHE DOCSTRING "Install directory Hugin and HuginStitchProject application bundles") ENDIF(CMAKE_INSTALL_PREFIX STREQUAL "/opt/local") }}}
This says: if ${prefix} is /opt/local, then install the application to /Applications/MacPorts, otherwise install it to ${prefix}/Applications. That's not what we want. We always want to install the application to ${applications_dir}. The default for ${applications_dir} happens to be /Applications/MacPorts, but the user might have changed it. Fixed in r114003.
Other files that possibly seem to hardcode /opt and /sw are the cmake macros FIND<whatever>. In these files also /usr, /usr/local, etcetera are hardcoded to make cmake find libraries/frameworks at places other than the system paths. If this hardcoded paths are also in other parts, please let me know.
That would be a problem, but they seem to only check those hardcoded paths if pkgconfig is not found, but hugin-app does depend on pkgconfig so this should be fine. -- Ticket URL: <https://trac.macports.org/ticket/29548#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts