pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
mirmake: finish package.
Module Name: pkgsrc-wip
Committed By: Paolo Vincenzo Olivo <vms%retrobsd.ddns.net@localhost>
Pushed By: vms
Date: Wed Jul 12 21:06:46 2023 +0200
Changeset: d4bb56715ccd5a8ef665131674d7831ada0aca1f
Modified Files:
mirmake/Makefile
mirmake/PLIST
Added Files:
mirmake/MESSAGE
Log Message:
mirmake: finish package.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d4bb56715ccd5a8ef665131674d7831ada0aca1f
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
mirmake/MESSAGE | 8 ++++++++
mirmake/Makefile | 58 ++++++++++++++++++++++++++++++++++++++++++++++++--------
mirmake/PLIST | 16 ++++++++--------
3 files changed, 66 insertions(+), 16 deletions(-)
diffs:
diff --git a/mirmake/MESSAGE b/mirmake/MESSAGE
new file mode 100644
index 0000000000..ad09a283ab
--- /dev/null
+++ b/mirmake/MESSAGE
@@ -0,0 +1,8 @@
+===========================================================================
+$NetBSD$
+
+All binaries provided by MirMake have been installed at ${PREFIX}/bin,
+by preprending a m* (e.g. mbmake, mtsort..), to avoid conflicts with
+bmake and other native utilities.
+
+===========================================================================
diff --git a/mirmake/Makefile b/mirmake/Makefile
index 3493cbe65c..66ce18d134 100644
--- a/mirmake/Makefile
+++ b/mirmake/Makefile
@@ -10,25 +10,52 @@ HOMEPAGE= http://www.mirbsd.org/man1/make.htm
COMMENT= Portable version of MirBSD make(1) and associated tools
LICENSE= modified-bsd AND isc AND miros
-.if exists(/bin/ksh)
-KSH= /bin/ksh
-.else
+MKSH_BINPATHS= /bin /usr/bin /usr/local/bin /sfw/bin /opt/local/bin
+
+.for path in ${MKSH_BINPATHS}
+
+## Do not require mksh. May cause edge-case issues.
+# . if exists(${path}/ksh)
+# MKSH= ${path}/ksh
+
+. if exists(${path}/mksh)
+MKSH= ${path}/mksh
+. else
TOOL_DEPENDS+= mksh-[0-9]*:../../shells/mksh
-KSH= ${PREFIX}/bin/mksh
-.endif
+MKSH= ${PREFIX}/bin/mksh
+. endif
+.endfor
UID= `id -un`
GID= `id -gn`
+REPLACE_INTERPRETER+= mksh
+REPLACE.mksh.old= .*/bin/env mksh
+REPLACE.mksh.new= ${MKSH}
+REPLACE_FILES.mksh+= dist/src/usr.bin/mmkdep/mmkdep.sh
+
SUBST_CLASSES+= paths
SUBST_STAGE.paths= pre-configure
SUBST_FILES.paths= Build.sh
SUBST_VARS.paths= PREFIX
SUBST_MESSAGE.paths= Include pkgsrc PREFIX in searched paths.
+SUBST_CLASSES+= bins
+SUBST_STAGE.bins= pre-configure
+SUBST_FILES.bins= dist/scripts/Build.sh dist/scripts/Copy.sh \
+ dist/src/share/mk/bsd.lib.mk dist/src/share/mk/sys.mk
+.for i in lndir lorder mkdep tsort
+SUBST_FILES.bins+= dist/src/usr.bin/m${i}/*
+.endfor
+SUBST_MESSAGE.bins= Resolving conflicts with native tools
+SUBST_SED.bins+= -e 's|lndir|mlndir|g'
+SUBST_SED.bins+= -e 's|lorder|mlorder|g'
+SUBST_SED.bins+= -e 's|mkdep|mmkdep|g'
+SUBST_SED.bins+= -e 's|tsort|mtsort|g'
+
.include "../../mk/bsd.prefs.mk"
-# build script accepts a number of arguments
+# build script accepts a number of arguments
BUILD_ARGS= ${OPSYS}
BUILD_ARGS+= ${PREFIX}
BUILD_ARGS+= ${PKGMANDIR}/man
@@ -36,13 +63,28 @@ BUILD_ARGS+= mbmake
BUILD_ARGS+= ""
BUILD_ARGS+= ""
BUILD_ARGS+= ""
-BUILD_ARGS+= ${KSH}
+BUILD_ARGS+= ${MKSH}
BUILD_ARGS+= ${UID}:${GID}
WRKSRC= ${WRKDIR}/mirmake
MAKE_ENV+= LIBS=${LIBS:Q}
-MAKE_ENV+= OVERRIDE_MKSH=${KSH}
+MAKE_ENV+= OVERRIDE_MKSH=${MKSH}
+
+post-extract:
+ ${RUN}cd ${WRKSRC}/dist/src/usr.bin && \
+ for i in lndir tsort; do \
+ ${MV} $$i/$$i.c $$i/m$$i.c; \
+ ${MV} $$i/$$i.1 $$i/m$$i.1; \
+ ${MV} $$i m$$i; \
+ done && \
+ for i in lorder mkdep ; do \
+ ${MV} $$i/$$i.sh $$i/m$$i.sh; \
+ ${MV} $$i/$$i.1 $$i/m$$i.1; \
+ ${MV} $$i m$$i; \
+ done
+ ${RUN}cd ${WRKSRC}/dist/scripts && \
+ ${MV} mkdep.sh.ed mmkdep.sh.ed
do-build:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
diff --git a/mirmake/PLIST b/mirmake/PLIST
index ca4a8a9f18..8c22f36905 100644
--- a/mirmake/PLIST
+++ b/mirmake/PLIST
@@ -1,16 +1,16 @@
@comment $NetBSD$
bin/binstall
-bin/lndir
-bin/lorder
bin/mbmake
-bin/mkdep
-bin/tsort
+bin/mlndir
+bin/mlorder
+bin/mmkdep
+bin/mtsort
man/man1/binstall.1
-man/man1/lndir.1
-man/man1/lorder.1
man/man1/mbmake.1
-man/man1/mkdep.1
-man/man1/tsort.1
+man/man1/mlndir.1
+man/man1/mlorder.1
+man/man1/mmkdep.1
+man/man1/mtsort.1
share/mbmake/PSD12.make.txt
share/mbmake/adler32.h
share/mbmake/bsd.cfwrap.mk
Home |
Main Index |
Thread Index |
Old Index