Tue Jun 27 10:44:01 2023 UTC ()
devel/nspr: Don't install compile-et.pl in cross-builds.

Nor prerr.properties.

Not sure if these are ever useful for native builds, but
compile-et.pl is a build-time executable with the wrong interpreter
for cross builds.


(riastradh)
diff -r1.122 -r1.123 pkgsrc/devel/nspr/Makefile
diff -r1.17 -r1.18 pkgsrc/devel/nspr/PLIST

cvs diff -r1.122 -r1.123 pkgsrc/devel/nspr/Makefile (expand / switch to context diff)
--- pkgsrc/devel/nspr/Makefile 2022/12/15 23:01:17 1.122
+++ pkgsrc/devel/nspr/Makefile 2023/06/27 10:44:01 1.123
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.122 2022/12/15 23:01:17 adam Exp $
+# $NetBSD: Makefile,v 1.123 2023/06/27 10:44:01 riastradh Exp $
 
 DISTNAME=	nspr-${NSPR_RELEASE:S/.0$//}
 NSPR_RELEASE=	4.35.0
@@ -31,9 +31,24 @@
 
 .include "../../mk/bsd.prefs.mk"
 
+PLIST_VARS+=		native
+
 .if ${USE_CROSS_COMPILE:U:tl} == yes
 MAKE_FLAGS+=		HOST_CC=${NATIVE_CC:Q}
 MAKE_FLAGS+=		HOST_CXX=${NATIVE_CXX:Q}
+post-install: post-install-rm-perl
+.PHONY: post-install-rm-perl
+post-install-rm-perl:
+	${RUN} rm ${DESTDIR:Q}${PREFIX:Q}/bin/compile-et.pl
+	${RUN} rm ${DESTDIR:Q}${PREFIX:Q}/bin/prerr.properties
+.else
+# XXX Not actually sure if compile-et.pl or prerr.properties are
+# supposed to be included -- they are run at build-time, and other
+# packaging systems like Debian exclude them.  But out of an abundance
+# of caution, let's avoid breaking downstream packages for now
+# (20230609) by continuing to include these in native builds.  (Cross
+# builds break because of the missing interpreter.)
+PLIST.native=		yes
 .endif
 
 BUILDLINK_TRANSFORM+=	rm:-Wall

cvs diff -r1.17 -r1.18 pkgsrc/devel/nspr/PLIST (expand / switch to context diff)
--- pkgsrc/devel/nspr/PLIST 2021/07/01 07:23:00 1.17
+++ pkgsrc/devel/nspr/PLIST 2023/06/27 10:44:01 1.18
@@ -1,7 +1,7 @@
-@comment $NetBSD: PLIST,v 1.17 2021/07/01 07:23:00 wiz Exp $
-bin/compile-et.pl
+@comment $NetBSD: PLIST,v 1.18 2023/06/27 10:44:01 riastradh Exp $
+${PLIST.native}bin/compile-et.pl
 bin/nspr-config
-bin/prerr.properties
+${PLIST.native}bin/prerr.properties
 include/nspr/md/_aix32.cfg
 include/nspr/md/_aix64.cfg
 include/nspr/md/_bsdi.cfg