pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel meson: Support CONFIGURE_DIRS et al.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/028cd8869fca
branches:  trunk
changeset: 340657:028cd8869fca
user:      nia <nia%pkgsrc.org@localhost>
date:      Sat Oct 05 20:09:52 2019 +0000

description:
meson: Support CONFIGURE_DIRS et al.

diffstat:

 devel/meson/build.mk    |  20 ++++++++++++++++----
 devel/py-meson/build.mk |  20 ++++++++++++++++----
 2 files changed, 32 insertions(+), 8 deletions(-)

diffs (90 lines):

diff -r d7763191455e -r 028cd8869fca devel/meson/build.mk
--- a/devel/meson/build.mk      Sat Oct 05 19:59:04 2019 +0000
+++ b/devel/meson/build.mk      Sat Oct 05 20:09:52 2019 +0000
@@ -1,7 +1,11 @@
-# $NetBSD: build.mk,v 1.1 2019/10/04 14:06:18 prlw1 Exp $
+# $NetBSD: build.mk,v 1.2 2019/10/05 20:09:52 nia Exp $
 
 BUILD_DEPENDS+=        meson-[0-9]*:../../devel/meson
 
+CONFIGURE_DIRS?=       .
+BUILD_DIRS?=           ${CONFIGURE_DIRS}
+INSTALL_DIRS?=         ${CONFIGURE_DIRS}
+
 .PHONY: meson-configure meson-build meson-install
 
 # pkgsrc contains multiple llvm-config executables at multiple locations.
@@ -11,17 +15,25 @@
 
 do-configure: meson-configure
 meson-configure:
-       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} meson --prefix ${PREFIX} --libdir lib --mandir ${PKGMANDIR} --sysconfdir ${PKG_SYSCONFDIR} --buildtype=plain ${MESON_ARGS} . output
+.for d in ${CONFIGURE_DIRS}
+       cd ${WRKSRC} && cd ${d} && ${SETENV} ${MAKE_ENV} meson \
+               --prefix ${PREFIX} --libdir lib --mandir ${PKGMANDIR} \
+               --sysconfdir ${PKG_SYSCONFDIR} --buildtype=plain ${MESON_ARGS} . output
+.endfor
 
 do-build: meson-build
 meson-build:
-       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ninja -j ${MAKE_JOBS:U1} -C output
+.for d in ${BUILD_DIRS}
+       cd ${WRKSRC} && cd ${d} && ${SETENV} ${MAKE_ENV} ninja -j ${MAKE_JOBS:U1} -C output
+.endfor
 
 do-install: meson-install
 meson-install:
+.for d in ${INSTALL_DIRS}
        if [ -f ${WRKSRC}/meson_post_install.py ]; then         \
                ${CHMOD} +x ${WRKSRC}/meson_post_install.py;    \
        fi
-       cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} ninja -C output install
+       cd ${WRKSRC} && cd ${d} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} ninja -C output install
+.endfor
 
 .include "../../lang/python/application.mk"
diff -r d7763191455e -r 028cd8869fca devel/py-meson/build.mk
--- a/devel/py-meson/build.mk   Sat Oct 05 19:59:04 2019 +0000
+++ b/devel/py-meson/build.mk   Sat Oct 05 20:09:52 2019 +0000
@@ -1,7 +1,11 @@
-# $NetBSD: build.mk,v 1.13 2019/09/30 11:37:04 prlw1 Exp $
+# $NetBSD: build.mk,v 1.14 2019/10/05 20:09:52 nia Exp $
 
 BUILD_DEPENDS+=        py37-meson-[0-9]*:../../devel/py-meson
 
+CONFIGURE_DIRS?=       .
+BUILD_DIRS?=           ${CONFIGURE_DIRS}
+INSTALL_DIRS?=         ${CONFIGURE_DIRS}
+
 .PHONY: meson-configure meson-build meson-install
 
 # pkgsrc contains multiple llvm-config executables at multiple locations.
@@ -11,17 +15,25 @@
 
 do-configure: meson-configure
 meson-configure:
-       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} meson --prefix ${PREFIX} --libdir lib --mandir ${PKGMANDIR} --sysconfdir ${PKG_SYSCONFDIR} --buildtype=plain ${MESON_ARGS} . output
+.for d in ${CONFIGURE_DIRS}
+       cd ${WRKSRC} && cd ${d} && ${SETENV} ${MAKE_ENV} meson \
+               --prefix ${PREFIX} --libdir lib --mandir ${PKGMANDIR} \
+               --sysconfdir ${PKG_SYSCONFDIR} --buildtype=plain ${MESON_ARGS} . output
+.endfor
 
 do-build: meson-build
 meson-build:
-       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ninja -j ${MAKE_JOBS:U1} -C output
+.for d in ${BUILD_DIRS}
+       cd ${WRKSRC} && cd ${d} && ${SETENV} ${MAKE_ENV} ninja -j ${MAKE_JOBS:U1} -C output
+.endfor
 
 do-install: meson-install
 meson-install:
+.for d in ${INSTALL_DIRS}
        if [ -f ${WRKSRC}/meson_post_install.py ]; then         \
                ${CHMOD} +x ${WRKSRC}/meson_post_install.py;    \
        fi
-       cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} ninja -C output install
+       cd ${WRKSRC} && cd ${d} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} ninja -C output install
+.endfor
 
 .include "../../lang/python/application.mk"



Home | Main Index | Thread Index | Old Index