Wednesday, June 05, 2019

net/megatools: unbreak on gcc archs

Hi,

there have been attempts to unbreak megatools on gcc archs by forcing
C99 mode but this is not enough. -std=c99 disables some extensions used
by this port, namely anonymous unions. -std=gnu99 helps getting past
that, but linking then fails because the code uses _Static_assert from
C11.

So here's a diff to force the use of base-clang or ports-gcc; both
default to -std=gnu11. Drop our only patch while here.

ok?


Index: Makefile
===================================================================
RCS file: /cvs/ports/net/megatools/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- Makefile 19 Dec 2018 08:21:44 -0000 1.17
+++ Makefile 5 Jun 2019 12:52:05 -0000
@@ -5,7 +5,7 @@ PORTROACH = limit:[0-9]\.tar\.gz
COMMENT = command line client application for Mega

DISTNAME = megatools-1.10.2
-REVISION = 1
+REVISION = 2

CATEGORIES = net

@@ -21,6 +21,7 @@ WANTLIB += ssl

MASTER_SITES = https://megatools.megous.com/builds/

+COMPILER = base-clang ports-gcc
BUILD_DEPENDS = devel/gobject-introspection \
textproc/asciidoc
LIB_DEPENDS = devel/glib2 \
@@ -31,8 +32,6 @@ CONFIGURE_STYLE = gnu
MAKE_FLAGS = VERBOSE=1

CONFIGURE_ARGS = --disable-introspection
-
-CFLAGS += -std=c99

SEPARATE_BUILD = Yes

Index: patches/patch-Makefile_in
===================================================================
RCS file: patches/patch-Makefile_in
diff -N patches/patch-Makefile_in
--- patches/patch-Makefile_in 27 Oct 2018 07:32:57 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-Makefile_in,v 1.1 2018/10/27 07:32:57 bentley Exp $
-
-Build in C99 mode. From upstream 5acf268ba4e3df7fb7ebcab5bfef0a5a986fef8c.
-
-Index: Makefile.in
---- Makefile.in.orig
-+++ Makefile.in
-@@ -408,7 +408,8 @@ AM_CFLAGS = \
- $(LIBCURL_CFLAGS) \
- -DG_LOG_DOMAIN=\"Mega\" \
- -I$(srcdir)/lib \
-- -I$(srcdir)
-+ -I$(srcdir) \
-+ -std=c99
-
-
- # }}}

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

No comments:

Post a Comment