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

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

Revision 1.47, Mon Sep 7 11:11:41 2020 UTC (13 months, 2 weeks ago) by schmonz
Branch: MAIN
CVS Tags: pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3, HEAD
Changes since 1.46: +6 -1 lines

Run the built tic with the built libncurses, not the installed one, as
the build system intends (but fails) to do. This fixes "make package",
for instance, when tic needs to use a newly provided symbol.

This fix applies to fewer dynamic linkers than ${WRKSRC}/misc/shlib --
not the macOS dyld, for instance -- so making the provided script work
as intended will be more widely effective than this patch.

# $NetBSD: Makefile.common,v 1.47 2020/09/07 11:11:41 schmonz Exp $
#
# used by devel/ncurses/Makefile
# used by devel/ncursesw/Makefile

DISTNAME=	ncurses-${NC_VERS}
NC_VERS=	6.2
CATEGORIES=	devel
MASTER_SITES=	${MASTER_SITE_GNU:=ncurses/}
MASTER_SITES+=	ftp://dickey.his.com/ncurses/
MASTER_SITES+=	ftp://dickey.his.com/ncurses/${NC_VERS}/

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://invisible-island.net/ncurses/ncurses.html
LICENSE=	mit

USE_LANGUAGES=		c c++
USE_LIBTOOL=		yes
USE_TOOLS+=		gmake pkg-config tbl
GNU_CONFIGURE=		yes
CONFIGURE_ARGS+=	--with-libtool
CONFIGURE_ARGS+=	--enable-bsdpad
CONFIGURE_ARGS+=	--enable-overwrite
CONFIGURE_ARGS+=	--with-cxx-binding
CONFIGURE_ARGS+=	--enable-pc-files
CONFIGURE_ARGS+=	--with-pkg-config-libdir=${PREFIX}/lib/pkgconfig
CONFIGURE_ARGS+=	--without-ada
CONFIGURE_ARGS+=	--without-gpm
CONFIGURE_ARGS+=	--with-manpage-format=normal
CONFIGURE_ARGS+=	--without-manpage-renames
CONFIGURE_ARGS+=	--with-default-terminfo-dir=${PREFIX}/${TERMINFODIR}
CONFIGURE_ARGS+=	--with-terminfo-dirs=${PREFIX}/${TERMINFODIR}
CONFIGURE_ARGS+=	--includedir=${PREFIX}/include/ncurses

SUBST_CLASSES+=		rpath
SUBST_FILES.rpath+=	misc/ncurses-config
SUBST_STAGE.rpath=	post-configure
SUBST_SED.rpath+=	-e "s|-L\\(.libdir\\)|${COMPILER_RPATH_FLAG}\\1 -L\\1|"
SUBST_MESSAGE.rpath=	Fixing rpath in ncurses-config.

SUBST_CLASSES+=		setenv
SUBST_FILES.setenv=	misc/run_tic.in
SUBST_STAGE.setenv=	pre-configure
SUBST_VARS.setenv=	SETENV

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

CONFIGURE_ARGS.Darwin+=	--disable-mixed-case

.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
TOOL_DEPENDS+=		ncurses-${NC_VERS}:../../devel/ncurses
CONFIGURE_ENV+=		BUILD_CC=${NATIVE_CC:Q}
CONFIGURE_ENV+=		ac_cv_path_TIC_PATH=${LOCALBASE}/bin/tic
.endif

# If there's no native tbl(1) then the tools infrastructure would pull in
# groff, causing various circular dependencies.
.if defined(TOOLS_TBL)
CONFIGURE_ARGS+=	--with-manpage-tbl
.else
USE_TOOLS:=		${USE_TOOLS:Ntbl}
CONFIGURE_ARGS+=	--without-manpage-tbl
.endif

.include "../../mk/compiler.mk"

# Fix build under FreeBSD 10.2
.if !empty(PKGSRC_COMPILER:Mclang)
CONFIGURE_ENV+=		ac_cv_c_compiler_gnu=no
CONFIGURE_ENV+=		ac_cv_cxx_compiler_gnu=no
.endif

.if ${OPSYS} == "SunOS"
CONFIGURE_ARGS+=	--disable-const
TERMINFODIR=		share/lib/terminfo
.else
TERMINFODIR=		share/terminfo
.endif

.if !empty(CC_VERSION:Mgcc-5.*)
# Inhibit generation of line markers in the output from the preprocessor
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60723
CPPFLAGS+=	-P
.endif

# This prevents tic from writing into ~/.terminfo
INSTALLATION_DIRS+=	${TERMINFODIR}

PLIST_SUBST+=	TERMINFODIR=${TERMINFODIR}

CHECK_WRKREF_SKIP+=	man/man?/*