rgc <[email protected]> wrote:
> checking for mvaddch in -lcurses... yes
> Package curses was not found in the pkg-config search path
> checking for mvaddch in -lncurses... yes
> Package ncurses was not found in the pkg-config search path
> checking for mvaddch in -ltermlib... yes
> Package termlib was not found in the pkg-config search path
> checking for mvaddch in -lpdcurses... no
> Curses library not found: tried curses, ncurses, termlib and pdcurses.
> *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2928
> 'do-configure': @for d in /usr/ports/pobj/bochs-2.7/bochs-2.7; do cp -f
> /u...)
> *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2948
> '/usr/ports/pobj/bochs-2.7/.configure_done': @cd /usr/ports/emulators/bochs
> ...)
> *** Error 2 in /usr/ports/emulators/bochs
> (/usr/ports/infrastructure/mk/bsd.port.mk:2607 'all': @lock=bochs-2.7;
> export _LOCKS_HELD=" bochs...)
>
> one thing to note about the patch i originally submitted.
> i removed "--with-term" because i could not figure out how
> to fix the above ^^^ error, even with ncurses installed
>
> i still haven't figured out the problem but attaching a
> modified patch with "--with-term" which, of course, does
> not compile
the configure script wants to get the LDFLAGS for ncurses using
pkg-config, but we don't ship .pc files for libncurses, so it fails.
Fixing it is not difficult, but we need to patch the configure script a
bit and regen it, I don't see a simpler solution.
I'm also a bit hesitant in dropping the no_x11 flavor yet, if we really
want to do it then we may also rearrange the makefile a bit. I'd
postpone that matter.
I'm attaching an updated diff that compiles, I still haven't had the
time to properly play with this :/
Thanks,
Omar Polo
Index: Makefile
===================================================================
RCS file: /home/cvs/ports/emulators/bochs/Makefile,v
retrieving revision 1.75
diff -u -p -r1.75 Makefile
--- Makefile 11 Mar 2022 18:59:33 -0000 1.75
+++ Makefile 25 May 2022 21:05:21 -0000
@@ -1,11 +1,10 @@
COMMENT= x86 machine simulator
-DISTNAME= bochs-2.6.9
+DISTNAME= bochs-2.7
CATEGORIES= emulators
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=bochs/}
-REVISION= 2
-HOMEPAGE= http://bochs.sourceforge.net/
+HOMEPAGE= https://bochs.sourceforge.net/
# LGPLv2.1+ and MIT
PERMIT_PACKAGE= Yes
@@ -14,7 +13,7 @@ WANTLIB += ${COMPILER_LIBCXX} c curses m
COMPILER = base-clang ports-gcc base-gcc
-CONFIGURE_STYLE= gnu
+CONFIGURE_STYLE= gnu autoconf no-autoheader
CONFIGURE_ARGS= --enable-all-optimizations \
--enable-avx \
--enable-e1000 \
@@ -28,7 +27,11 @@ CONFIGURE_ARGS= --enable-all-optimizatio
--enable-usb \
--enable-usb-ohci \
--enable-vmx=2 \
- --with-term
+ --with-term \
+ --enable-cet \
+ --enable-evex
+
+AUTOCONF_VERSION = 2.69
FLAVORS= debug no_x11
FLAVOR?=
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/emulators/bochs/distinfo,v
retrieving revision 1.23
diff -u -p -r1.23 distinfo
--- distinfo 23 Apr 2017 13:25:29 -0000 1.23
+++ distinfo 25 May 2022 20:53:12 -0000
@@ -1,2 +1,2 @@
-SHA256 (bochs-2.6.9.tar.gz) = 7ltnf9mxufSEta60YU9D3yGZMIjAwFcRh/k6ywhm6Yw=
-SIZE (bochs-2.6.9.tar.gz) = 5169187
+SHA256 (bochs-2.7.tar.gz) = oBCrG/3HKsWgjS4kEs1HHA/r1mrx2TSbwNeWh53lsXo=
+SIZE (bochs-2.7.tar.gz) = 5298413
Index: patches/patch-Makefile_in
===================================================================
RCS file: /home/cvs/ports/emulators/bochs/patches/patch-Makefile_in,v
retrieving revision 1.11
diff -u -p -r1.11 patch-Makefile_in
--- patches/patch-Makefile_in 11 Mar 2022 18:59:33 -0000 1.11
+++ patches/patch-Makefile_in 25 May 2022 20:53:12 -0000
@@ -1,8 +1,18 @@
Don't gzip the man pages.
---- Makefile.in.orig Sat Mar 18 05:27:48 2017
-+++ Makefile.in Tue Apr 11 21:57:44 2017
-@@ -471,8 +471,8 @@ clean_docbook::
+Index: Makefile.in
+--- Makefile.in.orig
++++ Makefile.in
+@@ -39,7 +39,7 @@ DESTDIR =
+
+ VERSION=@VERSION@
+ REL_STRING=@REL_STRING@
+-MAN_PAGE_1_LIST=bochs bximage bochs-dlx
++MAN_PAGE_1_LIST=bochs bximage
+ MAN_PAGE_5_LIST=bochsrc
+ INSTALL_LIST_SHARE=bios/BIOS-bochs-* bios/VGABIOS* bios/SeaBIOS*
bios/SeaVGABIOS* bios/bios.bin-* bios/vgabios-cirrus.bin-*
@INSTALL_LIST_FOR_PLATFORM@
+ INSTALL_LIST_DOC=CHANGES COPYING LICENSE README TODO misc/slirp.conf
misc/vnet.conf
+@@ -463,8 +463,8 @@ clean_docbook::
install_man::
-mkdir -p $(DESTDIR)$(man1dir)
-mkdir -p $(DESTDIR)$(man5dir)
Index: patches/patch-_bochsrc
===================================================================
RCS file: /home/cvs/ports/emulators/bochs/patches/patch-_bochsrc,v
retrieving revision 1.15
diff -u -p -r1.15 patch-_bochsrc
--- patches/patch-_bochsrc 11 Mar 2022 18:59:33 -0000 1.15
+++ patches/patch-_bochsrc 25 May 2022 20:53:12 -0000
@@ -1,6 +1,7 @@
---- .bochsrc.orig Sun Apr 2 11:43:48 2017
-+++ .bochsrc Tue Apr 11 21:57:44 2017
-@@ -571,7 +571,7 @@ pci: enabled=1, chipset=i440fx
+Index: .bochsrc
+--- .bochsrc.orig
++++ .bochsrc
+@@ -613,7 +613,7 @@ pci: enabled=1, chipset=i440fx
#
# Default value are sync=none, rtc_sync=0, time0=local
#=======================================================================
@@ -9,7 +10,7 @@
#=======================================================================
# CMOSIMAGE:
-@@ -627,13 +627,13 @@ private_colormap: enabled=0
+@@ -669,13 +669,13 @@ private_colormap: enabled=0
# The optional parameter 'write_protected' can be used to control the media
# write protect switch. By default it is turned off.
#=======================================================================
@@ -25,7 +26,7 @@
#=======================================================================
# FLOPPYB:
-@@ -759,8 +759,8 @@ floppy_bootsig_check: disabled=0
+@@ -800,8 +800,8 @@ floppy_bootsig_check: disabled=0
# log: ./bochs.out
# log: /dev/tty
#=======================================================================
Index: patches/patch-configure_in
===================================================================
RCS file: patches/patch-configure_in
diff -N patches/patch-configure_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure_in 25 May 2022 20:58:32 -0000
@@ -0,0 +1,25 @@
+the configure script tries to use pkg-config to get the LDFLAGS for
+ncurses, but we don't have .pc files for libncurses, so fall back to the
+hardcoded -lncurses.
+
+Index: configure.in
+--- configure.in.orig
++++ configure.in
+@@ -2929,17 +2929,7 @@ AC_SUBST(CI_SUPPORT_OBJS)
+ AC_SUBST(EXPORT_DYNAMIC)
+
+ if test "$use_curses" = yes; then
+- if test "$PKGCONFIG" != not_found; then
+- AC_CHECK_LIB(curses, mvaddch, GUI_LINK_OPTS_TERM="`pkg-config --libs
curses`")
+- AC_CHECK_LIB(ncurses, mvaddch, GUI_LINK_OPTS_TERM="`pkg-config --libs
ncurses`")
+- AC_CHECK_LIB(termlib, mvaddch, GUI_LINK_OPTS_TERM="`pkg-config --libs
termlib`")
+- AC_CHECK_LIB(pdcurses, mvaddch, GUI_LINK_OPTS_TERM="`pkg-config --libs
pdcurses`")
+- else
+- AC_CHECK_LIB(curses, mvaddch, GUI_LINK_OPTS_TERM='-lcurses')
+ AC_CHECK_LIB(ncurses, mvaddch, GUI_LINK_OPTS_TERM='-lncurses')
+- AC_CHECK_LIB(termlib, mvaddch, GUI_LINK_OPTS_TERM='-ltermlib')
+- AC_CHECK_LIB(pdcurses, mvaddch, GUI_LINK_OPTS_TERM='-lpdcurses')
+- fi
+ if test "$GUI_LINK_OPTS_TERM" = ""; then
+ echo Curses library not found: tried curses, ncurses, termlib and
pdcurses.
+ exit 1
Index: patches/patch-iodev_network_eth_socket_cc
===================================================================
RCS file:
/home/cvs/ports/emulators/bochs/patches/patch-iodev_network_eth_socket_cc,v
retrieving revision 1.2
diff -u -p -r1.2 patch-iodev_network_eth_socket_cc
--- patches/patch-iodev_network_eth_socket_cc 11 Mar 2022 18:59:33 -0000
1.2
+++ patches/patch-iodev_network_eth_socket_cc 25 May 2022 20:53:12 -0000
@@ -1,20 +1,11 @@
---- iodev/network/eth_socket.cc.orig Tue Apr 11 22:08:35 2017
-+++ iodev/network/eth_socket.cc Tue Apr 11 22:10:14 2017
-@@ -83,12 +83,14 @@ extern "C" {
- #include <sys/types.h>
+Index: iodev/network/eth_socket.cc
+--- iodev/network/eth_socket.cc.orig
++++ iodev/network/eth_socket.cc
+@@ -93,7 +93,6 @@ extern "C" {
#include <sys/socket.h>
#include <sys/ioctl.h>
--#include <netpacket/packet.h>
#include <netinet/in.h>
-#include <net/ethernet.h>
#include <net/if.h>
--#include <linux/types.h>
- #include <netdb.h>
-+#ifdef __linux__
-+#include <netpacket/packet.h>
-+#include <net/ethernet.h>
-+#include <linux/types.h>
-+#endif
- #define closesocket(s) close(s)
- typedef int SOCKET;
- #ifndef INVALID_SOCKET
+ #ifdef __linux__
+ #include <linux/types.h>
Index: pkg/PLIST
===================================================================
RCS file: /home/cvs/ports/emulators/bochs/pkg/PLIST,v
retrieving revision 1.25
diff -u -p -r1.25 PLIST
--- pkg/PLIST 11 Mar 2022 18:59:33 -0000 1.25
+++ pkg/PLIST 25 May 2022 20:53:12 -0000
@@ -1,7 +1,6 @@
@bin bin/bochs
@bin bin/bxhub
@bin bin/bximage
-@man man/man1/bochs-dlx.1
@man man/man1/bochs.1
@man man/man1/bximage.1
@man man/man5/bochsrc.5
@@ -9,14 +8,16 @@ share/bochs/
share/bochs/BIOS-bochs-latest
share/bochs/BIOS-bochs-legacy
share/bochs/SeaBIOS-README
+share/bochs/SeaVGABIOS-README
share/bochs/VGABIOS-elpin-2.40
share/bochs/VGABIOS-elpin-LICENSE
share/bochs/VGABIOS-lgpl-README
share/bochs/VGABIOS-lgpl-latest
+share/bochs/VGABIOS-lgpl-latest-banshee
share/bochs/VGABIOS-lgpl-latest-cirrus
share/bochs/VGABIOS-lgpl-latest-cirrus-debug
share/bochs/VGABIOS-lgpl-latest-debug
-share/bochs/bios.bin-1.7.5
+share/bochs/bios.bin-1.13.0
share/bochs/bochsrc
share/bochs/keymaps/
share/bochs/keymaps/sdl-pc-de.map
@@ -31,9 +32,11 @@ share/bochs/keymaps/x11-pc-fr.map
share/bochs/keymaps/x11-pc-it.map
share/bochs/keymaps/x11-pc-ru.map
share/bochs/keymaps/x11-pc-se.map
+share/bochs/keymaps/x11-pc-sg.map
share/bochs/keymaps/x11-pc-si.map
share/bochs/keymaps/x11-pc-uk.map
share/bochs/keymaps/x11-pc-us.map
+share/bochs/vgabios-cirrus.bin-1.13.0
share/doc/bochs/
share/doc/bochs/CHANGES
share/doc/bochs/COPYING
@@ -42,3 +45,4 @@ share/doc/bochs/README
share/doc/bochs/TODO
share/doc/bochs/bxdebugger.html
share/doc/bochs/slirp.conf
+share/doc/bochs/vnet.conf