Gentoo Archives: gentoo-commits

From: Bernard Cafarelli <voyageur@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: gnustep-base/gnustep-base/files/, gnustep-base/gnustep-base/
Date: Thu, 24 Nov 2022 20:38:13
Message-Id: 1669322286.75ac5e2c17405dc3b2c7326f17b539cc9b69ef2d.voyageur@gentoo
1 commit: 75ac5e2c17405dc3b2c7326f17b539cc9b69ef2d
2 Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 24 20:37:51 2022 +0000
4 Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 24 20:38:06 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75ac5e2c
7
8 gnustep-base/gnustep-base: update EAPI 7 -> 8
9
10 Closes: https://bugs.gentoo.org/882641
11 Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>
12
13 .../files/gnustep-base-1.28.0-c99.patch | 67 ++++++++++++++++++++
14 .../gnustep-base/gnustep-base-1.28.0-r2.ebuild | 72 ++++++++++++++++++++++
15 2 files changed, 139 insertions(+)
16
17 diff --git a/gnustep-base/gnustep-base/files/gnustep-base-1.28.0-c99.patch b/gnustep-base/gnustep-base/files/gnustep-base-1.28.0-c99.patch
18 new file mode 100644
19 index 000000000000..8b3fa94ebfa9
20 --- /dev/null
21 +++ b/gnustep-base/gnustep-base/files/gnustep-base-1.28.0-c99.patch
22 @@ -0,0 +1,67 @@
23 +Add missing include files and implicit ints to support building
24 +with a compiler in strict(er) C99 mode.
25 +
26 +diff --git a/config/config.poll-dev.c b/config/config.poll-dev.c
27 +index 413a6a7ad307b8ed..ec323874064c8643 100644
28 +--- a/config/config.poll-dev.c
29 ++++ b/config/config.poll-dev.c
30 +@@ -6,6 +6,7 @@
31 + #include <stdio.h>
32 + #include <fcntl.h>
33 + #include <poll.h>
34 ++#include <unistd.h>
35 +
36 + int
37 + main()
38 +diff --git a/config/config.proccmd.c b/config/config.proccmd.c
39 +index b27d25a56d07b287..3e5a5a38792ee414 100644
40 +--- a/config/config.proccmd.c
41 ++++ b/config/config.proccmd.c
42 +@@ -10,6 +10,8 @@
43 + notice and this notice are preserved.
44 + */
45 + #include <stdio.h>
46 ++#include <unistd.h>
47 ++
48 + int main()
49 + {
50 + char buf[32];
51 +diff --git a/config/config.reuseaddr.c b/config/config.reuseaddr.c
52 +index 45276c8cdf793ba4..6061b7814ef5a457 100644
53 +--- a/config/config.reuseaddr.c
54 ++++ b/config/config.reuseaddr.c
55 +@@ -31,7 +31,7 @@
56 + // Maximum data in single I/O operation
57 + #define NETBUF_SIZE 4096
58 +
59 +-main()
60 ++int main()
61 + {
62 + struct sockaddr_in sin;
63 + int size = sizeof(sin);
64 +diff --git a/config/config.vasprintf.c b/config/config.vasprintf.c
65 +index a3c755ec95c34155..f532502e1d3fba95 100644
66 +--- a/config/config.vasprintf.c
67 ++++ b/config/config.vasprintf.c
68 +@@ -25,6 +25,6 @@ static int func(const char *fmt, ...)
69 + int main()
70 + {
71 + if (func("1234", 0) == 4)
72 +- exit (0);
73 +- exit (-1);
74 ++ return 0;
75 ++ return -1;
76 + }
77 +diff --git a/config/config.vsprintf.c b/config/config.vsprintf.c
78 +index 01a383d6170ed9ff..a4a971e8029425bc 100644
79 +--- a/config/config.vsprintf.c
80 ++++ b/config/config.vsprintf.c
81 +@@ -25,6 +25,6 @@ static int func(const char *fmt, ...)
82 + int main()
83 + {
84 + if (func("1234", 0) == 4)
85 +- exit (0);
86 +- exit (-1);
87 ++ return 0;
88 ++ return -1;
89 + }
90
91 diff --git a/gnustep-base/gnustep-base/gnustep-base-1.28.0-r2.ebuild b/gnustep-base/gnustep-base/gnustep-base-1.28.0-r2.ebuild
92 new file mode 100644
93 index 000000000000..18a52fddef64
94 --- /dev/null
95 +++ b/gnustep-base/gnustep-base/gnustep-base-1.28.0-r2.ebuild
96 @@ -0,0 +1,72 @@
97 +# Copyright 1999-2022 Gentoo Authors
98 +# Distributed under the terms of the GNU General Public License v2
99 +
100 +EAPI=8
101 +inherit gnustep-base toolchain-funcs
102 +
103 +DESCRIPTION="A library of general-purpose, non-graphical Objective C objects"
104 +HOMEPAGE="http://www.gnustep.org"
105 +SRC_URI="ftp://ftp.gnustep.org/pub/gnustep/core/${P}.tar.gz"
106 +
107 +LICENSE="GPL-2 LGPL-2.1"
108 +SLOT="0/$(ver_cut 1-2)"
109 +KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
110 +IUSE="+gnutls +iconv +icu +libffi zeroconf"
111 +
112 +RDEPEND="${GNUSTEP_CORE_DEPEND}
113 + >=gnustep-base/gnustep-make-2.6.0
114 + gnutls? ( net-libs/gnutls:= )
115 + iconv? ( virtual/libiconv )
116 + icu? ( >=dev-libs/icu-49.0:= )
117 + !libffi? ( dev-libs/ffcall
118 + gnustep-base/gnustep-make[-native-exceptions] )
119 + libffi? ( dev-libs/libffi:= )
120 + >=dev-libs/libxml2-2.6
121 + >=dev-libs/libxslt-1.1
122 + >=dev-libs/gmp-4.1:=
123 + >=sys-libs/zlib-1.2
124 + zeroconf? ( net-dns/avahi )"
125 +DEPEND="${RDEPEND}
126 + virtual/pkgconfig"
127 +
128 +PATCHES=(
129 + "${FILESDIR}"/${PN}-1.26.0-no_compress_man.patch
130 + "${FILESDIR}"/${P}-c99.patch
131 +)
132 +
133 +src_configure() {
134 + egnustep_env
135 +
136 + local myconf
137 + if use libffi ; then
138 + myconf="--enable-libffi --disable-ffcall --with-ffi-include=$($(tc-getPKG_CONFIG) --variable=includedir libffi)"
139 + else
140 + myconf="--disable-libffi --enable-ffcall"
141 + fi
142 +
143 + myconf="$myconf $(use_enable gnutls tls)"
144 + myconf="$myconf $(use_enable iconv)"
145 + myconf="$myconf $(use_enable icu)"
146 + myconf="$myconf $(use_enable zeroconf)"
147 + myconf="$myconf --with-xml-prefix=${EPREFIX}/usr"
148 + myconf="$myconf --with-gmp-include=${EPREFIX}/usr/include --with-gmp-library=${EPREFIX}/usr/lib"
149 + myconf="$myconf --with-default-config=${EPREFIX}/etc/GNUstep/GNUstep.conf"
150 +
151 + econf $myconf
152 +}
153 +
154 +src_install() {
155 + # We need to set LD_LIBRARY_PATH because the doc generation program
156 + # uses the gnustep-base libraries. Since egnustep_env "cleans the
157 + # environment" including our LD_LIBRARY_PATH, we're left no choice
158 + # but doing it like this.
159 +
160 + egnustep_env
161 + egnustep_install
162 +
163 + if use doc ; then
164 + export LD_LIBRARY_PATH="${S}/Source/obj:${LD_LIBRARY_PATH}"
165 + egnustep_doc
166 + fi
167 + egnustep_install_config
168 +}