pkgsrc-WIP-changes archive

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

shells/ksh93u+: major revision.



Module Name:	pkgsrc-wip
Committed By:	Paolo Vincenzo Olivo <vms%retrobsd.ddns.net@localhost>
Pushed By:	vms
Date:		Tue Jun 28 15:34:57 2022 +0200
Changeset:	d6d1a484218ab33b78a92f101635d840deff1454

Modified Files:
	ksh93u+/Makefile

Log Message:
shells/ksh93u+: major revision.

- remove c++ from USE_LANGUAGES; this had been mistakenly imported by
  taking wip/ast-ksh (ksh2020) as skeleton package for this one.

- NetBSD: remove `-D_NETBSD_SOURCE'. Unlike shells/ast-ksh, ksh93u+
  doesn't need it, since the code has been patched upstream.

- SunOS:
    - remove `XPG6' macro from CFLAGS. Already passed by the built-in wrapper.
    - Add `__EXTENSIONS__' ; needed in case of __STDC__ == 1. Without it, the
      build fails due to implicit declaration of `strcasecmp'.
    - `-std=c11' apparetly needs to be explicitly set [1].

- remove wildcard from `do-install' target. It was a poor workaround to
  circumvent non-standard platform-specific build direectories. Use
  internal wrapper to define HOSTTYPE instead.

- introduce `do-test' target to run the regression test.

[1]https://code.georgi.software/mirror/ksh93/commit/a5768143406c60274599512fabb48b2c68e4159b

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d6d1a484218ab33b78a92f101635d840deff1454

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

diffstat:
 ksh93u+/Makefile | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

diffs:
diff --git a/ksh93u+/Makefile b/ksh93u+/Makefile
index 2053a6eb2b..70fe1bc051 100644
--- a/ksh93u+/Makefile
+++ b/ksh93u+/Makefile
@@ -15,19 +15,12 @@ LICENSE=	epl-v1.0
 
 CONFLICTS+=		ast-ksh-[0-9]* static-ast-ksh-[0-9]*
 
-USE_LANGUAGES=		c c++
+USE_LANGUAGES=		c
 FORTIFY_SUPPORTED=	no
-MAKEFLAGS+=		CC=${CC:Q} CCFLAGS=${CFLAGS:M*:Q}
-
-.include "../../mk/bsd.prefs.mk"
 
-.if ${OPSYS} == "NetBSD"
-MAKEFLAGS+=	CCFLAGS="-D_NETBSD_SOURCE ${CFLAGS}"
-.endif
+MAKEFLAGS+=		CC=${CC:Q} CCFLAGS=${CFLAGS:M*:Q}
 
-.if ${OPSYS} == "SunOS"
-MAKEFLAGS+=	CCFLAGS="-std=c11 -D_XPG6 ${CFLAGS}"
-.endif
+CFLAGS.SunOS+=	-std=c11 -D__EXTENSIONS__
 
 PKG_SHELL=		bin/ksh93
 
@@ -36,14 +29,20 @@ INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1
 WRKSRC=	${WRKDIR}/ksh-${DISTNAME:S,^v,,}
 
 do-build:
-	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
-		${TOOLS_SHELL} ${WRKSRC}/bin/package \
-		make ${MAKEFLAGS}
+	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} 				\
+		${SH} ./bin/package make ${MAKEFLAGS}
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/arch/*/bin/ksh \
+	set -e;								\
+	arch=`${WRKSRC}/bin/package host`;                              \
+	${INSTALL_PROGRAM} ${WRKSRC}/arch/"$${arch}"/bin/ksh 		\
 		${DESTDIR}${PREFIX}/bin/ksh93
-	${INSTALL_MAN} ${WRKSRC}/src/cmd/ksh93/sh.1 \
+
+	${INSTALL_MAN} ${WRKSRC}/src/cmd/ksh93/sh.1 			\
 		${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ksh93.1
 
+do-test:
+	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV}				\
+		${SH} ./bin/package test
+
 .include "../../mk/bsd.pkg.mk"


Home | Main Index | Thread Index | Old Index