<pre style='margin:0'>
Clemens Lang (neverpanic) pushed a commit to branch travis-ci
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/0dab3e71b391db3a25522e530414cdc673511980">https://github.com/macports/macports-base/commit/0dab3e71b391db3a25522e530414cdc673511980</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/travis-ci by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 0dab3e71 machista1.0: Use a locally-built lib for tests
</span>0dab3e71 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 0dab3e71b391db3a25522e530414cdc673511980
</span>Author: Clemens Lang <cal@macports.org>
AuthorDate: Wed Dec 9 02:06:34 2020 +0100
<span style='display:block; white-space:pre;color:#404040;'> machista1.0: Use a locally-built lib for tests
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> The tests for this library need a universal lib; we used to just use
</span><span style='display:block; white-space:pre;color:#404040;'> /usr/lib/libSystem.B.dylib, but Apple has removed that with macOS 11, so
</span><span style='display:block; white-space:pre;color:#404040;'> now we need a different alternative.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Build a library that's dual arch, relying on $OS_MAJOR to figure out
</span><span style='display:block; white-space:pre;color:#404040;'> whatever dual arch means on the current platform.
</span>---
src/machista1.0/Makefile.in | 38 +++++++++++++++++++++++++++++---
src/machista1.0/tests/empty.c | 1 +
src/machista1.0/tests/libmachista-test.c | 2 +-
3 files changed, 37 insertions(+), 4 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/machista1.0/Makefile.in b/src/machista1.0/Makefile.in
</span><span style='display:block; white-space:pre;color:#808080;'>index c0d20a9d..9b45ee35 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/machista1.0/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/machista1.0/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -43,8 +43,12 @@ ${PKG_INDEX}:: ${SWIG_SHLIB}
</span>
clean::
rm -f ${SWIG_OBJS} ${PKG_INDEX}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- rm -f ${TESTS}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rm -rf ${TESTS:%=%.dSYM}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rm -f ${TESTS} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tests/libmachista-test-dependency${SHLIB_SUFFIX} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tests/libmachista-test-lib${SHLIB_SUFFIX}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rm -rf ${TESTS:%=%.dSYM} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tests/libmachista-test-dependency${SHLIB_SUFFIX}.dSYM \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tests/libmachista-test-lib${SHLIB_SUFFIX}.dSYM
</span>
distclean::
rm -f Makefile
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -52,8 +56,36 @@ distclean::
</span> test:: ${TESTS}
${TESTS}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-tests/libmachista-test: tests/libmachista-test.c libmachista.h libmachista.o hashmap.o
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+tests/libmachista-test: tests/libmachista-test.c libmachista.h libmachista.o hashmap.o tests/libmachista-test-lib${SHLIB_SUFFIX}
</span> $(CC) $(CFLAGS) -D_POSIX_SOURCE -o $@ -I. $< libmachista.o hashmap.o
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# The tests for this library need a universal lib; we used to just use
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# /usr/lib/libSystem.B.dylib, but Apple has removed that with macOS 11, so now
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# we need a different alternative.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Build a library that's dual arch, relying on $OS_MAJOR to figure out whatever
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# dual arch means on the current platform. Note the use of -nostdlib, because
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# later versions of macOS actually didn't ship support for i386 stdlibs for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# a while, so no universal compiling was possible on those machines at all
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# (which didn't matter, since libSystem.B.dylib was still universal on those).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The if expression below is basically the equivalent from aclocal.m4 for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# UNIVERSAL_ARCHS, except that we're always forcing some kind of universiality.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+tests/%${SHLIB_SUFFIX}:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ifeq (darwin,@OS_PLATFORM@)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${SHLIB_LD} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $$(if [ @OS_MAJOR@ -lt 6 ]; then echo "-arch i386 -arch ppc"; elif [ @OS_MAJOR@ -lt 20 ]; then echo "-arch x86_64 -arch i386"; else echo "-arch x86_64 -arch arm64"; fi) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -nostdlib \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -install_name $@ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $^ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -o $@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ touch $@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+tests/libmachista-test-dependency${SHLIB_SUFFIX}: tests/empty.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+tests/libmachista-test-lib${SHLIB_SUFFIX}: tests/empty.c tests/libmachista-test-dependency${SHLIB_SUFFIX}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> codesign:: $(SHLIB_NAME)
../codesign.sh $?
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/machista1.0/tests/empty.c b/src/machista1.0/tests/empty.c
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000..85e6cd8c
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/machista1.0/tests/empty.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+void foo() {}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/machista1.0/tests/libmachista-test.c b/src/machista1.0/tests/libmachista-test.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 3aead4eb..3f70fc93 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/machista1.0/tests/libmachista-test.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/machista1.0/tests/libmachista-test.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -10,7 +10,7 @@
</span> #include <sys/wait.h>
#include <unistd.h>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#define TEST_LIB_PATH "/usr/lib/libstdc++.6.dylib"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define TEST_LIB_PATH "tests/libmachista-test-lib.dylib"
</span> #define OTOOL_PATH "/usr/bin/otool"
// check helper
</pre><pre style='margin:0'>
</pre>