[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / devel / sdcc

File: [cvs.NetBSD.org] / pkgsrc / devel / sdcc / Makefile (download)

Revision 1.58, Wed May 20 06:09:08 2020 UTC (3 years ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2020Q2-base, pkgsrc-2020Q2
Changes since 1.57: +7 -1 lines

mark packages that fail with -Werror=char-subscripts

These packages are susceptible to bugs when confronted with non-ASCII
characters.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94182.

It takes some time to analyze and fix these individually, therefore they
are only marked as "needs work".

# $NetBSD: Makefile,v 1.58 2020/05/20 06:09:08 rillig Exp $

DISTNAME=	sdcc-src-2.8.0
PKGNAME=	${DISTNAME:S/-src//}
PKGREVISION=	11
CATEGORIES=	devel lang
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=sdcc/}
EXTRACT_SUFX=	.tar.bz2

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://sdcc.sourceforge.net/
COMMENT=	Cross compile 8051 code
LICENSE=	gnu-gpl-v2

DEPENDS+=	gputils-[0-9]*:../../devel/gputils

MAKE_JOBS_SAFE=		no

USE_LANGUAGES=	c c++03

# XXX - This HACK circumvent a problem with the use of yacc that breaks the
# XXX - building process of sdcc.  Use of bison fixes this problem for now.
#
USE_TOOLS+=	bison

BUILD_TARGET=	dep all

WRKSRC=			${WRKDIR}/sdcc/
GNU_CONFIGURE=		YES
USE_TOOLS+=		gmake lex:run perl:run

CONFIGURE_ARGS+=	--datadir=${PREFIX}/share/sdcc
CONFIGURE_ARGS+=	--docdir=${PREFIX}/share/doc/sdcc

# needed for some arch's.  -fdollars-in-identifiers is enabled
# by default on some, not on others
CPPFLAGS+=		-fdollars-in-identifiers
CONFIGURE_ENV+=		MACHINE_ARCH=${MACHINE_ARCH:Q}
CONFIGURE_ENV+=		sdcc_cv_CCggdb="no"

# simi.c: In function 'simGetValue':
# simi.c:616:14: error: array subscript has type 'char' [-Werror=char-subscripts]
#              b[i] = strtol(resp,&resp,16);
# Maybe fix this later.
BUILDLINK_TRANSFORM+=	rm:-Werror=char-subscripts

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "NetBSD"
CPPFLAGS+=		-DYY_NEVER_INTERACTIVE

pre-configure: sys-endian-buildlink

sys-endian-buildlink:
	${MKDIR} ${BUILDLINK_DIR}/include
	${LN} -fs /usr/include/sys/endian.h ${BUILDLINK_DIR}/include
.endif

post-install:
	${INSTALL_DATA} ${WRKSRC}/doc/*.lyx ${DESTDIR}${PREFIX}/share/doc/sdcc
	${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${DESTDIR}${PREFIX}/share/doc/sdcc

.include "../../devel/boehm-gc/buildlink3.mk"
.include "../../devel/readline/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"