public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* [ITP] bmake 20240301-1
@ 2024-03-09 12:44 Christian Franke
  2024-03-09 16:43 ` Marco Atzeri
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Franke @ 2024-03-09 12:44 UTC (permalink / raw)
  To: cygwin-apps

[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]

I would like to contribute bmake. Also present in Debian, Fedora, 
FreeBSD, Ubuntu, ...

I occasionally use it to check whether Makefiles are compatible with 
non-GNU versions of make.

SUMMARY="Portable version of the NetBSD 'make' utility"

DESCRIPTION="\
bmake is a portable version of the NetBSD make(1) utility.  It is similar
to GNU make, even though the syntax for the advanced features supported
in Makefiles is very different."

bmake_extras_SUMMARY="${SUMMARY} (additional support files)"

bmake_extras_DESCRIPTION="${DESCRIPTION}
This package contains many additional *.mk files and some support scripts
which are only required if used in Makefiles."

bmake-20240301-1.tar.xz:
usr/bin/bmake.exe
usr/share/doc/bmake/*
usr/share/man/man1/bmake.1.gz
usr/share/bmake/mk/host-target.mk
usr/share/bmake/mk/suffixes.mk
usr/share/bmake/mk/sys.mk
usr/share/bmake/mk/sys.*.mk
usr/share/bmake/mk/sys/Generic.mk

bmake-extras-20240301-1.tar.xz:
usr/share/bmake/mk/*.mk
usr/share/bmake/mk/install-sh
usr/share/bmake/mk/meta2deps.py
usr/share/bmake/mk/meta2deps.sh
usr/share/bmake/mk/mkopt.sh
usr/share/bmake/mk/stage-install.sh
usr/share/bmake/mk/sys/*.mk

-- 
Regards,
Christian


[-- Attachment #2: bmake.cygport --]
[-- Type: text/plain, Size: 2052 bytes --]

# cygport script for bmake
NAME=bmake
VERSION=20240301
RELEASE=1
SOURCE_DATE="2024-03-09 12:00:00 UTC"

SUMMARY="Portable version of the NetBSD 'make' utility"

DESCRIPTION="\
bmake is a portable version of the NetBSD make(1) utility.  It is similar
to GNU make, even though the syntax for the advanced features supported
in Makefiles is very different."

LICENSE="BSD-3-Clause"
CATEGORY="Devel"

PKG_NAMES="bmake bmake-extras"

bmake_extras_SUMMARY="${SUMMARY} (additional support files)"
bmake_extras_DESCRIPTION="${DESCRIPTION}  
This package contains many additional *.mk files and some support scripts
which are only required if used in Makefiles."

REQUIRES=""
bmake_extras_REQUIRES="bmake" # bash python3
BUILD_REQUIRES="binutils gcc-core" # "make" not required

HOMEPAGE="https://www.crufty.net/help/sjg/bmake.htm"
SRC_URI="https://www.crufty.net/ftp/pub/sjg/bmake-${PV}.tar.gz
         https://www.crufty.net/ftp/pub/sjg/bmake-${PV}.tar.gz.asc"
SRC_DIR="bmake"

bmake_CONTENTS="
	usr/bin
	usr/share/doc
	usr/share/man
	usr/share/${PN}/mk/host-target.mk
	usr/share/${PN}/mk/suffixes.mk
	usr/share/${PN}/mk/sys.mk
	usr/share/${PN}/mk/sys.*.mk
	usr/share/${PN}/mk/sys/Generic.mk
"
bmake_extras_CONTENTS="
	--exclude=usr/share/${PN}/mk/host-target.mk
	--exclude=usr/share/${PN}/mk/suffixes.mk
	--exclude=usr/share/${PN}/mk/sys.mk
	--exclude=usr/share/${PN}/mk/sys.*.mk
	--exclude=usr/share/${PN}/mk/sys/Generic.mk
	usr/share/${PN}
"

SOURCE_DATE_EPOCH=$(date -d "$SOURCE_DATE" +%s) # 'export' not needed

src_compile() {
	cd ${B}
	${S}/boot-strap --prefix=/usr \
	                --with-default-sys-path=/usr/share/${PN}/mk \
	                --skip-test op=build
}

src_test() {
	cd ${B}
	${S}/boot-strap op=test

	if false; then # BROKEN_TESTS (all harmless)
		TESTS='export opt-chdir opt-keep-going-indirect' \
		${S}/boot-strap op=test
	fi
}

src_install() {
	cd ${B}
	# Don't use 'install -s' for bmake.exe.
	STRIP_FLAG="" \
	${S}/boot-strap --prefix=/usr \
	                --install-destdir=${D} \
	                --skip-test op=install
}

[-- Attachment #3: bmake-20240301-1.src.patch --]
[-- Type: text/plain, Size: 2334 bytes --]

--- origsrc/bmake/Makefile	2024-03-09 12:00:00.000000000 +0000
+++ src/bmake/Makefile	2024-03-09 12:00:00.000000000 +0000
@@ -90,7 +90,7 @@ OS := ${.MAKE.OS:U${uname -s:L:sh}}
 # are we 4.4BSD ?
 isBSD44:=${BSD44_LIST:M${OS}}
 
-.if ${isBSD44} == "" && ${OS:NDarwin:NLinux} != ""
+.if ${isBSD44} == "" && ${OS:NCYGWIN*:NDarwin:NLinux} != ""
 MANTARGET= cat
 INSTALL?=${srcdir}/install-sh
 .if ${MACHINE} == "sun386"
@@ -192,7 +192,7 @@ CONFIGURE_ARGS += --without-makefile
 AUTOCONF_GENERATED_MAKEFILE = Makefile.config
 .include <autoconf.mk>
 .endif
-SHARE_MK ?= ${SHAREDIR}/mk
+SHARE_MK ?= ${DEFAULT_SYS_PATH}
 MKSRC = ${srcdir}/mk
 INSTALL ?= ${srcdir}/install-sh
 
--- origsrc/bmake/boot-strap	2024-03-09 12:00:00.000000000 +0000
+++ src/bmake/boot-strap	2024-03-09 12:00:00.000000000 +0000
@@ -69,6 +69,9 @@
 #		This is useful when $prefix/ is shared by multiple
 #		machines.
 #
+#	--skip-test
+#		Don't run test after build or before install.
+#
 #	Flags relevant when installing:
 #
 #	-DWITHOUT_INSTALL_MK
@@ -212,6 +215,7 @@ srcdir=$Mydir
 mksrc=$Mydir/mk
 objdir=
 quiet=:
+skip_test=false
 
 ${SKIP_RC:+:} source_rc .bmake-boot-strap.rc . "$Mydir/.." "$HOME"
 
@@ -249,6 +253,7 @@ do
                 INSTALL_BIN=$HOST_TARGET/bin;;
 	--install-destdir=*) INSTALL_DESTDIR=`get_optarg "$1"`;;
 	--install-prefix=*) INSTALL_PREFIX=`get_optarg "$1"`;;
+	--skip-test) skip_test=true;;
 	-DWITH*) INSTALL_ARGS="$INSTALL_ARGS $1";;
 	-s|--src) srcdir="$2"; shift;;
 	-m|--mksrc) mksrc="$2"; shift;;
@@ -428,7 +433,7 @@ op_build() {
 	chmod 755 make-bootstrap.sh || exit 1
 	./make-bootstrap.sh || exit 1
 	case "$op" in
-	build) op_test;;
+	build) $skip_test || op_test;;
 	esac
 }
 
@@ -448,7 +453,8 @@ op_clean() {
 }
 
 op_install() {
-	op_test
+	[ -x bmake ] || op_build
+	$skip_test || op_test
 	case "$INSTALL_PREFIX,$INSTALL_BIN,$prefix" in
 	,$HOST_TARGET/bin,*/$HOST_TARGET)
 		INSTALL_PREFIX=`dirname $prefix`
--- origsrc/bmake/unit-tests/Makefile	2024-03-09 12:00:00.000000000 +0000
+++ src/bmake/unit-tests/Makefile	2024-03-09 12:00:00.000000000 +0000
@@ -474,6 +474,13 @@ BROKEN_TESTS+= sh-flags
 BROKEN_TESTS+= varmod-localtime
 .endif
 
+.if ${.MAKE.OS:NCYGWIN*} == ""
+BROKEN_TESTS+= \
+	export \
+	opt-chdir \
+	opt-keep-going-indirect
+.endif
+
 .if ${.MAKE.OS:NDarwin} == ""
 BROKEN_TESTS+= shell-ksh
 .endif

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ITP] bmake 20240301-1
  2024-03-09 12:44 [ITP] bmake 20240301-1 Christian Franke
@ 2024-03-09 16:43 ` Marco Atzeri
  0 siblings, 0 replies; 2+ messages in thread
From: Marco Atzeri @ 2024-03-09 16:43 UTC (permalink / raw)
  To: cygwin-apps; +Cc: Christian Franke

On 09/03/2024 13:44, Christian Franke via Cygwin-apps wrote:
> I would like to contribute bmake. Also present in Debian, Fedora, 
> FreeBSD, Ubuntu, ...
> 
> I occasionally use it to check whether Makefiles are compatible with 
> non-GNU versions of make.
> 

added

diff --git a/cygwin-pkg-maint b/cygwin-pkg-maint
+bmake                                        Christian Franke


It could be worth to rename bmake-20240301-1.src.patch
and use PATCH_URI to avoid renaming the patch every time.

https://cygwin.github.io/cygport/src_fetch_cygpart.html#PATCH_URI

Regards
Marco



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-09 16:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-09 12:44 [ITP] bmake 20240301-1 Christian Franke
2024-03-09 16:43 ` Marco Atzeri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).