git: 519bf9038856 - main - devel/dyncall: Update to 1.3

From: Li-Wen Hsu <lwhsu_at_FreeBSD.org>
Date: Sat, 18 Dec 2021 17:13:06 UTC
The branch main has been updated by lwhsu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=519bf90388561b897affade9cd8d33ed1b275752

commit 519bf90388561b897affade9cd8d33ed1b275752
Author:     Tassilo Philipp <tphilipp@potion-studios.com>
AuthorDate: 2021-12-18 17:12:20 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2021-12-18 17:12:20 +0000

    devel/dyncall: Update to 1.3
    
    PR:             260491
---
 devel/dyncall/Makefile        |   5 +-
 devel/dyncall/distinfo        |   6 +-
 devel/dyncall/files/patch-arm | 176 ------------------------------------------
 devel/dyncall/pkg-plist       |   1 +
 4 files changed, 6 insertions(+), 182 deletions(-)

diff --git a/devel/dyncall/Makefile b/devel/dyncall/Makefile
index 4dd29eb20c39..815a52feb723 100644
--- a/devel/dyncall/Makefile
+++ b/devel/dyncall/Makefile
@@ -1,7 +1,5 @@
-# Created by: Tassilo Philipp <tphilipp@potion-studios.com>
-
 PORTNAME=	dyncall
-DISTVERSION=	1.2
+DISTVERSION=	1.3
 CATEGORIES=	devel
 MASTER_SITES=	https://www.dyncall.org/r${DISTVERSION}/ \
 		http://www.potion-studios.com/
@@ -24,6 +22,7 @@ CFLAGS+=	-fPIC
 
 do-install:
 	${INSTALL_DATA} \
+		${WRKSRC}/dyncall/dyncall_version.h \
 		${WRKSRC}/dyncall/dyncall_value.h \
 		${WRKSRC}/dyncall/dyncall_macros.h \
 		${WRKSRC}/dyncall/dyncall_callf.h \
diff --git a/devel/dyncall/distinfo b/devel/dyncall/distinfo
index 89ef1734d0cf..dffdeda8415d 100644
--- a/devel/dyncall/distinfo
+++ b/devel/dyncall/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1611413243
-SHA256 (dyncall-1.2.tar.gz) = e88154c0243421560704f5c7294afbdec9e991afa0601d5adff5042ea81808d7
-SIZE (dyncall-1.2.tar.gz) = 523701
+TIMESTAMP = 1639737750
+SHA256 (dyncall-1.3.tar.gz) = abf62cfc31ebd7f21658daa1370a7781cc5143162bc0868384ac07def9e3d390
+SIZE (dyncall-1.3.tar.gz) = 540763
diff --git a/devel/dyncall/files/patch-arm b/devel/dyncall/files/patch-arm
deleted file mode 100644
index 0433091778d8..000000000000
--- a/devel/dyncall/files/patch-arm
+++ /dev/null
@@ -1,176 +0,0 @@
-fix arm32 builds when using clang's integrated assembler (syntax-only fix for v1.2 until v1.3 is released)
-
---- dyncall/dyncall_call_arm32_arm_armhf.S.orig	2021-01-22 15:43:00 UTC
-+++ dyncall/dyncall_call_arm32_arm_armhf.S
-@@ -59,7 +59,7 @@ ENTRY_C(dcCall_arm32_armhf)
- 	add r5,  r1, #16 /* r5 = stack args (after intreg ones) */
- 
- 	/* Load 16 single-precision registers (= 8 double-precision registers). */
--	fldmiad r3, {d0-d7}
-+	vldmia r3, {d0-d7}
- 
- 	/* prep stack parameter area (includes room for spill area, callee spills if needed) */
- 	sub r13, r13, r2
-@@ -77,7 +77,7 @@ armhf_pushArgs:
- 
- armhf_call:
- 	ldmia r1, {r0-r3}  /* Load first 4 arguments for new call into r0-r3. */
--	                   /* 'blx %r4' workaround for ARMv4t: */
-+	                   /* 'blx r4' workaround for ARMv4t: */
- 	mov r14, r15       /* Branch return address(r15) -> link register (r14) -- r15 always points to address of current + 2 instructions (= Epilog code). */ 
- 	bx  r4             /* Call (ARM/THUMB), available for ARMv4t. */
- 
---- dyncall/dyncall_call_arm32_thumb_armhf.S.orig	2021-01-22 15:43:00 UTC
-+++ dyncall/dyncall_call_arm32_thumb_armhf.S
-@@ -68,7 +68,7 @@ ENTRY_C(dcCall_arm32_armhf)
- 	mov	r5  , r1	 /* r5 = 'args' (2nd argument is passed in r1). */
- 	
- 	/* Load 16 single-precision registers (= 8 double-precision registers). */
--	fldmiad	r3, {d0-d7}
-+	vldmia	r3, {d0-d7}
- 
- 	sub	r2 , #16	
- 	cmp     r2, #0
-@@ -99,7 +99,7 @@ armhf_pushArgs:
- 
- armhf_call:
- 	ldmia	r5!, {r0-r3}	/* Load first 4 arguments for new call into r0-r3. */
--				/* 'blx %r4' workaround for ARMv4t: */
-+				/* 'blx r4' workaround for ARMv4t: */
- 	// mov	r14, r15	/*   Branch return address(r15) -> link register (r14) -- r15 always points to address of current + 2 instructions (= Epilog code). */ 
- 	mov	r6, r15
- 	add	r6, #5
---- dyncall/dyncall_call_arm32_thumb_gas.s.orig	2021-01-22 15:43:00 UTC
-+++ dyncall/dyncall_call_arm32_thumb_gas.s
-@@ -37,45 +37,45 @@ dcCall_arm32_thumb:
- 
- 	/* Prolog. This function never needs to spill inside its prolog, so just store the permanent registers. */
- 	/* Code below is not using high registers, so not storing them in prolog, which is more involved with thumb, anyways. */
--	push	{%r4-%r7, %r14}		/* Frame ptr, permanent registers, link register -> save area on stack. */
--	mov		%r7, %r13	/* Set frame ptr. */
--	sub		%r13, #4	/* Realign stack to 8 bytes (b/c we stored 5 regs = 20b). */
-+	push	{r4-r7, r14}		/* Frame ptr, permanent registers, link register -> save area on stack. */
-+	mov		r7, r13	/* Set frame ptr. */
-+	sub		r13, #4	/* Realign stack to 8 bytes (b/c we stored 5 regs = 20b). */
- 
- 	/* Call. */
--	mov		%r4, %r0	/* Move 'fptr' to r4 (1st argument is passed in r0). */
--	mov		%r5, %r1	/* Move 'args' to r5 (2nd argument is passed in r1). */
--	mov		%r6, %r2	/* Move 'size' to r6 (3rd argument is passed in r2). */
-+	mov		r4, r0	/* Move 'fptr' to r4 (1st argument is passed in r0). */
-+	mov		r5, r1	/* Move 'args' to r5 (2nd argument is passed in r1). */
-+	mov		r6, r2	/* Move 'size' to r6 (3rd argument is passed in r2). */
- 
--	cmp		%r6, #16	/* Jump to call if no more than 4 arguments. */
-+	cmp		r6, #16	/* Jump to call if no more than 4 arguments. */
- 	ble		call
- 
--	sub		%r6, #16	/* Size of remaining arguments. */
--	mov		%r0, %r13	/* Set stack pointer to top of stack. */
--	sub		%r0, %r0, %r6
--	lsr		%r0, #3		/* Align stack on 8 byte boundaries. */
--	lsl		%r0, #3
--	mov		%r13, %r0
-+	sub		r6, #16	/* Size of remaining arguments. */
-+	mov		r0, r13	/* Set stack pointer to top of stack. */
-+	sub		r0, r0, r6
-+	lsr		r0, #3		/* Align stack on 8 byte boundaries. */
-+	lsl		r0, #3
-+	mov		r13, r0
- 
--	add		%r1, #16	/* Let r1 point to remaining arguments. */
--	mov		%r2, #0		/* Init byte counter to 0. */
-+	add		r1, #16	/* Let r1 point to remaining arguments. */
-+	mov		r2, #0		/* Init byte counter to 0. */
- .thumb_func
- pushArgs:
--	ldrb	%r3, [%r1, %r2]		/* Load a byte into r3. */
--	strb	%r3, [%r0, %r2]		/* Push byte onto stack. */
--	add		%r2, %r2, #1	/* Increment byte counter. */
--	cmp		%r2, %r6
-+	ldrb	r3, [r1, r2]		/* Load a byte into r3. */
-+	strb	r3, [r0, r2]		/* Push byte onto stack. */
-+	add		r2, r2, #1	/* Increment byte counter. */
-+	cmp		r2, r6
- 	bne		pushArgs
- .thumb_func
- call:
--	ldmia	%r5!, {%r0-%r3}		/* Load first 4 arguments for new call into r0-r3. */
-+	ldmia	r5!, {r0-r3}		/* Load first 4 arguments for new call into r0-r3. */
- 					
--					/* 'blx %r4' workaround for ARMv4t in THUMB: */
--	mov		%r6,  %r15	/* Load PC+2 instructions from here */
--	add		%r6,  #5	/* Increment by 2 instructions (Address of 'Epilog') and set bit 0 (THUMB) */
--	mov		%r14, %r6	/* Store in link register. */
--	bx		%r4		/* Branch and force THUMB-mode return (LR bit 0 set). */
-+					/* 'blx r4' workaround for ARMv4t in THUMB: */
-+	mov		r6,  r15	/* Load PC+2 instructions from here */
-+	add		r6,  #5	/* Increment by 2 instructions (Address of 'Epilog') and set bit 0 (THUMB) */
-+	mov		r14, r6	/* Store in link register. */
-+	bx		r4		/* Branch and force THUMB-mode return (LR bit 0 set). */
- 
- 	/* Epilog. */
--	mov		%r13, %r7	/* Reset stack ptr. */
--	pop		{%r4-%r7, %r15}	/* Restore permanent registers and program counter. (Force a stay in THUMB in ARMv4, whether ARMv5 can return in ARM or THUMB depending on the bit 0. */
-+	mov		r13, r7	/* Reset stack ptr. */
-+	pop		{r4-r7, r15}	/* Restore permanent registers and program counter. (Force a stay in THUMB in ARMv4, whether ARMv5 can return in ARM or THUMB depending on the bit 0. */
- 
---- dyncallback/dyncall_callback_arm32_arm_gas.S.orig	2021-01-22 15:43:00 UTC
-+++ dyncallback/dyncall_callback_arm32_arm_gas.S
-@@ -47,37 +47,37 @@ CTX_userdata    =  16
- dcCallbackThunkEntry:
- 
- 	/* Prolog. This function never needs to spill inside its prolog, so just store the permanent registers. */
--	stmdb	%r13, {%r4-%r11, %r13, %r14}	/* Permanent registers and stack pointer, etc... -> save area on stack (except counter). */
--	mov		%r11, %r13						/* Set frame pointer. */
--	sub		%r13, %r13, #40					/* Adjust stack pointer. */
-+	stmdb	r13, {r4-r11, r13, r14}	/* Permanent registers and stack pointer, etc... -> save area on stack (except counter). */
-+	mov		r11, r13						/* Set frame pointer. */
-+	sub		r13, r13, #40					/* Adjust stack pointer. */
- 
- 	/* Grab arguments. */
--	mov		%r4, #0
-+	mov		r4, #0
- #if defined(DC__ABI_ARM_HF)
--	stmdb	%r13!, {%r4}					/* Init freg_count and dreg_count to 0 */
--	stmdb	%r13!, {%r4}
--	fstmdbd	%r13!, {d0-d7}					/* Store all fp-registers in DCArgs' f[16] */
-+	stmdb	r13!, {r4}					/* Init freg_count and dreg_count to 0 */
-+	stmdb	r13!, {r4}
-+	vstmdb	r13!, {d0-d7}					/* Store all fp-registers in DCArgs' f[16] */
- #endif
--	stmdb	%r13!, {%r0-%r4, %r11}			/* Spill first 4 args to DCArgs, along with reg_count (init to 0) and (stack) pointer to remaining args. */
-+	stmdb	r13!, {r0-r4, r11}			/* Spill first 4 args to DCArgs, along with reg_count (init to 0) and (stack) pointer to remaining args. */
- 
- 	/* Prepare callback handler call. */
--	mov		%r0, %r12						/* Parameter 0 (r0) = DCCallback pointer (r12, pointer to thunk). */
--	mov		%r1, %r13						/* Parameter 1 (r1) = DCArgs pointer (r13, stack pointer). */
--	sub		%r13, %r13, #DCValue_size		/* Make room for return value. */
--	mov		%r2, %r13						/* Parameter 2 (r2) = results pointer. */
--	ldr		%r3, [%r12, #CTX_userdata]		/* Parameter 3 (r3) = userdata pointer. */
-+	mov		r0, r12						/* Parameter 0 (r0) = DCCallback pointer (r12, pointer to thunk). */
-+	mov		r1, r13						/* Parameter 1 (r1) = DCArgs pointer (r13, stack pointer). */
-+	sub		r13, r13, #DCValue_size		/* Make room for return value. */
-+	mov		r2, r13						/* Parameter 2 (r2) = results pointer. */
-+	ldr		r3, [r12, #CTX_userdata]		/* Parameter 3 (r3) = userdata pointer. */
- 
- 	/* Call. */
--	ldr		%r4, [%r12, #CTX_handler]		/* Load callback handler pointer into r4. */
--	mov		%r14, %r15						/* Branch return address(r15) -> link register (r14) -- r15 always points to address of current + 2 instructions (= Epilog code). */
--	bx		%r4								/* Call. */
-+	ldr		r4, [r12, #CTX_handler]		/* Load callback handler pointer into r4. */
-+	mov		r14, r15						/* Branch return address(r15) -> link register (r14) -- r15 always points to address of current + 2 instructions (= Epilog code). */
-+	bx		r4								/* Call. */
- 
- 	/* Return value. */
--	ldmia	%r13, {%r0, %r1}				/* Load return value in r0 and r1. */
-+	ldmia	r13, {r0, r1}				/* Load return value in r0 and r1. */
- #if defined(DC__ABI_ARM_HF)
--	fldmiad	%r13, {%d0}						/* Same for floating point return value (if any). */
-+	vldmia	r13, {d0}						/* Same for floating point return value (if any). */
- #endif
- 
- 	/* Epilog. */
--	ldmdb	%r11, {%r4-%r11, %r13, %r15}	/* Restore permanent registers (restore stack ptr and program counter).@@@db not needed since we rewrite r13? */
-+	ldmdb	r11, {r4-r11, r13, r15}	/* Restore permanent registers (restore stack ptr and program counter).@@@db not needed since we rewrite r13? */
- 
diff --git a/devel/dyncall/pkg-plist b/devel/dyncall/pkg-plist
index f53aa77f6e35..52825dc21976 100644
--- a/devel/dyncall/pkg-plist
+++ b/devel/dyncall/pkg-plist
@@ -8,6 +8,7 @@ include/dyncall_macros.h
 include/dyncall_signature.h
 include/dyncall_types.h
 include/dyncall_value.h
+include/dyncall_version.h
 include/dynload.h
 lib/libdyncall_s.a
 lib/libdyncallback_s.a