openbsd-ports/devel/meson/meson.port.mk

65 lines
1.9 KiB
Makefile
Raw Normal View History

2017-11-02 15:46:39 +00:00
# $OpenBSD: meson.port.mk,v 1.12 2017/11/02 15:46:39 ajacoutot Exp $
BUILD_DEPENDS += devel/meson>=0.43.0p1
SEPARATE_BUILD ?= Yes
MODMESON_WANTCOLOR ?= No
.if ${MODMESON_WANTCOLOR:L} == "no"
CONFIGURE_ENV += TERM="dumb"
.endif
.for solib sover in ${SHARED_LIBS}
CONFIGURE_ENV += LIB${solib}_VERSION=${sover}
.endfor
.if empty(CONFIGURE_STYLE)
CONFIGURE_STYLE= meson
.endif
.if ! empty(INSTALL_STRIP)
CONFIGURE_ARGS += --strip
.endif
2017-11-02 15:13:37 +00:00
# don't use "-Wl,--no-undefined" nor "-zdefs" when linking"; OpenBSD does not
# link libc into shared-libraries by default to avoid binding libraries to
# specific libc majors, so those options have always suffered false positives
CONFIGURE_ARGS += -Db_lundef=false
2017-06-25 11:24:29 +00:00
# from ${LOCALBASE}/bin/meson:
# Warn if the locale is not UTF-8. This can cause various unfixable issues
# such as os.stat not being able to decode filenames with unicode in them.
# There is no way to reset both the preferred encoding and the filesystem
# encoding, so we can just warn about it.
MAKE_ENV += LC_CTYPE="en_US.UTF-8"
MODMESON_configure= ${SETENV} CC="${CC}" CFLAGS="${CFLAGS}" CXX="${CXX}" \
CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" \
LC_CTYPE="en_US.UTF-8" ${CONFIGURE_ENV} \
${LOCALBASE}/bin/meson --buildtype=plain \
2017-04-27 09:02:32 +00:00
--prefix "${PREFIX}" --mandir="${PREFIX}/man" \
2017-04-27 09:00:01 +00:00
--sysconfdir="${SYSCONFDIR}" \
2017-11-02 15:46:39 +00:00
--localstatedir="${LOCALSTATEDIR}" \
2017-04-27 09:00:01 +00:00
${CONFIGURE_ARGS} ${WRKSRC} ${WRKBUILD}
.if !target(do-build)
do-build:
exec ${SETENV} ${MAKE_ENV} \
${LOCALBASE}/bin/ninja -C ${WRKBUILD} -v -j ${MAKE_JOBS}
.endif
.if !target(do-install)
do-install:
exec ${SETENV} ${MAKE_ENV} ${FAKE_SETUP} \
${LOCALBASE}/bin/ninja -C ${WRKBUILD} ${FAKE_TARGET}
.endif
.if !target(do-test)
do-test:
exec ${SETENV} ${ALL_TEST_ENV} \
${LOCALBASE}/bin/ninja -C ${WRKBUILD} ${TEST_TARGET}
.endif
# XXX hardcoded
# make our life easier
MODMESON_pre-configure += ln -sf ${LOCALBASE}/bin/python3.6 ${WRKDIR}/bin/python3