Skip to content

Commit

Permalink
databases/mdbtools: Workaround breakage from llvm15
Browse files Browse the repository at this point in the history
parser.c:1035:9: error: variable 'yynerrs' set but not used [-Werror,-Wunused-but-set-variable]
    int yynerrs = 0;

The parser code is created at build time. llvm15 complains about the not used variable.
Avoiding llvm15 is just a workaround, until a better solution is around.

Reported by:	pkg-fallout
  • Loading branch information
rhurlin committed Feb 25, 2023
1 parent f616e60 commit 5111b40
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions databases/mdbtools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ RUN_DEPENDS= bash-completion>=0:shells/bash-completion

USES= bison cpe gnome iconv:wchar_t libtool pathfix \
pkgconfig readline
CPE_VENDOR= mdbtools_project
USE_GNOME= glib20
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= ${ICONV_CONFIGURE_ARG} \
--with-unixodbc=${LOCALBASE}

CPE_VENDOR= mdbtools_project

INSTALL_TARGET= install-strip

OPTIONS_DEFINE= DOCS MANPAGES LIBMSWSTR NLS
Expand All @@ -41,8 +40,21 @@ NLS_USES= gettext

DOCS= AUTHORS HACKING.md NEWS README.md

.include <bsd.port.pre.mk>

.if ${LLVM_DEFAULT} >= 15
# With LLVM15: parser.c:1053:9: error:
# variable 'yynerrs' set but not used [-Werror,-Wunused-but-set-variable]
BUILD_DEPENDS+= llvm-config${LLVM_VER}:devel/llvm${LLVM_VER}
LLVM_VER= 14
#CMAKE_ARGS+= -DLLVM_DIR=${LOCALBASE}/llvm${LLVM_VER}/lib/cmake/llvm
CC= clang${LLVM_VER}
CPP= clang-cpp${LLVM_VER}
CXX= clang++${LLVM_VER}
.endif

post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${DOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>
.include <bsd.port.post.mk>

0 comments on commit 5111b40

Please sign in to comment.