pkgsrc-Changes archive

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

CVS commit: pkgsrc/regress/make-env-phases



Module Name:    pkgsrc
Committed By:   rillig
Date:           Tue Dec 17 16:01:28 UTC 2019

Modified Files:
        pkgsrc/regress/make-env-phases: Makefile spec
Added Files:
        pkgsrc/regress/make-env-phases: DESCR

Log Message:
regress/make-env-phases: fix test by ignoring changes to *FLAGS

The CPPFLAGS, CFLAGS, CXXFLAGS and LDFLAGS differ between the build phase
and the install phase. It's only a minor difference but may still
influence packages that use these flags at install time, even though they
shouldn't.

For now just document that the flags differ.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/regress/make-env-phases/DESCR
cvs rdiff -u -r1.4 -r1.5 pkgsrc/regress/make-env-phases/Makefile
cvs rdiff -u -r1.1.1.1 -r1.2 pkgsrc/regress/make-env-phases/spec

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

Modified files:

Index: pkgsrc/regress/make-env-phases/Makefile
diff -u pkgsrc/regress/make-env-phases/Makefile:1.4 pkgsrc/regress/make-env-phases/Makefile:1.5
--- pkgsrc/regress/make-env-phases/Makefile:1.4 Thu Apr  9 00:47:12 2009
+++ pkgsrc/regress/make-env-phases/Makefile     Tue Dec 17 16:01:28 2019
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2009/04/09 00:47:12 joerg Exp $
+# $NetBSD: Makefile,v 1.5 2019/12/17 16:01:28 rillig Exp $
 #
 
-DISTNAME=      make-env-phases-1.0
+DISTNAME=      make-env-phases-19.3
 CATEGORIES=    regress
 MASTER_SITES=  # none
 DISTFILES=     # none
@@ -11,16 +11,29 @@ COMMENT=    Tests whether MAKE_ENV changes 
 
 NO_CONFIGURE=  yes
 WRKSRC=                ${WRKDIR}
+USE_TOOLS=     diff grep printf
+
+# XXX: Why do these differ between do-build and do-install?
+#
+# In do-install, the -I/usr/include is not there in CFLAGS and CPPFLAGS.
+#
+# In do-install, the -L and -Wl,-R options for /usr/lib and $PREFIX/lib
+# are not there.
+#
+MAY_DIFFER_VARS=       CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+MAY_DIFFER_GREP_ARGS=  ${MAY_DIFFER_VARS:@var@-e \^${var:Q}@}
 
 do-build:
-       @cd ${WRKDIR} && \
-               echo "${MAKE_ENV}" >build-make-env.txt
+       ${RUN} cd ${WRKDIR} \
+       && printf '%s\n' ${MAKE_ENV} \
+          | grep -v ${MAY_DIFFER_GREP_ARGS} >build-make-env.txt
 
 do-install:
-       @cd ${WRKDIR} && \
-               echo "${MAKE_ENV}" >install-make-env.txt && \
-                ${CMP} build-make-env.txt install-make-env.txt >/dev/null && \
-                echo "The variable MAKE_ENV remains unchanged."
+       ${RUN} cd ${WRKDIR} \
+       && printf '%s\n' ${MAKE_ENV} \
+          | grep -v ${MAY_DIFFER_GREP_ARGS} >install-make-env.txt \
+       && diff -u build-make-env.txt install-make-env.txt \
+       && echo "The variable MAKE_ENV remains unchanged (ignoring ${MAY_DIFFER_VARS})." \
 
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/regress/make-env-phases/spec
diff -u pkgsrc/regress/make-env-phases/spec:1.1.1.1 pkgsrc/regress/make-env-phases/spec:1.2
--- pkgsrc/regress/make-env-phases/spec:1.1.1.1 Wed Sep  6 03:37:14 2006
+++ pkgsrc/regress/make-env-phases/spec Tue Dec 17 16:01:28 2019
@@ -1,4 +1,4 @@
-# $NetBSD: spec,v 1.1.1.1 2006/09/06 03:37:14 ben Exp $
+# $NetBSD: spec,v 1.2 2019/12/17 16:01:28 rillig Exp $
 #
 
 do_test() {
@@ -10,5 +10,5 @@ do_test() {
 }
 
 check_result() {
-       output_require "^The variable MAKE_ENV remains unchanged\\.\$"
+       output_require '^The variable MAKE_ENV remains unchanged.*$'
 }

Added files:

Index: pkgsrc/regress/make-env-phases/DESCR
diff -u /dev/null pkgsrc/regress/make-env-phases/DESCR:1.1
--- /dev/null   Tue Dec 17 16:01:28 2019
+++ pkgsrc/regress/make-env-phases/DESCR        Tue Dec 17 16:01:28 2019
@@ -0,0 +1 @@
+Dummy description file, necessary to run bmake install.



Home | Main Index | Thread Index | Old Index