~rabbits/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
3 3

[PATCH uxn] Allows native building on M1 Macs

Details
Message ID
<20211210203522.22188-1-eli@eli173.com>
DKIM signature
pass
Download raw message
Patch: +5 -1
---

This just uses Homebrew's new directory organization for M1 Macs,
but I don't have access to an x86_64 Mac to test this on,
so before this patch is accepted someone may want to test that

 build.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/build.sh b/build.sh
index 5f40efd..c4e8c28 100755
--- a/build.sh
@@ -34,7 +34,11 @@ MSYS_NT*) # MSYS2 on Windows
	;;
Darwin) # macOS
	CFLAGS="${CFLAGS} -Wno-typedef-redefinition"
	UXNEMU_LDFLAGS="/usr/local/lib/libSDL2.a $(sdl2-config --cflags --static-libs | sed -e 's/-lSDL2 //')"
	if [[ `uname -m` == 'arm64' ]]; then
			UXNEMU_LDFLAGS="/opt/homebrew/lib/libSDL2.a $(sdl2-config --cflags --static-libs | sed -e 's/-lSDL2 //')"
	else
			UXNEMU_LDFLAGS="/usr/local/lib/libSDL2.a $(sdl2-config --cflags --static-libs | sed -e 's/-lSDL2 //')"
	fi
	;;
Linux|*)
	UXNEMU_LDFLAGS="-L/usr/local/lib $(sdl2-config --cflags --libs)"
--
2.30.1 (Apple Git-130)

[uxn/patches/.build.yml] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CGBWS0ZZ7G83.12LUJ2XQ4X9P7@cirno2>
In-Reply-To
<20211210203522.22188-1-eli@eli173.com> (view parent)
DKIM signature
missing
Download raw message
uxn/patches/.build.yml: SUCCESS in 51s

[Allows native building on M1 Macs][0] from [Elijah Cohen][1]

[0]: https://lists.sr.ht/~rabbits/public-inbox/patches/27284
[1]: eli@eli173.com

✓ #646657 SUCCESS uxn/patches/.build.yml https://builds.sr.ht/~rabbits/job/646657
Details
Message ID
<20211212224754.smgtdpccrsgftvlx@mutt>
In-Reply-To
<20211210203522.22188-1-eli@eli173.com> (view parent)
DKIM signature
missing
Download raw message
Dear Elijah,

Thanks very much for the patch!

On Fri, Dec 10, 2021 at 08:35:51PM +0000, Elijah Cohen wrote:
>+	if [[ `uname -m` == 'arm64' ]]; then
>+			UXNEMU_LDFLAGS="/opt/homebrew/lib/libSDL2.a $(sdl2-config --cflags --static-libs | sed -e 's/-lSDL2 //')"
>+	else
>+			UXNEMU_LDFLAGS="/usr/local/lib/libSDL2.a $(sdl2-config --cflags --static-libs | sed -e 's/-lSDL2 //')"

I've been able to make this more generalised! Running `brew --prefix` 
gives me “/usr/local” on my x86_64 Mac, so I've used the output of that 
in the build script now. Does it work for you on your M1?

https://git.sr.ht/~rabbits/uxn/commit/68abbc2ed874aed8924032377df92084fe207900

Thanks very much,
Andy
Details
Message ID
<gRZV0aLLptwteVVCsQmMOXnUIAUGvGeGNpsSheAJKEjeETy9E5I6K49ZWNh4IUr4z7jNEs4vxAk4IXGZRj4dWeheghs00tEIb_TWsH9tpQw=@eli173.com>
In-Reply-To
<20211212224754.smgtdpccrsgftvlx@mutt> (view parent)
DKIM signature
pass
Download raw message
Hi Andy,

On Sunday, December 12th, 2021 at 4:47 PM, Andrew Alderwick wrote:
> I've been able to make this more generalised! Running `brew --prefix`
> gives me “/usr/local” on my x86_64 Mac, so I've used the output of that
> Does it work for you on your M1?

That's a great find! It does indeed work on my M1, and the build script looks much cleaner for it.

Yours,
Elijah
Reply to thread Export thread (mbox)