summaryrefslogtreecommitdiff
path: root/sys-devel/bin86
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-10-12 18:15:25 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-10-12 18:15:25 +0100
commit36c436b12f9ef2523e5fd963381b78d2dc5cc53d (patch)
treef275068802d3c71dcdd97439f906e36237263361 /sys-devel/bin86
parent3a0e100e02e1c6c2818268f57eae51095cee35af (diff)
gentoo auto-resync : 12:10:2023 - 18:15:24
Diffstat (limited to 'sys-devel/bin86')
-rw-r--r--sys-devel/bin86/Manifest2
-rw-r--r--sys-devel/bin86/bin86-0.16.21-r2.ebuild36
-rw-r--r--sys-devel/bin86/files/bin86-0.16.21-fix-build-for-clang16.patch145
3 files changed, 183 insertions, 0 deletions
diff --git a/sys-devel/bin86/Manifest b/sys-devel/bin86/Manifest
index 7fb603f34af5..0bc37542b52d 100644
--- a/sys-devel/bin86/Manifest
+++ b/sys-devel/bin86/Manifest
@@ -1,4 +1,6 @@
AUX bin86-0.16.21-amd64-build.patch 398 BLAKE2B c9457b574beceac90ba1ae5207b4164426f731252c0e728901ab6ee628a570c4ca95a4395e53b6a3f73fa41107678dd766185daa158e99e6ec609ae026ea48fa SHA512 d7be4857acf46ee6dd803048726083b471dc302c7189c64acf71e00923d736ebe9174a87ed0f90f5eb71221c35c18f2259f0f62a47f8e64c682a6d7afcf2504d
+AUX bin86-0.16.21-fix-build-for-clang16.patch 2756 BLAKE2B 301b22f0b1c103db0ccbc1af3a9d0709daf7541c4edd677835c75ed0e1913b5a4f0891ba00045adec6df3d36ae0efd87b79e2956c74513f9d8e87be427de9e4b SHA512 bb1ba5f1ce33e9d362508f5dd0a3fee5422aa6e113db82f21f86fe9cedf8587504a199d75facf1abf41a9f0fe09a413136773768808ebb13c4d524d290e4d030
DIST bin86-0.16.21.tar.gz 154283 BLAKE2B 6c88a5cf86623130f6ed45cefb9ee9293d8888f4d0e5712d96a24a6fe84bbe5002869761e9c39bb20c8af74e3fe76cf65632ef43e55d81d0e5cb9212f3cae56a SHA512 e80e06965fbdcf13100aae4690071d01a6efe74aed7ff8f14e5892c6803393a1b5acda1296e0f0e1837dfb73e0edd02e9cccfeabbeabe1b68fa6b6b85ced1f56
EBUILD bin86-0.16.21-r1.ebuild 837 BLAKE2B 5fe9c0e2142f56d07baa04a31144fab49d0e260e8b7239d3b32faddd52afe130d647ac242e053efd7719c3268dcdbce467721a660d3c8df8c3859e41fded8c27 SHA512 218ed09c7a38a6dbab4ce0473f433b392fcd272234e6ebbf40c4cc084d995965f3e9f83a26548d5304ab5af231f9afcb0798665cbf60636d92b043f7cae1c9f5
+EBUILD bin86-0.16.21-r2.ebuild 903 BLAKE2B 53fad4d859cbe754f886f1164b9805dbe7e904d13b2e34396ca72039a31927b5baee046510cef5900c89fa708cd3723797e025e4b6868128a2e4c35342d69248 SHA512 4a483a432489989a4d86520611cc216d8f8c30911733b5816e47d667e186ec2b69a5eb26c82e545c73ac27ddc95ef933aece822947a418ab4e10379a0e82c2db
MISC metadata.xml 243 BLAKE2B 88a8c5cbe0638cb7bdd3ddd42933def8a1cd34061ea459a0fc0bf392b72a0555955bd0812488b7024933258fb38f82c4fffaf8cb981a609c2d26f999520d44c5 SHA512 3232362e301749801c78b456fa395a8dd155629d5d06a22a4929ab29405e2ffdf1f1a77414d7c069b30456b87b3909c7c73684b9b44f9cf1e47eff0306c88928
diff --git a/sys-devel/bin86/bin86-0.16.21-r2.ebuild b/sys-devel/bin86/bin86-0.16.21-r2.ebuild
new file mode 100644
index 000000000000..4cabadfd2b2a
--- /dev/null
+++ b/sys-devel/bin86/bin86-0.16.21-r2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Assembler and loader used to create kernel bootsector"
+HOMEPAGE="http://v3.sk/~lkundrak/dev86/"
+SRC_URI="http://v3.sk/~lkundrak/dev86/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+
+PATCHES=( "${FILESDIR}"/${PN}-0.16.21-amd64-build.patch
+ "${FILESDIR}"/${PN}-0.16.21-fix-build-for-clang16.patch
+)
+
+src_prepare() {
+ use elibc_musl && CPPFLAGS="${CPPFLAGS} -U__linux__"
+ sed -i \
+ -e '/^PREFIX/s|=.*|=$(DESTDIR)/usr|' \
+ -e '/^MANDIR/s|)/man/man1|)/share/man/man1|' \
+ -e '/^INSTALL_OPTS/s|-s||' \
+ -e "/^CFLAGS/s|=.*|=${CFLAGS} -D_POSIX_SOURCE ${CPPFLAGS}|" \
+ -e "/^LDFLAGS/s|=.*|=${LDFLAGS}|" \
+ Makefile || die
+ tc-export CC
+ default
+}
+
+src_install() {
+ dodir /usr/bin /usr/share/man/man1
+ default
+}
diff --git a/sys-devel/bin86/files/bin86-0.16.21-fix-build-for-clang16.patch b/sys-devel/bin86/files/bin86-0.16.21-fix-build-for-clang16.patch
new file mode 100644
index 000000000000..9b821ca35850
--- /dev/null
+++ b/sys-devel/bin86/files/bin86-0.16.21-fix-build-for-clang16.patch
@@ -0,0 +1,145 @@
+Subject: [PATCH] fix build for clang 16
+
+clang 16 does not allow implicit int in function declarations
+
+Bug: https://bugs.gentoo.org/880797
+Upstream PR: https://github.com/lkundrak/dev86/pull/26
+
+Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
+---
+ ld/catimage.c | 32 +++++++++++++++++++-------------
+ ld/objchop.c | 16 ++++++++--------
+ 2 files changed, 27 insertions(+), 21 deletions(-)
+
+diff --git a/ld/catimage.c b/ld/catimage.c
+index 1f5e160..47161b9 100644
+--- a/ld/catimage.c
++++ b/ld/catimage.c
+@@ -24,6 +24,7 @@
+ #ifdef __STDC__
+ #include <unistd.h>
+ #include <stdlib.h>
++#include <string.h>
+ #endif
+ #include "x86_aout.h"
+
+@@ -39,9 +40,14 @@ FILE * ofd;
+ FILE * ifd = 0;
+ struct exec header;
+
+-main(argc, argv)
+-int argc;
+-char ** argv;
++void open_obj(char * fname);
++void copy_segment(long out_offset,long in_offset,long length);
++void patch_bin(long file_off, int value);
++void read_symtable(void);
++void fatal(char * str);
++
++int
++main(int argc, char ** argv)
+ {
+ long image_offset, text_off;
+ int image_id;
+@@ -100,8 +106,8 @@ char ** argv;
+ exit(0);
+ }
+
+-open_obj(fname)
+-char * fname;
++void
++open_obj(char * fname)
+ {
+ input_file = fname;
+
+@@ -117,8 +123,8 @@ char * fname;
+ fatal("Input file has bad magic number");
+ }
+
+-copy_segment(out_offset, in_offset, length)
+-long out_offset, in_offset, length;
++void
++copy_segment(long out_offset,long in_offset,long length)
+ {
+ char buffer[1024];
+ int ssize;
+@@ -143,9 +149,8 @@ long out_offset, in_offset, length;
+ }
+ }
+
+-patch_bin(file_off, value)
+-long file_off;
+-int value;
++void
++patch_bin(long file_off, int value)
+ {
+ char wbuf[4];
+ if( file_off > 0 )
+@@ -163,7 +168,8 @@ int value;
+ }
+ }
+
+-read_symtable()
++void
++read_symtable(void)
+ {
+ struct nlist item;
+ int nitems;
+@@ -234,8 +240,8 @@ read_symtable()
+ }
+ }
+
+-fatal(str)
+-char * str;
++void
++fatal(char * str)
+ {
+ fprintf(stderr, "catimage:%s: %s\n", input_file, str);
+ exit(2);
+diff --git a/ld/objchop.c b/ld/objchop.c
+index c7631c1..495df75 100644
+--- a/ld/objchop.c
++++ b/ld/objchop.c
+@@ -16,12 +16,13 @@ main()
+
+ #else
+
++void fatal(char* str);
++void write_file(char *fname, long bsize);
++
+ FILE * ifd;
+ struct exec header;
+
+-main(argc, argv)
+-int argc;
+-char ** argv;
++int main(int argc, char** argv)
+ {
+ FILE * ofd;
+ if( argc != 5 ) fatal("Usage: objchop a.out text.bin data.bin sizes.asm");
+@@ -56,9 +57,8 @@ char ** argv;
+ exit(0);
+ }
+
+-write_file(fname, bsize)
+-char * fname;
+-long bsize;
++void
++write_file(char *fname, long bsize)
+ {
+ char buffer[1024];
+ int ssize;
+@@ -81,8 +81,8 @@ long bsize;
+ fclose(ofd);
+ }
+
+-fatal(str)
+-char * str;
++void
++fatal(char* str)
+ {
+ fprintf(stderr, "objchop: %s\n", str);
+ exit(2);
+--
+2.41.0
+