openbsd-ports/devel/cmake/cmake.port.mk
espie eab92da0b6 fix shared library numbers for OpenBSD. Patch may still change, but it
appears to work fine w/ kde4.

cmake will still generate a libfoo.so (which is useful as a placeholder to
know the lib has been built, since other directories don't have access to
the version number), but it obeys OpenBSD conventions for the actual library
now.

ld does the right thing, namely it ignores the libfoo.so and links against
libfoo.so.5.0 properly.

Also take environment into account to allow the ports tree to override
version numbers.

Todo: logfile of built libraries.
2007-03-26 21:27:44 +00:00

20 lines
494 B
Makefile

# $OpenBSD: cmake.port.mk,v 1.2 2007/03/26 21:27:44 espie Exp $
BUILD_DEPENDS+= ::devel/cmake
.for _n _v in ${SHARED_LIBS}
CONFIGURE_ENV+=LIB${_n}_VERSION=${_v}
MAKE_ENV+=LIB${_n}_VERSION=${_v}
.endfor
.if empty(CONFIGURE_STYLE)
CONFIGURE_STYLE= cmake
.endif
MODCMAKE_configure= cd ${WRKBUILD} && ${_SYSTRACE_CMD} ${SETENV} \
CC="${CC}" CFLAGS="${CFLAGS}" \
CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
${CONFIGURE_ENV} ${LOCALBASE}/bin/cmake ${CONFIGURE_ARGS} ${WRKSRC}
REGRESS_TARGET?= test