public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/dev86/, sys-devel/dev86/files/
@ 2022-03-26  7:36 Joonas Niilola
  0 siblings, 0 replies; 2+ messages in thread
From: Joonas Niilola @ 2022-03-26  7:36 UTC (permalink / raw
  To: gentoo-commits

commit:     09a2c0823d2dd32c9000256b48adbf3e93f89afa
Author:     Denis Pronin <dannftk <AT> yandex <DOT> ru>
AuthorDate: Sat Mar 19 10:17:46 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Mar 26 07:36:20 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09a2c082

sys-devel/dev86: add clang patch to 0.16.21-r3

patched bootblocks/makeboot.c of sys-devel/dev86-0.16.21-r3

Signed-off-by: Denis Pronin <dannftk <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/24659
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 sys-devel/dev86/dev86-0.16.21-r3.ebuild              |  3 ++-
 ...6-0.16.21-void-return-check-msdos-clang-fix.patch | 20 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/sys-devel/dev86/dev86-0.16.21-r3.ebuild b/sys-devel/dev86/dev86-0.16.21-r3.ebuild
index 2af636abe3e1..e3784e658bfb 100644
--- a/sys-devel/dev86/dev86-0.16.21-r3.ebuild
+++ b/sys-devel/dev86/dev86-0.16.21-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -22,6 +22,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-0.16.19-fortify.patch"
 	"${FILESDIR}/${P}-non-void-return-clang.patch"
 	"${FILESDIR}/${PN}-0.16.21-make.patch"
+	"${FILESDIR}/${P}-void-return-check-msdos-clang-fix.patch"
 )
 
 src_prepare() {

diff --git a/sys-devel/dev86/files/dev86-0.16.21-void-return-check-msdos-clang-fix.patch b/sys-devel/dev86/files/dev86-0.16.21-void-return-check-msdos-clang-fix.patch
new file mode 100644
index 000000000000..39e3a1296c21
--- /dev/null
+++ b/sys-devel/dev86/files/dev86-0.16.21-void-return-check-msdos-clang-fix.patch
@@ -0,0 +1,20 @@
+--- a/bootblocks/makeboot.c	2020-11-30 00:28:40.383078094 +0300
++++ b/bootblocks/makeboot.c	2020-11-30 00:28:26.969025659 +0300
+@@ -183,6 +183,8 @@
+ unsigned char bpb_flags[100];
+ int has_bpb_overrides = 0;
+
++static void check_msdos();
++
+ main(argc, argv)
+ int argc;
+ char ** argv;
+@@ -1122,7 +1124,7 @@
+
+ /**************************************************************************/
+
+-check_msdos()
++static void check_msdos()
+ {
+    decode_super(buffer);
+    if( dosflds[DOS_CLUST].value == 0 )	/* MSDOS v1.0 */


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/dev86/, sys-devel/dev86/files/
@ 2025-02-07 23:52 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2025-02-07 23:52 UTC (permalink / raw
  To: gentoo-commits

commit:     297c2d0cdc7628da67adb795f4c0f8fae5780f06
Author:     Z. Liu <zhixu.liu <AT> gmail <DOT> com>
AuthorDate: Wed Jan 22 13:50:39 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb  7 23:51:49 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=297c2d0c

sys-devel/dev86: bump to v1.0.1

use "-std=c89" as workaround

Bug: https://bugs.gentoo.org/757675
Bug: https://bugs.gentoo.org/891533
Bug: https://bugs.gentoo.org/920450
Closes: https://bugs.gentoo.org/699812
Signed-off-by: Z. Liu <zhixu.liu <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/40267
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/dev86/Manifest                         |  1 +
 sys-devel/dev86/dev86-1.0.1.ebuild               | 69 ++++++++++++++++++++++++
 sys-devel/dev86/files/dev86-1.0.1-makefile.patch | 66 +++++++++++++++++++++++
 sys-devel/dev86/metadata.xml                     |  1 +
 4 files changed, 137 insertions(+)

diff --git a/sys-devel/dev86/Manifest b/sys-devel/dev86/Manifest
index 4b159bf82448..67c3f0071566 100644
--- a/sys-devel/dev86/Manifest
+++ b/sys-devel/dev86/Manifest
@@ -1 +1,2 @@
 DIST Dev86src-0.16.21.tar.gz 717215 BLAKE2B 977353422937f57d2046f151a53008dcec90f4060d60675dcb81fa58af5f1ed758a1950dcbd211cda57c84b55bf58ffbad28195ff115db50a7a1108d434b8b4e SHA512 6d35dc3c7f9735cf7967cdb2bc0f7bee967ae26667cd8cef56bbdf7d7855ef1d35057db4c0031ff86b9b95d3c8ee44aff408446115b35b6c10cf207a33838016
+DIST Dev86src-1.0.1.tar.gz 745528 BLAKE2B e64ab251342cb97bdb581a6170d269282221983d3c751963e6a3ec2d5f1d6878bdf96740a3a84939e2bed110ec84179e9bd8f55209b2be8f66c178d829ac390e SHA512 0b0e08d8a66faf12599085c44082832101202bfe9c5fcbe4e564e104f56075c699b2680d61924a523fc9f61288a75648ec30cd5257c15abed8d95fab55211231

diff --git a/sys-devel/dev86/dev86-1.0.1.ebuild b/sys-devel/dev86/dev86-1.0.1.ebuild
new file mode 100644
index 000000000000..a5593816d464
--- /dev/null
+++ b/sys-devel/dev86/dev86-1.0.1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit toolchain-funcs
+
+DESCRIPTION="Bruce's C compiler - Simple C compiler to generate 8086 code"
+HOMEPAGE="http://www.debath.co.uk/ https://github.com/lkundrak/dev86"
+SRC_URI="https://codeberg.org/jbruchon/dev86/archive/v${PV}.tar.gz -> Dev86src-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+RDEPEND="sys-devel/bin86"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/${P}-makefile.patch"
+)
+
+S="${WORKDIR}/dev86"
+
+src_prepare() {
+	default
+
+	sed -i -e "s|-O2 -g|${CFLAGS}|" -e '/INEXE=/s:-s::' makefile.in || die
+	sed -i -e "s:/lib/:/$(get_libdir)/:" bcc/bcc.c || die
+	sed -i -e '/INSTALL_OPTS=/s:-s::' bin86/Makefile || die
+	sed -i -e '/install -m 755 -s/s:-s::' dis88/Makefile || die
+}
+
+src_compile() {
+	# Don't mess with CPPFLAGS as they tend to break compilation
+	# (bug #343655).
+	unset CPPFLAGS
+
+	ln -s lib lib64 || die
+	ln -s ../kinclude/arch libc/include/arch || die
+	ln -s ../kinclude/linuxmt libc/include/linuxmt || die
+
+	# First `make` is also a config, so set all the path vars here
+	emake -j1 \
+		CC="$(tc-getCC)" \
+		LIBDIR="/usr/$(get_libdir)/bcc" \
+		INCLDIR="/usr/$(get_libdir)/bcc" \
+		all
+
+	export PATH=${S}/bin:${PATH}
+
+	cd bootblocks || die
+	emake \
+		HOSTCC="$(tc-getCC)"
+
+}
+
+src_install() {
+	emake -j1 install-all DIST="${D}"
+	dostrip -x "/usr/*/bcc/lib*.a /usr/*/i386/libc.a"
+
+	dobin bootblocks/makeboot
+	# remove all the stuff supplied by bin86
+	rm "${D}"/usr/bin/{as,ld,nm,objdump,size}86 || die
+	rm "${D}"/usr/man/man1/{as,ld}86.1 || die
+
+	dodir /usr/share
+	mv "${D}"/usr/{man,share/man} || die
+}

diff --git a/sys-devel/dev86/files/dev86-1.0.1-makefile.patch b/sys-devel/dev86/files/dev86-1.0.1-makefile.patch
new file mode 100644
index 000000000000..0362d7aa49b4
--- /dev/null
+++ b/sys-devel/dev86/files/dev86-1.0.1-makefile.patch
@@ -0,0 +1,66 @@
+quick fix to make build success w/ modern compiler
+
+fix should be done in upstream
+diff --git a/Makefile b/Makefile
+index 359c47a..8868558 100644
+--- a/Makefile
++++ b/Makefile
+@@ -29,7 +29,7 @@ BUILD_LDFLAGS ?= $(LDFLAGS)
+ 
+ # Some makes take the last of a list as the default ...
+ all: make.fil
+-	PATH="`pwd`/bin:$$PATH" $(MAKE) -f make.fil VERSION=$(VERSION) TOPDIR=`pwd` $@
++	PATH="`pwd`/bin:`pwd`/bcc:`pwd`/copt:`pwd`/cpp:$$PATH" $(MAKE) -f make.fil VERSION=$(VERSION) TOPDIR=`pwd` $@
+ 
+ $(TARGETS): make.fil
+ 	PATH="`pwd`/bin:$$PATH" $(MAKE) -f make.fil VERSION=$(VERSION) TOPDIR=`pwd` $@
+diff --git a/bootblocks/Makefile b/bootblocks/Makefile
+index a4c3a2e..4b4aca1 100644
+--- a/bootblocks/Makefile
++++ b/bootblocks/Makefile
+@@ -1,5 +1,5 @@
+ HOSTCC=cc
+-HOSTCCFLAGS=-O2 -pipe
++HOSTCCFLAGS=-O2 -pipe -std=c89 -Wno-error=return-type
+ BCC=bcc
+ AS86=as86
+ 
+diff --git a/dis88/Makefile b/dis88/Makefile
+index 146d1cf..9c3ab4f 100644
+--- a/dis88/Makefile
++++ b/dis88/Makefile
+@@ -25,7 +25,7 @@
+ # be necessary to alter the formats of the tables.
+ 
+ #CC=bcc
+-CFLAGS=-O
++CFLAGS=-O -std=c89
+ LDFLAGS=
+ PREFIX=/usr
+ 
+diff --git a/dis88/dis.h b/dis88/dis.h
+index 21bbc2e..bfc64e7 100644
+--- a/dis88/dis.h
++++ b/dis88/dis.h
+@@ -163,7 +163,7 @@ _PROTOTYPE(void mahand, (int j ));
+ _PROTOTYPE(void mjhand, (int j ));
+ 
+ /* dismain.c */
+-_PROTOTYPE(void main, (int argc, char **argv ));
++_PROTOTYPE(int main, (int argc, char **argv ));
+ 
+ /* distabs.c */
+ _PROTOTYPE(char *getnam, (int k ));
+diff --git a/dis88/dismain.c b/dis88/dismain.c
+index 6f51e73..fb07d3e 100644
+--- a/dis88/dismain.c
++++ b/dis88/dismain.c
+@@ -538,7 +538,7 @@ static void disbss()
+   *                                                         *
+   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ 
+-void
++int
+ main(argc,argv)
+ 
+    int argc;                  /* Command-line args from OS  */

diff --git a/sys-devel/dev86/metadata.xml b/sys-devel/dev86/metadata.xml
index c4f5ea2afda9..6633792f0e6d 100644
--- a/sys-devel/dev86/metadata.xml
+++ b/sys-devel/dev86/metadata.xml
@@ -3,6 +3,7 @@
 <pkgmetadata>
 	<!-- maintainer-needed -->
 	<upstream>
+		<remote-id type="codeberg">jbruchon/dev86</remote-id>
 		<remote-id type="github">lkundrak/dev86</remote-id>
 	</upstream>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-02-07 23:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-07 23:52 [gentoo-commits] repo/gentoo:master commit in: sys-devel/dev86/, sys-devel/dev86/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2022-03-26  7:36 Joonas Niilola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox