pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CMAKE_INSTALL_PREFIX is not configurable [WAS: Re: how to create a package installing into a separate directory?]



On 2011/10/29 08:06, norc1212 wrote:
On 2011/10/28 09:02, norc1212 wrote:
...

To follow up, I see there is no way to configure
CMAKE_INSTALL_PREFIX. This comes from mk/configure/cmake.mk:

CMAKE_ARGS+= -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX}

On the other hand mk/configure/gnu-configure.mk works this
way:

GNU_CONFIGURE_PREFIX?= ${PREFIX}
CONFIGURE_ARGS+= --prefix=${GNU_CONFIGURE_PREFIX:Q}

What about the following change:

--- mk/configure/cmake.mk.orig 2011-01-13 02:01:04.000000000 +0100
+++ mk/configure/cmake.mk 2011-10-28 22:51:04.000000000 +0200
@@ -18,7 +18,8 @@

_CMAKE_DIR= ${BUILDLINK_DIR}/cmake-Modules

-CMAKE_ARGS+= -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX}
+CMAKE_INSTALL_PREFIX?= ${PREFIX}
+CMAKE_ARGS+= -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
CMAKE_ARGS+= -DCMAKE_MODULE_PATH:PATH=${_CMAKE_DIR}
.if ${OPSYS} != "Darwin"
CMAKE_ARGS+= -DCMAKE_SKIP_RPATH:BOOL=TRUE

This fixed my cmake-based packages. While CMAKE_INSTALL_PREFIX
seems to me to be a "natural" way to configure the install
destination there may be better ways to resolve the issue.
Any comment from the initiated?

Excuse me reviving this thread. In summary, there is
a disparity in the configuration phase:
- packages which use GNU configure can define their
  install directory using GNU_CONFIGURE_PREFIX
- packages which use cmake have no way

I suggested the patch above. Sure, I can handle it for
my needs locally but IMHO it is an systematic issue
and there should be some cmake's equivalent of
GNU_CONFIGURE_PREFIX.

I would like to get any response or comment - "non-issue,
take care locally" at least, "on a right track, just
fix this and that and we can get it committed" at best.
Still a beginner with pkgsrc but willing to learn.

Thanks in advance
norc


Home | Main Index | Thread Index | Old Index