arts3: fix with clang on powerpc

clang does not define _CALL_SYSV, breaking an #ifdef. Remove G_VA_COPY
#ifdef hell taken from an old glib version and define G_VA_COPY as
va_copy(3) instead.

Also remove a trailing whitespace in Makefile.

Improved fix and OK jca@
This commit is contained in:
cwen 2020-04-15 15:24:31 +00:00
parent b8f5b768ee
commit 0dda79af5b
3 changed files with 49 additions and 3 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.89 2019/06/08 15:25:57 jca Exp $
# $OpenBSD: Makefile,v 1.90 2020/04/15 15:24:31 cwen Exp $
COMMENT = K Desktop Environment, aRTs
CATEGORIES = x11 x11/kde
VERSION = 3.5.10
REVISION = 16
REVISION = 17
DISTNAME = arts-1.5.10
MODKDE_VERSION = 3.5.8
@ -50,5 +50,5 @@ COMPILER = base-clang ports-gcc base-gcc
post-patch:
cp ${FILESDIR}/audioiosndio.cc ${WRKSRC}/flow
.include <bsd.port.mk>

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-flow_gsl_gslglib_h,v 1.1 2020/04/15 15:24:31 cwen Exp $
Pointless #ifdef hell that breaks with clang on powerpc,
va_copy was introduced in C99
Index: flow/gsl/gslglib.h
--- flow/gsl/gslglib.h.orig
+++ flow/gsl/gslglib.h
@@ -505,13 +505,7 @@ gboolean g_path_is_absolute (const gchar *file_name);
* glibconfig.h may have already defined G_VA_COPY as va_copy or __va_copy.
*/
#if !defined (G_VA_COPY)
-# if defined (__GNUC__) && ( defined (__PPC__) || defined (__s390__) ) && (defined (_CALL_SYSV) || defined (_WIN32) || defined (__s390__) )
-# define G_VA_COPY(ap1, ap2) (*(ap1) = *(ap2))
-# elif defined (G_VA_COPY_AS_ARRAY)
-# define G_VA_COPY(ap1, ap2) g_memmove ((ap1), (ap2), sizeof (va_list))
-# else /* va_list is a pointer */
-# define G_VA_COPY(ap1, ap2) ((ap1) = (ap2))
-# endif /* va_list is a pointer */
+# define G_VA_COPY va_copy
#endif /* !G_VA_COPY */

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-mcop_debug_cc,v 1.1 2020/04/15 15:24:31 cwen Exp $
Pointless #ifdef hell that breaks with clang on powerpc,
va_copy was introduced in C99
Index: mcop/debug.cc
--- mcop/debug.cc.orig
+++ mcop/debug.cc
@@ -381,13 +381,7 @@ typedef struct _GString GString;
* glibconfig.h may have already defined G_VA_COPY as va_copy or __va_copy.
*/
#if !defined (G_VA_COPY)
-# if defined (__GNUC__) && defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32) || defined(WIN32)) || defined(__s390__) || defined(__x86_64__)
-# define G_VA_COPY(ap1, ap2) (*(ap1) = *(ap2))
-# elif defined (G_VA_COPY_AS_ARRAY)
-# define G_VA_COPY(ap1, ap2) g_memmove ((ap1), (ap2), sizeof (va_list))
-# else /* va_list is a pointer */
-# define G_VA_COPY(ap1, ap2) ((ap1) = (ap2))
-# endif /* va_list is a pointer */
+# define G_VA_COPY va_copy
#endif /* !G_VA_COPY */
/* --- glib macros --- */