pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/net/gnunet



Module Name:    pkgsrc
Committed By:   nikita
Date:           Wed Feb  1 19:03:03 UTC 2023

Modified Files:
        pkgsrc/net/gnunet: Makefile options.mk
Added Files:
        pkgsrc/net/gnunet/patches: patch-configure.ac
            patch-src_include_gnunet_mysql_compat.h

Log Message:
gnunet: fix failure to build with mysql with upstream patches


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/net/gnunet/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/net/gnunet/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/net/gnunet/patches/patch-configure.ac \
    pkgsrc/net/gnunet/patches/patch-src_include_gnunet_mysql_compat.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/gnunet/Makefile
diff -u pkgsrc/net/gnunet/Makefile:1.2 pkgsrc/net/gnunet/Makefile:1.3
--- pkgsrc/net/gnunet/Makefile:1.2      Tue Jan 31 19:53:36 2023
+++ pkgsrc/net/gnunet/Makefile  Wed Feb  1 19:03:03 2023
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.2 2023/01/31 19:53:36 nikita Exp $
+# $NetBSD: Makefile,v 1.3 2023/02/01 19:03:03 nikita Exp $
 
 DISTNAME=              gnunet-0.19.2
+PKGREVISION=           1
 CATEGORIES=            net
 MASTER_SITES=          ${MASTER_SITE_GNU:=gnunet/}
 
@@ -9,7 +10,7 @@ HOMEPAGE=              https://gnunet.org/
 COMMENT=               Framework for secure P2P networking
 LICENSE=               gnu-agpl-v3
 
-USE_TOOLS+=            msgfmt pkg-config gmake
+USE_TOOLS+=            msgfmt pkg-config gmake automake autoconf autoreconf
 USE_LANGUAGES=         c
 GNU_CONFIGURE=         yes
 USE_LIBTOOL=           yes
@@ -73,6 +74,9 @@ post-extract:
        ${CP} ${FILESDIR}/gnunet_user.conf ${WRKSRC}/gnunet_user.conf
        ${CP} ${FILESDIR}/README.pkgsrc.txt ${WRKSRC}/README.pkgsrc.txt
 
+pre-configure:
+       (cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} autoreconf -vif)
+
 SUBST_CLASSES+=                        sysconfdir
 SUBST_STAGE.sysconfdir=                pre-configure
 SUBST_MESSAGE.sysconfdir=      Fixing paths in gnunet.conf

Index: pkgsrc/net/gnunet/options.mk
diff -u pkgsrc/net/gnunet/options.mk:1.1 pkgsrc/net/gnunet/options.mk:1.2
--- pkgsrc/net/gnunet/options.mk:1.1    Tue Jan 31 18:53:46 2023
+++ pkgsrc/net/gnunet/options.mk        Wed Feb  1 19:03:03 2023
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1 2023/01/31 18:53:46 nikita Exp $
+# $NetBSD: options.mk,v 1.2 2023/02/01 19:03:03 nikita Exp $
 
 PKG_OPTIONS_VAR=               PKG_OPTIONS.gnunet
 
@@ -74,7 +74,6 @@ PLIST_SRC+=           PLIST.sqlite3
 CONFIGURE_ARGS+=       --without-sqlite3
 .endif
 
-# \todo: does not build at the moment
 .if ${PKG_OPTIONS:Mmysql}
 .include "../../databases/mysql80-client/buildlink3.mk"
 CONFIGURE_ARGS+=       --with-mysql=${BUILDLINK_PREFIX.mysql-client}

Added files:

Index: pkgsrc/net/gnunet/patches/patch-configure.ac
diff -u /dev/null pkgsrc/net/gnunet/patches/patch-configure.ac:1.1
--- /dev/null   Wed Feb  1 19:03:03 2023
+++ pkgsrc/net/gnunet/patches/patch-configure.ac        Wed Feb  1 19:03:03 2023
@@ -0,0 +1,29 @@
+$NetBSD: patch-configure.ac,v 1.1 2023/02/01 19:03:03 nikita Exp $
+
+upstream commit ac40efdae723f850bfff62c0cddad130a37f425e
+MYSQL: Use autoconf-based my_bool detection
+
+NEWS: We now detect MySQL's strange, version-dependent my_bool type on configure.
+
+--- configure.ac.orig
++++ configure.ac
+@@ -935,6 +935,19 @@ AC_ARG_WITH([mysql],
+ AC_SUBST(MYSQL_LDFLAGS)
+ AC_SUBST(MYSQL_CPPFLAGS)
+ 
++# check for my_bool
++AS_IF([test "x$mysql" = "xtrue"],
++  [AC_MSG_CHECKING([for my_bool])
++   AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
++     [[#include <mysql/mysql.h>]],
++     [[#ifndef my_bool
++#no my_bool found
++#endif]])],
++      [AC_MSG_RESULT([yes])
++       AC_DEFINE_UNQUOTED([MYSQL_BOOL], [my_bool], [Bool variable for some mysql versions])],
++      [AC_MSG_RESULT([no])
++       AC_DEFINE_UNQUOTED([MYSQL_BOOL], [bool], [Normal boolean value])])])
++
+ # additional version checks for mysql
+ AS_IF([test "x$mysql" = "xtrue"],
+   [AC_MSG_CHECKING([for mysql version])
Index: pkgsrc/net/gnunet/patches/patch-src_include_gnunet_mysql_compat.h
diff -u /dev/null pkgsrc/net/gnunet/patches/patch-src_include_gnunet_mysql_compat.h:1.1
--- /dev/null   Wed Feb  1 19:03:03 2023
+++ pkgsrc/net/gnunet/patches/patch-src_include_gnunet_mysql_compat.h   Wed Feb  1 19:03:03 2023
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_include_gnunet_mysql_compat.h,v 1.1 2023/02/01 19:03:03 nikita Exp $
+
+upstream commit ac40efdae723f850bfff62c0cddad130a37f425e
+MYSQL: Use autoconf-based my_bool detection
+
+NEWS: We now detect MySQL's strange, version-dependent my_bool type on configure.
+
+--- src/include/gnunet_mysql_compat.h.orig     2023-02-01 19:25:58.608530686 +0100
++++ src/include/gnunet_mysql_compat.h  2023-02-01 19:27:33.129458021 +0100
+@@ -41,16 +41,6 @@
+ #endif
+ #endif
+ 
+-#ifndef LIBMARIADB
+-#if MYSQL_VERSION_ID < 80000
+-#define MYSQL_BOOL bool;
+-#else
+-#define MYSQL_BOOL my_bool; //MySQL < 8 wants this
+-#endif
+-#else
+-#define MYSQL_BOOL my_bool //MariaDB still uses my_bool
+-#endif
+-
+ #if 0                           /* keep Emacsens' auto-indent happy */
+ {
+ #endif



Home | Main Index | Thread Index | Old Index