Opened 5 years ago

Last modified 8 months ago

#1638 new bug

Unable to build GCU on OpenBSD

Reported by: Aerdan Owned by:
Milestone: Future Keywords:
Cc:

Description

At the moment it is impossible to build the GCU interface on OpenBSD using autoconf; OpenBSD provides curses as part of its core library. Unlike ncurses on Linux, it does not provide ncurses5-config or ncursesw5-config, which the configure script presently uses to try and detect curses.

I think it would be useful to check for a function we require in curses in a manner similar to that of ZSNES's configure script.

Change History (4)

comment:1 Changed 4 years ago by takkaria

  • Milestone changed from Triage to 3.5.0

Assigning open bugs to 3.5 for fixing.

comment:2 Changed 23 months ago by vext01

For what it's worth this allows GCU to be detected:
https://github.com/jasperla/openbsd-wip/blob/master/games/angband/patches/patch-configure_ac

$OpenBSD$

Pick up ncursesw on OpenBSD. We do not deal with ncursesw via pkg-config
(as it is in openbsd base), which is what the build system appears to
expect.

--- configure.ac.orig	Sat Jan  3 23:45:00 2015
+++ configure.ac	Mon Apr  6 14:12:11 2015
@@ -224,17 +224,19 @@ AC_ARG_ENABLE(sdl_mixer,
 
 MAINFILES="\$(BASEMAINFILES)"
 
-dnl curses checking
-if test "$enable_curses" = "yes"; then
-	AM_PATH_NCURSESW(with_curses=yes, with_curses=no)
-	if test "$with_curses" = "yes"; then
-		AC_DEFINE(USE_NCURSES, 1, [Define to 1 if NCurses is found.])
-		AC_DEFINE(USE_GCU, 1, [Define to 1 if using the Curses frontend.])
-		CFLAGS="${CFLAGS} ${NCURSES_CFLAGS}"
-		LIBS="${LIBS} ${NCURSES_LIBS}"
-		MAINFILES="${MAINFILES} \$(GCUMAINFILES)"
-	fi 
-fi
+dnl curses checking - build system hosed for OpenBSD
+dnl yes, we have this stuff
+
+dnl if test "$enable_curses" = "yes"; then
+dnl 	AM_PATH_NCURSESW(with_curses=yes, with_curses=no)
+dnl 	if test "$with_curses" = "yes"; then
+ 		AC_DEFINE(USE_NCURSES, 1, [Define to 1 if NCurses is found.])
+ 		AC_DEFINE(USE_GCU, 1, [Define to 1 if using the Curses frontend.])
+dnl 		CFLAGS="${CFLAGS} ${NCURSES_CFLAGS}"
+ 		LIBS="${LIBS} -lncursesw"
+ 		MAINFILES="${MAINFILES} \$(GCUMAINFILES)"
+dnl 	fi 
+dnl fi
 
 AC_CHECK_FUNCS([mvwaddnwstr use_default_colors can_change_color])
 

Of course, a real fix is probably needed.

comment:3 Changed 16 months ago by myshkin

Another data point, from Mr_Bones_ on IRC: autoconf is broken on gentoo as well because the installed package there is ncurses6. See the gentoo ticket.

comment:4 Changed 8 months ago by vext01

FWIW, on OpenBSD the issue is not autoconf, there is a custom macro which uses ncursesw5-config to get ncurses flags. OpenBSD does not use this program as ncursesw is in base.

related:
http://trac.rephial.org/ticket/1976

Note: See TracTickets for help on using tickets.