pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/mirmake



Module Name:    pkgsrc
Committed By:   vins
Date:           Wed Jul 12 19:34:40 UTC 2023

Added Files:
        pkgsrc/devel/mirmake: DESCR MESSAGE Makefile PLIST distinfo
        pkgsrc/devel/mirmake/patches: patch-Build.sh
            patch-dist_scripts_Build.sh
            patch-dist_src_usr.bin_xinstall_xinstall.c

Log Message:
devel/mirmake: import pacakge from wip.

MirMake is a package of MirBSD's make(1) as well as its system makefile
includes, a few required tools, and a library containing hash functions,
strlcpy and strlcat functions, etc. for operating systems which do not
have these in libc.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/mirmake/DESCR \
    pkgsrc/devel/mirmake/MESSAGE pkgsrc/devel/mirmake/Makefile \
    pkgsrc/devel/mirmake/PLIST pkgsrc/devel/mirmake/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/mirmake/patches/patch-Build.sh \
    pkgsrc/devel/mirmake/patches/patch-dist_scripts_Build.sh \
    pkgsrc/devel/mirmake/patches/patch-dist_src_usr.bin_xinstall_xinstall.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/devel/mirmake/DESCR
diff -u /dev/null pkgsrc/devel/mirmake/DESCR:1.1
--- /dev/null   Wed Jul 12 19:34:40 2023
+++ pkgsrc/devel/mirmake/DESCR  Wed Jul 12 19:34:39 2023
@@ -0,0 +1,7 @@
+MirMake is a package of MirBSD's make(1) as well as its system makefile
+includes, a few required tools, and a library containing hash functions,
+strlcpy and strlcat functions, etc. for operating systems which do not
+have these in libc. Tools included are: bmake (name is freely
+choosable), UCB install (only on Interix/SFU), lorder, mkdep, tsort
+(required by a few *.mk files), readlink (re- quired by bsd.obj.mk and
+bsd.cfwrap.mk).
Index: pkgsrc/devel/mirmake/MESSAGE
diff -u /dev/null pkgsrc/devel/mirmake/MESSAGE:1.1
--- /dev/null   Wed Jul 12 19:34:40 2023
+++ pkgsrc/devel/mirmake/MESSAGE        Wed Jul 12 19:34:39 2023
@@ -0,0 +1,8 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2023/07/12 19:34:39 vins Exp $
+
+All binaries provided by MirMake have been installed at ${PREFIX}/bin,
+by preprending a m* (e.g. mbmake, minstall...), to avoid conflicts
+with bmake and other native utilities.
+
+===========================================================================
Index: pkgsrc/devel/mirmake/Makefile
diff -u /dev/null pkgsrc/devel/mirmake/Makefile:1.1
--- /dev/null   Wed Jul 12 19:34:40 2023
+++ pkgsrc/devel/mirmake/Makefile       Wed Jul 12 19:34:39 2023
@@ -0,0 +1,103 @@
+# $NetBSD: Makefile,v 1.1 2023/07/12 19:34:39 vins Exp $
+
+DISTNAME=      mirmake_20141220.orig
+PKGNAME=       mirmake-20141220
+CATEGORIES=    devel
+MASTER_SITES=  http://www.mirbsd.org/MirOS/dist/mir/make/
+
+MAINTAINER=    vins%NetBSD.org@localhost
+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
+
+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
+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/scripts/sys.mk.ed dist/src/share/mk/sys.mk \
+                       dist/src/share/mk/bsd.lib.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|binstall|minstall|g'
+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_ARGS=    ${OPSYS}
+BUILD_ARGS+=   ${PREFIX}
+BUILD_ARGS+=   ${PKGMANDIR}/man
+BUILD_ARGS+=   mbmake
+BUILD_ARGS+=   ""
+BUILD_ARGS+=   ""
+BUILD_ARGS+=   ""
+BUILD_ARGS+=   ${MKSH}
+BUILD_ARGS+=   ${UID}:${GID}
+
+WRKSRC=                ${WRKDIR}/mirmake
+
+MAKE_ENV+=     LIBS=${LIBS:Q}
+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}                   \
+               ${SH} ${WRKSRC}/Build.sh ${BUILD_ARGS}
+
+do-install:
+       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${INSTALL_ENV}    \
+               ${SH} ${WRKSRC}/Install.sh
+
+.if ${OPSYS} == "Linux"
+.  include "../../devel/libbsd/buildlink3.mk"
+.endif
+
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/devel/mirmake/PLIST
diff -u /dev/null pkgsrc/devel/mirmake/PLIST:1.1
--- /dev/null   Wed Jul 12 19:34:40 2023
+++ pkgsrc/devel/mirmake/PLIST  Wed Jul 12 19:34:39 2023
@@ -0,0 +1,40 @@
+@comment $NetBSD: PLIST,v 1.1 2023/07/12 19:34:39 vins Exp $
+bin/mbmake
+bin/minstall
+bin/mlndir
+bin/mlorder
+bin/mmkdep
+bin/mtsort
+man/man1/mbmake.1
+man/man1/minstall.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
+share/mbmake/bsd.dep.mk
+share/mbmake/bsd.doc.mk
+share/mbmake/bsd.lib.mk
+share/mbmake/bsd.lt.mk
+share/mbmake/bsd.man.mk
+share/mbmake/bsd.obj.mk
+share/mbmake/bsd.own.mk
+share/mbmake/bsd.prog.mk
+share/mbmake/bsd.subdir.mk
+share/mbmake/bsd.sys.mk
+share/mbmake/getopt.h
+share/mbmake/libmirmake.a
+share/mbmake/md4.h
+share/mbmake/md5.h
+share/mbmake/mirmake.h
+share/mbmake/rmd160.h
+share/mbmake/sfv.h
+share/mbmake/sha1.h
+share/mbmake/sha2.h
+share/mbmake/suma.h
+share/mbmake/sys.mk
+share/mbmake/sysexits.h
+share/mbmake/tiger.h
+share/mbmake/whirlpool.h
Index: pkgsrc/devel/mirmake/distinfo
diff -u /dev/null pkgsrc/devel/mirmake/distinfo:1.1
--- /dev/null   Wed Jul 12 19:34:40 2023
+++ pkgsrc/devel/mirmake/distinfo       Wed Jul 12 19:34:39 2023
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2023/07/12 19:34:39 vins Exp $
+
+BLAKE2s (mirmake_20141220.orig.tar.gz) = 0b7c1d14d47c8a36be95d55c51af816c52b6d54c475ada766fb8be813703a7a1
+SHA512 (mirmake_20141220.orig.tar.gz) = c7a66b8bb4c196ff1e676e4dac2dd67ab7c653ef6b64a2424ce8a3481434a4afca5436b8cb77cb954a4efc7ae7deedb656060f10b2d6f54b4d9f14c759a6d604
+Size (mirmake_20141220.orig.tar.gz) = 390984 bytes
+SHA1 (patch-Build.sh) = f1b5326882a2c5ae77586043567097fbe4e4e735
+SHA1 (patch-dist_scripts_Build.sh) = b733aa915f28af2690fc61b12067c2e2a532879b
+SHA1 (patch-dist_src_usr.bin_xinstall_xinstall.c) = 4778683e066d85b03b26ef29d27bf7a50a75b53e

Index: pkgsrc/devel/mirmake/patches/patch-Build.sh
diff -u /dev/null pkgsrc/devel/mirmake/patches/patch-Build.sh:1.1
--- /dev/null   Wed Jul 12 19:34:40 2023
+++ pkgsrc/devel/mirmake/patches/patch-Build.sh Wed Jul 12 19:34:39 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-Build.sh,v 1.1 2023/07/12 19:34:39 vins Exp $
+
+pkgsrc PREFIX support.
+
+--- Build.sh.orig      2014-12-20 22:14:21.000000000 +0000
++++ Build.sh
+@@ -141,7 +141,7 @@ fi
+ 
+ mktest=
+ for f in mksh mirbsdksh ksh; do
+-      for d in /usr/bin /usr/local/bin /bin /sw/bin; do
++      for d in @PREFIX@/bin /usr/bin /usr/local/bin /bin /sw/bin; do
+               mktest="${mktest}${d}/${f} "
+       done
+ done
Index: pkgsrc/devel/mirmake/patches/patch-dist_scripts_Build.sh
diff -u /dev/null pkgsrc/devel/mirmake/patches/patch-dist_scripts_Build.sh:1.1
--- /dev/null   Wed Jul 12 19:34:40 2023
+++ pkgsrc/devel/mirmake/patches/patch-dist_scripts_Build.sh    Wed Jul 12 19:34:39 2023
@@ -0,0 +1,32 @@
+$NetBSD: patch-dist_scripts_Build.sh,v 1.1 2023/07/12 19:34:39 vins Exp $
+
+Support pdksh.
+Do not require perl.
+
+--- dist/scripts/Build.sh.orig 2014-12-20 22:34:27.000000000 +0000
++++ dist/scripts/Build.sh
+@@ -66,6 +66,7 @@
+ export SHELL=$new_mirksh
+ unset MAKE
+ 
++[[ -n $KSH_VERSION ]] && set -o braceexpand
+ [[ -n $BASH_VERSION ]] && shopt -s extglob
+ 
+ # Directories
+@@ -262,9 +263,13 @@
+       }
+ EOF
+ $CC $CFLAGS -o _t.exe _t.c -Werror || rm -f _t.exe
+-[[ -x _t.exe ]] || perl -pi -e \
+-    's/__attribute__\s*\(\(\s*_*bounded_*\s*\([^)]*\)\s*\)\)//' \
+-    $(find . -name \*.[ch])
++[[ -x _t.exe ]] || find . -name \*.[ch] -exec sh -c '
++    T=/tmp/mirmake.$$.tmp
++    B='[[:blank:]]'
++    sed -e "s/__attribute__$B*(($B*_*bounded_*$B*([^)]*)$B*))//" {} > $T
++    test $? -eq 0 -a -s $T   || { rm -f $T; exit 1; }   # error, bogus: delete
++    cmp -s {} $T || mv $T {} || { rm -f $T; exit 1; }   # rename failed:  "
++    test -f $T && rm -f $T                         ' \; # unchanged file: "
+ rm -f _t.*
+ 
+ if [[ $binown = - ]]; then
Index: pkgsrc/devel/mirmake/patches/patch-dist_src_usr.bin_xinstall_xinstall.c
diff -u /dev/null pkgsrc/devel/mirmake/patches/patch-dist_src_usr.bin_xinstall_xinstall.c:1.1
--- /dev/null   Wed Jul 12 19:34:40 2023
+++ pkgsrc/devel/mirmake/patches/patch-dist_src_usr.bin_xinstall_xinstall.c     Wed Jul 12 19:34:39 2023
@@ -0,0 +1,24 @@
+$NetBSD: patch-dist_src_usr.bin_xinstall_xinstall.c,v 1.1 2023/07/12 19:34:39 vins Exp $
+
+NetBSD doesn't define `strtofflags'.
+
+--- dist/src/usr.bin/xinstall/xinstall.c.orig  2014-12-20 22:27:39.000000000 +0000
++++ dist/src/usr.bin/xinstall/xinstall.c
+@@ -134,7 +134,7 @@
+ #endif
+       u_int iflags;
+       int ch, no_target;
+-#if defined(BSD) || defined(__APPLE__)
++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
+       char *flags;
+ #endif
+       char *to_name, *group = NULL, *owner = NULL;
+@@ -155,7 +155,7 @@
+                       /* For backwards compatibility. */
+                       break;
+               case 'f':
+-#if defined(BSD) || defined(__APPLE__)
++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
+                       flags = optarg;
+                       if (strtofflags(&flags, &fset, NULL))
+                               errx(EX_USAGE, "%s: invalid flag", flags);



Home | Main Index | Thread Index | Old Index