Thu Aug 17 08:20:28 2023 UTC ()
mariadb*-client: Force HAVE_CURSES_H when using ncurses.

For some reason mariadb removed any cmake detection for HAVE_CURSES_H so it is
never defined, but the source is still littered with it, causing compilation
problems because curses.h never gets included.

The whole thing is incredibly messy, and this is the least likely to
accidentally break some alternate configuration, but implementations that use
curses.h which isn't ncurses are likely to still be broken.


(jperkin)
diff -r1.3 -r1.4 pkgsrc/databases/mariadb1011-client/Makefile.common
diff -r1.17 -r1.18 pkgsrc/databases/mariadb104-client/Makefile.common
diff -r1.23 -r1.24 pkgsrc/databases/mariadb105-client/Makefile.common
diff -r1.19 -r1.20 pkgsrc/databases/mariadb106-client/Makefile.common

cvs diff -r1.3 -r1.4 pkgsrc/databases/mariadb1011-client/Makefile.common (expand / switch to unified diff)

--- pkgsrc/databases/mariadb1011-client/Makefile.common 2023/07/23 09:29:51 1.3
+++ pkgsrc/databases/mariadb1011-client/Makefile.common 2023/08/17 08:20:27 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.common,v 1.3 2023/07/23 09:29:51 nia Exp $ 1# $NetBSD: Makefile.common,v 1.4 2023/08/17 08:20:27 jperkin Exp $
2# 2#
3# used by databases/mariadb1011-client/Makefile 3# used by databases/mariadb1011-client/Makefile
4# used by databases/mariadb1011-server/Makefile 4# used by databases/mariadb1011-server/Makefile
5 5
6DISTNAME= mariadb-10.11.4 6DISTNAME= mariadb-10.11.4
7CATEGORIES= databases 7CATEGORIES= databases
8MASTER_SITES= https://archive.mariadb.org/${DISTNAME}/source/ 8MASTER_SITES= https://archive.mariadb.org/${DISTNAME}/source/
9 9
10MAINTAINER?= pkgsrc-users@NetBSD.org 10MAINTAINER?= pkgsrc-users@NetBSD.org
11HOMEPAGE= https://mariadb.org/ 11HOMEPAGE= https://mariadb.org/
12LICENSE= gnu-gpl-v2 12LICENSE= gnu-gpl-v2
13 13
14DISTINFO_FILE?= ${.CURDIR}/../../databases/mariadb1011-client/distinfo 14DISTINFO_FILE?= ${.CURDIR}/../../databases/mariadb1011-client/distinfo
@@ -80,26 +80,27 @@ CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKA @@ -80,26 +80,27 @@ CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKA
80CMAKE_ARGS+= -DWITHOUT_MROONGA_STORAGE_ENGINE=ON 80CMAKE_ARGS+= -DWITHOUT_MROONGA_STORAGE_ENGINE=ON
81 81
82CMAKE_ARGS+= -DENABLE_DTRACE=OFF 82CMAKE_ARGS+= -DENABLE_DTRACE=OFF
83 83
84# Ensure the correct DTrace ABI is used. 84# Ensure the correct DTrace ABI is used.
85.if !empty(ABI) 85.if !empty(ABI)
86CMAKE_ARGS+= -DDTRACE_FLAGS="-${ABI}" 86CMAKE_ARGS+= -DDTRACE_FLAGS="-${ABI}"
87.endif 87.endif
88 88
89.include "../../mk/curses.buildlink3.mk" 89.include "../../mk/curses.buildlink3.mk"
90 90
91.if !empty(CURSES_TYPE:M*ncurses*) 91.if !empty(CURSES_TYPE:M*ncurses*)
92CMAKE_ARGS+= -DCURSES_NEED_NCURSES=ON 92CMAKE_ARGS+= -DCURSES_NEED_NCURSES=ON
 93CPPFLAGS+= -DHAVE_CURSES_H
93.endif 94.endif
94 95
95.if !empty(CURSES_TYPE:M*ncursesw*) 96.if !empty(CURSES_TYPE:M*ncursesw*)
96CMAKE_ARGS+= -DCURSES_NEED_WIDE=ON 97CMAKE_ARGS+= -DCURSES_NEED_WIDE=ON
97.endif 98.endif
98 99
99# We don't clone MariaDB from git, so avoid peeking into 100# We don't clone MariaDB from git, so avoid peeking into
100# the parent repository. 101# the parent repository.
101CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON 102CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
102 103
103# https://github.com/MariaDB/server/pull/2326 104# https://github.com/MariaDB/server/pull/2326
104# https://github.com/MariaDB/server/pull/2321 105# https://github.com/MariaDB/server/pull/2321
105CFLAGS.SunOS+= -fPIC -DHAVE_ALLOCA_H=1 106CFLAGS.SunOS+= -fPIC -DHAVE_ALLOCA_H=1

cvs diff -r1.17 -r1.18 pkgsrc/databases/mariadb104-client/Makefile.common (expand / switch to unified diff)

--- pkgsrc/databases/mariadb104-client/Makefile.common 2023/07/23 09:29:51 1.17
+++ pkgsrc/databases/mariadb104-client/Makefile.common 2023/08/17 08:20:27 1.18
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.common,v 1.17 2023/07/23 09:29:51 nia Exp $ 1# $NetBSD: Makefile.common,v 1.18 2023/08/17 08:20:27 jperkin Exp $
2# 2#
3# used by databases/mariadb104-client/Makefile 3# used by databases/mariadb104-client/Makefile
4# used by databases/mariadb104-server/Makefile 4# used by databases/mariadb104-server/Makefile
5 5
6DISTNAME= mariadb-10.4.20 6DISTNAME= mariadb-10.4.20
7CATEGORIES= databases 7CATEGORIES= databases
8MASTER_SITES= https://archive.mariadb.org/${DISTNAME}/source/ 8MASTER_SITES= https://archive.mariadb.org/${DISTNAME}/source/
9 9
10MAINTAINER?= pkgsrc-users@NetBSD.org 10MAINTAINER?= pkgsrc-users@NetBSD.org
11HOMEPAGE= https://mariadb.org/ 11HOMEPAGE= https://mariadb.org/
12LICENSE= gnu-gpl-v2 12LICENSE= gnu-gpl-v2
13 13
14DISTINFO_FILE?= ${.CURDIR}/../../databases/mariadb104-client/distinfo 14DISTINFO_FILE?= ${.CURDIR}/../../databases/mariadb104-client/distinfo
@@ -81,26 +81,27 @@ CMAKE_ARGS+= -DWITHOUT_MROONGA_STORAGE_ @@ -81,26 +81,27 @@ CMAKE_ARGS+= -DWITHOUT_MROONGA_STORAGE_
81CMAKE_ARGS+= -DENABLE_DTRACE=OFF 81CMAKE_ARGS+= -DENABLE_DTRACE=OFF
82 82
83CMAKE_ARGS+= -DTOKUDB_OK=OFF 83CMAKE_ARGS+= -DTOKUDB_OK=OFF
84 84
85# Ensure the correct DTrace ABI is used. 85# Ensure the correct DTrace ABI is used.
86.if !empty(ABI) 86.if !empty(ABI)
87CMAKE_ARGS+= -DDTRACE_FLAGS="-${ABI}" 87CMAKE_ARGS+= -DDTRACE_FLAGS="-${ABI}"
88.endif 88.endif
89 89
90.include "../../mk/curses.buildlink3.mk" 90.include "../../mk/curses.buildlink3.mk"
91 91
92.if !empty(CURSES_TYPE:M*ncurses*) 92.if !empty(CURSES_TYPE:M*ncurses*)
93CMAKE_ARGS+= -DCURSES_NEED_NCURSES=ON 93CMAKE_ARGS+= -DCURSES_NEED_NCURSES=ON
 94CPPFLAGS+= -DHAVE_CURSES_H
94.endif 95.endif
95 96
96.if !empty(CURSES_TYPE:M*ncursesw*) 97.if !empty(CURSES_TYPE:M*ncursesw*)
97CMAKE_ARGS+= -DCURSES_NEED_WIDE=ON 98CMAKE_ARGS+= -DCURSES_NEED_WIDE=ON
98.endif 99.endif
99 100
100CFLAGS.SunOS+= -fPIC 101CFLAGS.SunOS+= -fPIC
101 102
102REPLACE_PERL+= scripts/mytop.sh 103REPLACE_PERL+= scripts/mytop.sh
103REPLACE_PERL+= sql-bench/*.sh 104REPLACE_PERL+= sql-bench/*.sh
104 105
105SUBST_CLASSES+= perl 106SUBST_CLASSES+= perl
106SUBST_STAGE.perl= pre-configure 107SUBST_STAGE.perl= pre-configure

cvs diff -r1.23 -r1.24 pkgsrc/databases/mariadb105-client/Makefile.common (expand / switch to unified diff)

--- pkgsrc/databases/mariadb105-client/Makefile.common 2023/07/23 09:29:51 1.23
+++ pkgsrc/databases/mariadb105-client/Makefile.common 2023/08/17 08:20:27 1.24
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.common,v 1.23 2023/07/23 09:29:51 nia Exp $ 1# $NetBSD: Makefile.common,v 1.24 2023/08/17 08:20:27 jperkin Exp $
2# 2#
3# used by databases/mariadb105-client/Makefile 3# used by databases/mariadb105-client/Makefile
4# used by databases/mariadb105-server/Makefile 4# used by databases/mariadb105-server/Makefile
5 5
6DISTNAME= mariadb-10.5.21 6DISTNAME= mariadb-10.5.21
7CATEGORIES= databases 7CATEGORIES= databases
8MASTER_SITES= https://archive.mariadb.org/${DISTNAME}/source/ 8MASTER_SITES= https://archive.mariadb.org/${DISTNAME}/source/
9 9
10MAINTAINER?= pkgsrc-users@NetBSD.org 10MAINTAINER?= pkgsrc-users@NetBSD.org
11HOMEPAGE= https://mariadb.org/ 11HOMEPAGE= https://mariadb.org/
12LICENSE= gnu-gpl-v2 12LICENSE= gnu-gpl-v2
13 13
14DISTINFO_FILE?= ${.CURDIR}/../../databases/mariadb105-client/distinfo 14DISTINFO_FILE?= ${.CURDIR}/../../databases/mariadb105-client/distinfo
@@ -80,26 +80,27 @@ CMAKE_ARGS+= -DWITHOUT_MROONGA_STORAGE_ @@ -80,26 +80,27 @@ CMAKE_ARGS+= -DWITHOUT_MROONGA_STORAGE_
80CMAKE_ARGS+= -DENABLE_DTRACE=OFF 80CMAKE_ARGS+= -DENABLE_DTRACE=OFF
81 81
82CMAKE_ARGS+= -DTOKUDB_OK=OFF 82CMAKE_ARGS+= -DTOKUDB_OK=OFF
83 83
84# Ensure the correct DTrace ABI is used. 84# Ensure the correct DTrace ABI is used.
85.if !empty(ABI) 85.if !empty(ABI)
86CMAKE_ARGS+= -DDTRACE_FLAGS="-${ABI}" 86CMAKE_ARGS+= -DDTRACE_FLAGS="-${ABI}"
87.endif 87.endif
88 88
89.include "../../mk/curses.buildlink3.mk" 89.include "../../mk/curses.buildlink3.mk"
90 90
91.if !empty(CURSES_TYPE:M*ncurses*) 91.if !empty(CURSES_TYPE:M*ncurses*)
92CMAKE_ARGS+= -DCURSES_NEED_NCURSES=ON 92CMAKE_ARGS+= -DCURSES_NEED_NCURSES=ON
 93CPPFLAGS+= -DHAVE_CURSES_H
93.endif 94.endif
94 95
95.if !empty(CURSES_TYPE:M*ncursesw*) 96.if !empty(CURSES_TYPE:M*ncursesw*)
96CMAKE_ARGS+= -DCURSES_NEED_WIDE=ON 97CMAKE_ARGS+= -DCURSES_NEED_WIDE=ON
97.endif 98.endif
98 99
99CFLAGS.SunOS+= -fPIC 100CFLAGS.SunOS+= -fPIC
100CFLAGS.NetBSD+= -DIOAPI_NO_64 101CFLAGS.NetBSD+= -DIOAPI_NO_64
101 102
102REPLACE_PERL+= scripts/mytop.sh 103REPLACE_PERL+= scripts/mytop.sh
103REPLACE_PERL+= sql-bench/*.sh 104REPLACE_PERL+= sql-bench/*.sh
104 105
105SUBST_CLASSES+= perl 106SUBST_CLASSES+= perl

cvs diff -r1.19 -r1.20 pkgsrc/databases/mariadb106-client/Makefile.common (expand / switch to unified diff)

--- pkgsrc/databases/mariadb106-client/Makefile.common 2023/07/23 09:29:52 1.19
+++ pkgsrc/databases/mariadb106-client/Makefile.common 2023/08/17 08:20:28 1.20
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.common,v 1.19 2023/07/23 09:29:52 nia Exp $ 1# $NetBSD: Makefile.common,v 1.20 2023/08/17 08:20:28 jperkin Exp $
2# 2#
3# used by databases/mariadb106-client/Makefile 3# used by databases/mariadb106-client/Makefile
4# used by databases/mariadb106-server/Makefile 4# used by databases/mariadb106-server/Makefile
5 5
6DISTNAME= mariadb-10.6.14 6DISTNAME= mariadb-10.6.14
7CATEGORIES= databases 7CATEGORIES= databases
8MASTER_SITES= https://archive.mariadb.org/${DISTNAME}/source/ 8MASTER_SITES= https://archive.mariadb.org/${DISTNAME}/source/
9 9
10MAINTAINER?= pkgsrc-users@NetBSD.org 10MAINTAINER?= pkgsrc-users@NetBSD.org
11HOMEPAGE= https://mariadb.org/ 11HOMEPAGE= https://mariadb.org/
12LICENSE= gnu-gpl-v2 12LICENSE= gnu-gpl-v2
13 13
14DISTINFO_FILE?= ${.CURDIR}/../../databases/mariadb106-client/distinfo 14DISTINFO_FILE?= ${.CURDIR}/../../databases/mariadb106-client/distinfo
@@ -78,26 +78,27 @@ CMAKE_ARGS+= -DWITH_PERFSCHEMA_STORAGE_ @@ -78,26 +78,27 @@ CMAKE_ARGS+= -DWITH_PERFSCHEMA_STORAGE_
78CMAKE_ARGS+= -DWITHOUT_MROONGA_STORAGE_ENGINE=ON 78CMAKE_ARGS+= -DWITHOUT_MROONGA_STORAGE_ENGINE=ON
79 79
80CMAKE_ARGS+= -DENABLE_DTRACE=OFF 80CMAKE_ARGS+= -DENABLE_DTRACE=OFF
81 81
82# Ensure the correct DTrace ABI is used. 82# Ensure the correct DTrace ABI is used.
83.if !empty(ABI) 83.if !empty(ABI)
84CMAKE_ARGS+= -DDTRACE_FLAGS="-${ABI}" 84CMAKE_ARGS+= -DDTRACE_FLAGS="-${ABI}"
85.endif 85.endif
86 86
87.include "../../mk/curses.buildlink3.mk" 87.include "../../mk/curses.buildlink3.mk"
88 88
89.if !empty(CURSES_TYPE:M*ncurses*) 89.if !empty(CURSES_TYPE:M*ncurses*)
90CMAKE_ARGS+= -DCURSES_NEED_NCURSES=ON 90CMAKE_ARGS+= -DCURSES_NEED_NCURSES=ON
 91CPPFLAGS+= -DHAVE_CURSES_H
91.endif 92.endif
92 93
93.if !empty(CURSES_TYPE:M*ncursesw*) 94.if !empty(CURSES_TYPE:M*ncursesw*)
94CMAKE_ARGS+= -DCURSES_NEED_WIDE=ON 95CMAKE_ARGS+= -DCURSES_NEED_WIDE=ON
95.endif 96.endif
96 97
97# https://github.com/MariaDB/server/pull/2326 98# https://github.com/MariaDB/server/pull/2326
98# https://github.com/MariaDB/server/pull/2321 99# https://github.com/MariaDB/server/pull/2321
99CFLAGS.SunOS+= -fPIC -DHAVE_ALLOCA_H=1 100CFLAGS.SunOS+= -fPIC -DHAVE_ALLOCA_H=1
100CFLAGS.NetBSD+= -DIOAPI_NO_64 101CFLAGS.NetBSD+= -DIOAPI_NO_64
101 102
102REPLACE_PERL+= scripts/mytop.sh 103REPLACE_PERL+= scripts/mytop.sh
103REPLACE_PERL+= sql-bench/*.sh 104REPLACE_PERL+= sql-bench/*.sh