feat: v8.3.538

This commit is contained in:
Torleif Skår 2025-08-11 00:59:28 +02:00
parent aa551575f6
commit 6b42b35ff3
4 changed files with 569 additions and 37 deletions

View file

@ -1,6 +1,6 @@
pkgbase = magic
pkgdesc = A VLSI layout system
pkgver = 8.3.533
pkgver = 8.3.538
pkgrel = 1
url = http://opencircuitdesign.com/magic/
arch = i686
@ -21,9 +21,9 @@ pkgbase = magic
optdepends = glu: Vector fonts for OpenGL renderer
optdepends = cairo: 2D accelerated graphics, alternative to OGL
optdepends = blt: to create a tree diagram of the cell hierarchy in a design
source = magic-8.3.533::git+https://github.com/RTimothyEdwards/magic#tag=8.3.533
source = 0001-set_std_gnu17_default.patch
b2sums = 04ab86926e69c999ff209f0a50bcff9f559a5e241351faf214a7f5da343ea26dcb3baa63e6655c5124bcede17ba84ab9815588f35ffda1b78aace59b0b2fbc01
b2sums = 37eaa5bbaab691216ffc06485e6d5d934c74f63e74a876da5bedb0f9fd98f404abfbaa902b9fa979e276e38ba660b4049fbe3d6ff43b591e1d1d3fb2d128eb51
source = magic-8.3.538::git+https://github.com/RTimothyEdwards/magic#tag=8.3.538
source = 0001-fixup-magsgtty.patch
b2sums = 41410b62807ee241f7c276a6144e288aeb58ae7d88360294bf342f3f29bb5ea643799478b1986f922de800d3c9cde884d78512387ed55000f406dcc134c318ac
b2sums = 72d1a9742c72041204c05aca45639251ab49768c43b1829bc40e6f0857fd93c0a7e32e433a0090996e17af1fc588e26677c24487bf04d5a14a86c8f5e4a2402c
pkgname = magic

553
0001-fixup-magsgtty.patch Normal file
View file

@ -0,0 +1,553 @@
From cc0c02c0f2776aaeb056196ad8e7589c60911997 Mon Sep 17 00:00:00 2001
From: "Darryl L. Miles" <darryl.miles@darrylmiles.org>
Date: Thu, 31 Jul 2025 22:59:00 +0100
Subject: [PATCH] utils/magsgtty.h removal and fixup
---
graphics/grMain.c | 1 -
graphics/grNull.c | 1 -
graphics/grOGL1.c | 1 -
graphics/grOGL4.c | 1 -
graphics/grTCairo1.c | 1 -
graphics/grTCairo4.c | 1 -
graphics/grTOGL1.c | 1 -
graphics/grTOGL4.c | 1 -
graphics/grTk1.c | 1 -
graphics/grTk4.c | 1 -
graphics/grX11su1.c | 1 -
graphics/grX11su4.c | 1 -
textio/textioInt.h | 14 -----
textio/txCommands.c | 1 -
textio/txInput.c | 125 +++++++++++++++----------------------------
textio/txMain.c | 1 -
textio/txOutput.c | 1 -
utils/magsgtty.h | 72 ++++++++++++++-----------
utils/main.c | 1 -
utils/signals.c | 1 -
20 files changed, 84 insertions(+), 144 deletions(-)
diff --git a/graphics/grMain.c b/graphics/grMain.c
index 8d98ef0b4..59480ce51 100644
--- a/graphics/grMain.c
+++ b/graphics/grMain.c
@@ -63,7 +63,6 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include <unistd.h>
#include "utils/magic.h"
-#include "utils/magsgtty.h"
#include "textio/textio.h"
#include "utils/geometry.h"
#include "utils/hash.h"
diff --git a/graphics/grNull.c b/graphics/grNull.c
index a4d645195..5aa3f5aa8 100644
--- a/graphics/grNull.c
+++ b/graphics/grNull.c
@@ -20,7 +20,6 @@
#include <stdio.h>
#include <string.h>
-#include "utils/magsgtty.h"
#include "utils/magic.h"
#include "utils/geometry.h"
#include "windows/windows.h"
diff --git a/graphics/grOGL1.c b/graphics/grOGL1.c
index 2ba1b1b0d..4f84e2821 100644
--- a/graphics/grOGL1.c
+++ b/graphics/grOGL1.c
@@ -17,7 +17,6 @@
#include <signal.h>
#include "utils/magic.h"
-#include "utils/magsgtty.h"
#include "utils/geometry.h"
#include "graphics/graphics.h"
#include "windows/windows.h"
diff --git a/graphics/grOGL4.c b/graphics/grOGL4.c
index 472b1caa8..339bca232 100644
--- a/graphics/grOGL4.c
+++ b/graphics/grOGL4.c
@@ -22,7 +22,6 @@
#include <X11/Xlib.h>
#include "utils/magic.h"
-#include "utils/magsgtty.h"
#include "textio/textio.h"
#include "utils/geometry.h"
#include "graphics/graphics.h"
diff --git a/graphics/grTCairo1.c b/graphics/grTCairo1.c
index a3f995639..5c6aeee34 100644
--- a/graphics/grTCairo1.c
+++ b/graphics/grTCairo1.c
@@ -28,7 +28,6 @@
#include "utils/main.h"
#include "utils/magic.h"
#include "utils/malloc.h"
-#include "utils/magsgtty.h"
#include "utils/geometry.h"
#include "windows/windows.h"
#include "graphics/graphics.h"
diff --git a/graphics/grTCairo4.c b/graphics/grTCairo4.c
index 506b03b0d..b841e784c 100644
--- a/graphics/grTCairo4.c
+++ b/graphics/grTCairo4.c
@@ -15,7 +15,6 @@
#include "tcltk/tclmagic.h"
#include "utils/magic.h"
-#include "utils/magsgtty.h"
#include "textio/textio.h"
#include "utils/geometry.h"
#include "windows/windows.h"
diff --git a/graphics/grTOGL1.c b/graphics/grTOGL1.c
index 7849f6593..6e747e71c 100644
--- a/graphics/grTOGL1.c
+++ b/graphics/grTOGL1.c
@@ -26,7 +26,6 @@
#include "utils/main.h"
#include "utils/magic.h"
#include "utils/malloc.h"
-#include "utils/magsgtty.h"
#include "utils/geometry.h"
#include "windows/windows.h"
#include "graphics/graphics.h"
diff --git a/graphics/grTOGL4.c b/graphics/grTOGL4.c
index 9912d3ef4..37798281f 100644
--- a/graphics/grTOGL4.c
+++ b/graphics/grTOGL4.c
@@ -13,7 +13,6 @@
#include "tcltk/tclmagic.h"
#include "utils/magic.h"
-#include "utils/magsgtty.h"
#include "textio/textio.h"
#include "utils/geometry.h"
#include "windows/windows.h"
diff --git a/graphics/grTk1.c b/graphics/grTk1.c
index 01c59d8c0..0d745ef0b 100644
--- a/graphics/grTk1.c
+++ b/graphics/grTk1.c
@@ -23,7 +23,6 @@
#include "utils/main.h"
#include "utils/magic.h"
#include "utils/malloc.h"
-#include "utils/magsgtty.h"
#include "utils/geometry.h"
#include "windows/windows.h"
#include "graphics/graphics.h"
diff --git a/graphics/grTk4.c b/graphics/grTk4.c
index 207f53598..1042ee60a 100644
--- a/graphics/grTk4.c
+++ b/graphics/grTk4.c
@@ -13,7 +13,6 @@
#include "tcltk/tclmagic.h"
#include "utils/magic.h"
-#include "utils/magsgtty.h"
#include "textio/textio.h"
#include "utils/geometry.h"
#include "windows/windows.h"
diff --git a/graphics/grX11su1.c b/graphics/grX11su1.c
index 5c8834894..8e5cc2017 100644
--- a/graphics/grX11su1.c
+++ b/graphics/grX11su1.c
@@ -31,7 +31,6 @@
#include <X11/Xutil.h>
#include "utils/magic.h"
-#include "utils/magsgtty.h"
#include "textio/textio.h"
#include "utils/geometry.h"
#include "textio/txcommands.h"
diff --git a/graphics/grX11su4.c b/graphics/grX11su4.c
index 2a4c45ca9..5a041f678 100644
--- a/graphics/grX11su4.c
+++ b/graphics/grX11su4.c
@@ -22,7 +22,6 @@
#include <X11/Xlib.h>
#include "utils/magic.h"
-#include "utils/magsgtty.h"
#include "textio/textio.h"
#include "utils/geometry.h"
#include "graphics/graphics.h"
diff --git a/textio/textioInt.h b/textio/textioInt.h
index f33f55d39..2168cb0e0 100644
--- a/textio/textioInt.h
+++ b/textio/textioInt.h
@@ -42,20 +42,6 @@ typedef struct {
#define TX_PROMPT '>'
#define TX_CMD_PROMPT ":"
-/* all of the state associated with a tty terminal */
-#if !defined(SYSV) && !defined(CYGWIN) && !defined(__OpenBSD__) && !defined(EMSCRIPTEN)
-#if defined(HAVE_SYS_IOCTL_COMPAT_H) || defined(HAVE_SGTTY_H)
-#if defined(HAVE_SYS_IOCTL_COMPAT_H)
-#include <sys/ioctl_compat.h> /* replaced sgtty.h */
-#elif defined(HAVE_SGTTY_H)
-#include <sgtty.h>/* legacy - struct sgttyb{} defn */
-#endif
-typedef struct {
- struct sgttyb tx_i_sgtty;
- struct tchars tx_i_tchars;
-} txTermState;
-#endif /* HAVE_SYS_IOCTL_COMPAT_H || HAVE_SGTTY_H */
-#endif /* SYSV */
extern bool TxGetInputEvent(bool block, bool returnOnSigWinch);
diff --git a/textio/txCommands.c b/textio/txCommands.c
index 15ec17c3b..d057cc58b 100644
--- a/textio/txCommands.c
+++ b/textio/txCommands.c
@@ -39,7 +39,6 @@ static char rcsid[] __attribute__ ((unused)) ="$Header: /usr/cvsroot/magic-8.0/t
#endif
#include "tcltk/tclmagic.h"
-#include "utils/magsgtty.h"
#include "utils/magic.h"
#include "textio/textio.h"
#include "utils/geometry.h"
diff --git a/textio/txInput.c b/textio/txInput.c
index 1955daf69..c0f5218cc 100644
--- a/textio/txInput.c
+++ b/textio/txInput.c
@@ -32,14 +32,13 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include <dirent.h>
-#include "utils/magsgtty.h"
#include "utils/magic.h"
-#include "utils/magsgtty.h"
#include "utils/main.h"
#include "textio/textio.h"
#include "utils/geometry.h"
#include "textio/txcommands.h"
#include "textio/textioInt.h"
+#include "utils/magsgtty.h" /* txTermState */
#include "utils/dqueue.h"
#include "utils/macros.h"
#include "utils/hash.h"
@@ -1223,36 +1222,21 @@ TxGetLine(
* ----------------------------------------------------------------------------
*/
-#if defined(SYSV) || defined(CYGWIN)
-
-void
-txGetTermState(
- struct termio *buf)
-{
- ioctl( fileno( stdin ), TCGETA, buf);
-}
-
-#elif defined (__OpenBSD__) || defined(EMSCRIPTEN)
-
-void
-txGetTermState(
- struct termios *buf)
-{
- (void) tcgetattr(fileno(stdin), buf);
-}
-
-#else
-
void
txGetTermState(
txTermState *buf)
{
+#if defined(HAVE_TERMIOS_H)
+ (void) tcgetattr(fileno(stdin), &buf->termios);
+#elif defined(HAVE_TERMIO_H)
+ ioctl(fileno(stdin), TCGETA, &buf->termio);
+#else /* sgtty */
ASSERT(TxStdinIsatty, "txGetTermState");
/* save the current terminal characteristics */
- (void) ioctl(fileno(stdin), TIOCGETP, (char *) &(buf->tx_i_sgtty) );
- (void) ioctl(fileno(stdin), TIOCGETC, (char *) &(buf->tx_i_tchars) );
+ (void) ioctl(fileno(stdin), TIOCGETP, (char *) &buf->tx_i_sgtty);
+ (void) ioctl(fileno(stdin), TIOCGETC, (char *) &buf->tx_i_tchars);
+#endif
}
-#endif /* SYSV */
/*
@@ -1271,24 +1255,17 @@ txGetTermState(
void
txSetTermState(
-#if defined(SYSV) || defined(CYGWIN)
- struct termio *buf
-#elif defined (__OpenBSD__) || defined(EMSCRIPTEN)
- struct termios *buf
-#else
- txTermState *buf
-#endif /* SYSV */
- )
+ txTermState *buf)
{
-#if defined(SYSV) || defined(CYGWIN)
- ioctl( fileno(stdin), TCSETAF, buf );
-#elif defined (__OpenBSD__) || defined(EMSCRIPTEN)
- (void) tcsetattr( fileno(stdin), TCSANOW, buf );
-#else
+#if defined(HAVE_TERMIOS_H)
+ (void) tcsetattr(fileno(stdin), TCSANOW, &buf->termios);
+#elif defined(HAVE_TERMIO_H)
+ ioctl(fileno(stdin), TCSETAF, &buf->termio);
+#else /* sgtty */
/* set the current terminal characteristics */
- (void) ioctl(fileno(stdin), TIOCSETN, (char *) &(buf->tx_i_sgtty) );
- (void) ioctl(fileno(stdin), TIOCSETC, (char *) &(buf->tx_i_tchars) );
-#endif /* SYSV */
+ (void) ioctl(fileno(stdin), TIOCSETN, (char *) &buf->tx_i_sgtty);
+ (void) ioctl(fileno(stdin), TIOCSETC, (char *) &buf->tx_i_tchars);
+#endif
}
@@ -1311,37 +1288,27 @@ txSetTermState(
void
txInitTermRec(
-#if defined(SYSV) || defined(CYGWIN)
- struct termio *buf
-#elif defined (__OpenBSD__) || defined(EMSCRIPTEN)
- struct termios *buf
-#else
- txTermState *buf
-#endif /* SYSV */
- )
+ txTermState *buf)
{
-#if defined(SYSV) || defined(CYGWIN) || defined(__OpenBSD__) || defined(EMSCRIPTEN)
- buf->c_lflag = ISIG; /* raw: no echo and no processing, allow signals */
- buf->c_cc[ VMIN ] = 1;
- buf->c_cc[ VTIME ] = 0;
-#else
+#if defined(HAVE_TERMIOS_H)
+ buf->termios.c_lflag = ISIG; /* raw: no echo and no processing, allow signals */
+ buf->termios.c_cc[ VMIN ] = 1;
+ buf->termios.c_cc[ VTIME ] = 0;
+#elif defined(HAVE_TERMIO_H)
+ buf->termio.c_lflag = ISIG; /* raw: no echo and no processing, allow signals */
+ buf->termio.c_cc[ VMIN ] = 1;
+ buf->termio.c_cc[ VTIME ] = 0;
+#else /* sgtty */
/* set things up for us, turn off echo, turn on cbreak, no EOF */
buf->tx_i_sgtty.sg_flags |= CBREAK;
buf->tx_i_sgtty.sg_flags &= ~ECHO;
buf->tx_i_tchars.t_eofc = -1;
-
-#endif /* SYSV */
+#endif
}
-#if defined(SYSV) || defined(CYGWIN)
-struct termio closeTermState;
-#elif defined (__OpenBSD__) || defined(EMSCRIPTEN)
-struct termios closeTermState;
-#else
static txTermState closeTermState;
-#endif /* SYSV */
static bool haveCloseState = FALSE;
@@ -1364,21 +1331,21 @@ static bool haveCloseState = FALSE;
void
txSaveTerm(void)
{
-#if defined(SYSV) || defined(CYGWIN)
- ioctl( fileno( stdin ), TCGETA, &closeTermState);
- txEraseChar = closeTermState.c_cc[VERASE];
- txKillChar = closeTermState.c_cc[VKILL];
- TxEOFChar = closeTermState.c_cc[VEOF];
- TxInterruptChar = closeTermState.c_cc[VINTR];
+#if defined(HAVE_TERMIOS_H)
+ (void) tcgetattr(fileno(stdin), &closeTermState.termios);
+ txEraseChar = closeTermState.termios.c_cc[VERASE];
+ txKillChar = closeTermState.termios.c_cc[VKILL];
+ TxEOFChar = closeTermState.termios.c_cc[VEOF];
+ TxInterruptChar = closeTermState.termios.c_cc[VINTR];
haveCloseState = TRUE;
-#elif defined (__OpenBSD__) || defined(EMSCRIPTEN)
- (void) tcgetattr( fileno( stdin ), &closeTermState);
- txEraseChar = closeTermState.c_cc[VERASE];
- txKillChar = closeTermState.c_cc[VKILL];
- TxEOFChar = closeTermState.c_cc[VEOF];
- TxInterruptChar = closeTermState.c_cc[VINTR];
+#elif defined(HAVE_TERMIO_H)
+ ioctl(fileno(stdin), TCGETA, &closeTermState.termio);
+ txEraseChar = closeTermState.termio.c_cc[VERASE];
+ txKillChar = closeTermState.termio.c_cc[VKILL];
+ TxEOFChar = closeTermState.termio.c_cc[VEOF];
+ TxInterruptChar = closeTermState.termio.c_cc[VINTR];
haveCloseState = TRUE;
-#else
+#else /* sgtty */
struct ltchars lt;
txGetTermState(&closeTermState);
(void) ioctl(fileno(stdin), TIOCGLTC, (char *) &lt);
@@ -1391,7 +1358,7 @@ txSaveTerm(void)
TxEOFChar = closeTermState.tx_i_tchars.t_eofc;
TxInterruptChar = closeTermState.tx_i_tchars.t_intrc;
haveCloseState = TRUE;
-#endif /* SYSV */
+#endif
}
@@ -1412,13 +1379,7 @@ txSaveTerm(void)
void
TxSetTerminal(void)
{
-#if defined(SYSV) || defined(CYGWIN)
- struct termio buf;
-#elif defined (__OpenBSD__) || defined(EMSCRIPTEN)
- struct termios buf;
-#else
txTermState buf;
-#endif /* SYSV */
#ifdef MAGIC_WRAPPER
/* If using Tk console, don't mess with the terminal settings; */
diff --git a/textio/txMain.c b/textio/txMain.c
index 17e2b185d..e202cc2f5 100644
--- a/textio/txMain.c
+++ b/textio/txMain.c
@@ -26,7 +26,6 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include <string.h>
#include <unistd.h>
-#include "utils/magsgtty.h"
#include "utils/magic.h"
#include "textio/textio.h"
#include "utils/geometry.h"
diff --git a/textio/txOutput.c b/textio/txOutput.c
index f4f2d1ee5..fd0eb8d06 100644
--- a/textio/txOutput.c
+++ b/textio/txOutput.c
@@ -31,7 +31,6 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include <sys/stat.h>
#include <unistd.h>
-#include "utils/magsgtty.h"
#include "utils/magic.h"
#include "textio/textio.h"
#include "utils/geometry.h"
diff --git a/utils/magsgtty.h b/utils/magsgtty.h
index 59e0678ad..c7f31b315 100644
--- a/utils/magsgtty.h
+++ b/utils/magsgtty.h
@@ -21,44 +21,54 @@
#ifndef _MAGIC__UTILS__MAGSGTTY_H
#define _MAGIC__UTILS__MAGSGTTY_H
-/* maybe this can be #ifndef HAVE_TERMIO_H */
-#if !defined(SYSV) && !defined(CYGWIN)
-# ifdef ALPHA
-# undef MAX
-# undef MIN
-# endif
-
-/* unclear what platform requires this OpenBSD/FreeBSD ? */
-# ifndef COMPAT_43TTY
-# define COMPAT_43TTY
-# endif
+#if defined(HAVE_TERMIOS_H)
+ /* In modern times everything has POSIX */
+ #include <termios.h>
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
+ #ifdef HAVE_SYS_IOCTL_H
+ /* Linux glibx 2.x - present
+ * FreeBSD 14.3-RELEASE - present
+ * Solaris 11.4 - present
+ */
+ #include <sys/ioctl.h>
+ #endif
-#if defined(HAVE_TERMIOS_H)
-#include <termios.h>
-#elif defined(HAVE_SYS_IOCTL_COMPAT_H)
-/* unclear which platform(s) require <sys/ioctl_compat.h> and the structure
- * of this file is such that it will try to include it by default, better
- * to invert the #if and only select this on the known platforms that need
- * it so that <termios.h> goes by default, which exists on MacOSX, Linux, etc..
- * many possible solutions to make this work by default:
- * HAVE_SYS_IOCTL_COMPAT_H ? HAVE_TERMIOS_H ? !defined(linux) at top (MaxOSX is BSD type)
- */
-#include <sys/ioctl_compat.h> /* replaced sgtty.h */
-#elif defined(HAVE_SGTTY_H)
-#include <sgtty.h> /* legacy - struct sgttyb{} defn */
+#elif defined(HAVE_TERMIO_H)
+ /* Linux glibx 2.x - present (just includes termios.h & sys/ioctl.h)
+ * Linux glibc 2.45+ - not present
+ * FreeBSD 14.3-RELEASE - not present
+ * Solaris 11.4 - present
+ */
+ #include <termio.h>
+#else /* sgtty */
+ #if defined(HAVE_SYS_IOCTL_COMPAT_H)
+ /* Linux glibc2.x - not present
+ * FreeBSD 14.3-RELEASE - not present
+ * Solaris 11.4 - not present
+ */
+ #include <sys/ioctl_compat.h> /* replaced sgtty.h */
+ #elif defined(HAVE_SGTTY_H)
+ /* Linux glibc2.x - present (includes sys/ioctl.h)
+ * FreeBSD 14.3-RELEASE - not present
+ * Solaris 11.4 - present
+ */
+ #include <sgtty.h> /* legacy - struct sgttyb{} defn */
+ #endif
#endif
-#else
-#if defined(HAVE_TERMIO_H)
-#include <termio.h>
+/* all of the state associated with a tty terminal */
+typedef struct {
+#if defined(HAVE_TERMIOS_H)
+ struct termios termios;
+#elif defined(HAVE_TERMIO_H)
+ struct termio termio;
+#else /* sgtty */
+ struct sgttyb tx_i_sgtty;
+ struct tchars tx_i_tchars;
#endif
+} txTermState;
-#endif /* !SYSV && !CYGWIN */
#endif /* _MAGIC__UTILS__MAGSGTTY_H */
diff --git a/utils/main.c b/utils/main.c
index b7d051315..b613ec23b 100644
--- a/utils/main.c
+++ b/utils/main.c
@@ -37,7 +37,6 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include "utils/main.h"
#include "utils/magic.h"
#include "utils/malloc.h"
-#include "utils/magsgtty.h"
#include "utils/hash.h"
#include "utils/macros.h"
#include "textio/textio.h"
diff --git a/utils/signals.c b/utils/signals.c
index 16ed25997..74e80aef2 100644
--- a/utils/signals.c
+++ b/utils/signals.c
@@ -33,7 +33,6 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include "tcltk/tclmagic.h"
#include "utils/main.h"
#include "utils/magic.h"
-#include "utils/magsgtty.h"
#include "textio/textio.h"
#include "utils/geometry.h"
#include "utils/signals.h"

View file

@ -1,25 +0,0 @@
From 67639fd226dae7335dd386a1246997d5229a9189 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Torleif=20Sk=C3=A5r?= <torleif.skaar AT gmail DOT com>
Date: Wed, 21 May 2025 02:33:37 +0200
Subject: [PATCH] configure: Set '-std=gnu17' as default due to issues with
default C23
For more explanation, see:
https://github.com/RTimothyEdwards/magic/issues/401
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index ae0a0fc1..0f758e5e 100755
--- a/configure
+++ b/configure
@@ -9,4 +9,4 @@
# script itself. It also sets up CFLAGS without the default optimizer
# flag (-O2).
-( CFLAGS="-g"; export CFLAGS; cd scripts ; ./configure "$@" )
+( CFLAGS="-g -std=gnu17"; export CFLAGS; cd scripts ; ./configure "$@" )
--
2.49.0

View file

@ -2,7 +2,7 @@
# Contributor: Kyle Keen <keenerd@gmail.com>
# Contributor: Jared Casper <jaredcasper@gmail.com>
pkgname=magic
pkgver=8.3.533
pkgver=8.3.538
pkgrel=1
pkgdesc="A VLSI layout system"
_git_url="https://github.com/RTimothyEdwards/magic"
@ -35,10 +35,11 @@ optdepends=(
_archive="${pkgname}-${pkgver}"
source=(
"${_archive}::git+${_git_url}#tag=${pkgver}"
"0001-set_std_gnu17_default.patch"
"0001-fixup-magsgtty.patch"
)
b2sums=('04ab86926e69c999ff209f0a50bcff9f559a5e241351faf214a7f5da343ea26dcb3baa63e6655c5124bcede17ba84ab9815588f35ffda1b78aace59b0b2fbc01'
'37eaa5bbaab691216ffc06485e6d5d934c74f63e74a876da5bedb0f9fd98f404abfbaa902b9fa979e276e38ba660b4049fbe3d6ff43b591e1d1d3fb2d128eb51')
b2sums=('41410b62807ee241f7c276a6144e288aeb58ae7d88360294bf342f3f29bb5ea643799478b1986f922de800d3c9cde884d78512387ed55000f406dcc134c318ac'
'72d1a9742c72041204c05aca45639251ab49768c43b1829bc40e6f0857fd93c0a7e32e433a0090996e17af1fc588e26677c24487bf04d5a14a86c8f5e4a2402c')
options=()
@ -46,14 +47,17 @@ options=()
prepare() {
cd "${_archive}"
# See upstream issue: https://github.com/RTimothyEdwards/magic/issues/401
# for more details about why we need to use C17 + GNU extensions
patch -Np1 < "../0001-set_std_gnu17_default.patch"
# To compile with Glibc v2.42 we need to patch magsgtty
# See: https://github.com/RTimothyEdwards/magic/issues/434
patch -Np1 < "../0001-fixup-magsgtty.patch"
}
build() {
cd "${_archive}"
# See upstream issue: https://github.com/RTimothyEdwards/magic/issues/401
# for more details about why we need to use C17
export CFLAGS="${CFLAGS} -std=c17 -D_DEFAULT_SOURCE=1"
./configure --prefix=/usr
make
}