From ac53791060c087a09e4b7b52aedfbba585383afc Mon Sep 17 00:00:00 2001 From: Begasus Date: Wed, 17 May 2023 15:08:43 +0200 Subject: Fix version diff --git a/configure.ac b/configure.ac index e7594c5..f3924a9 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ #------------------------------------------------------------------------------- AC_PREREQ(2.59) AC_INIT([calcurse], - m4_esyscmd([build-aux/git-version-gen .version]), + m4_esyscmd_s([cat .version]), [bugs@calcurse.org]) AM_INIT_AUTOMAKE #m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) -- 2.37.3 From f674aa5e919eb3031bc9d4ab8f078efe8fef0b6d Mon Sep 17 00:00:00 2001 From: Begasus Date: Wed, 17 May 2023 15:13:23 +0200 Subject: Revert check for libncurses (no need for autoconf-archive) diff --git a/configure.ac b/configure.ac index f3924a9..4fc1874 100644 --- a/configure.ac +++ b/configure.ac @@ -30,12 +30,27 @@ AC_CHECK_HEADERS([ctype.h getopt.h locale.h math.h signal.h stdio.h stdlib.h \ #------------------------------------------------------------------------------- # Checks for system libs #------------------------------------------------------------------------------- -AX_WITH_CURSES -if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then - AC_MSG_ERROR(Either ncurses or ncursesw library is required to build calcurse!) -fi - -LIBS="$LIBS $CURSES_LIBS" +AC_CHECK_FUNC(initscr,, +[ + available_ncurses="none" + for lib in ncursesw ncurses + do + AC_CHECK_LIB($lib, initscr, + [available_ncurses="$lib"; break]) + done + if test "$available_ncurses" = none; then + AC_MSG_ERROR(Either ncurses or ncursesw library is required to build calcurse!) + elif test "$available_ncurses" = ncursesw; then + AC_CHECK_HEADERS([ncursesw/ncurses.h],, + [AC_CHECK_HEADERS([ncurses.h],, + AC_MSG_ERROR([Missing ncursesw header file]))]) + else + AC_CHECK_HEADERS([ncurses/ncurses.h],, + [AC_CHECK_HEADERS([ncurses.h],, + AC_MSG_ERROR([Missing ncurses header file]))]) + fi + LIBS="$LIBS -l$available_ncurses" +]) AC_CHECK_HEADERS([pthread.h], [ AC_CHECK_LIB(pthread, pthread_create, [ -- 2.37.3 From 552dc8abe1b5175e5df3111f49223b9ea56fb1ff Mon Sep 17 00:00:00 2001 From: Oscar Lesta Date: Thu, 18 May 2023 01:04:02 -0300 Subject: Avoid errors due to ~/config (packagefs) being read-only. Just assume $XDG_DATA_HOME exists, and let the code attempt mkdir() on that instead of trying to mimic "mkdir -p" all the way there. Work-arounds Haikuports's #8661. diff --git a/src/io.c b/src/io.c index e7ad094..147f248 100644 --- a/src/io.c +++ b/src/io.c @@ -1074,6 +1074,7 @@ int io_check_dir(const char *dir) int existed = 1, failed = 0; errno = 0; +#ifndef __HAIKU__ for (index = path + 1; *index; index++) { if (*index == '/') { *index = '\0'; @@ -1088,6 +1089,7 @@ int io_check_dir(const char *dir) *index = '/'; } } +#endif if (!failed && mkdir(path, 0700) != 0) { if (errno != EEXIST) -- 2.37.3