From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 0972D198005 for ; Sat, 23 Feb 2013 23:20:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8AE8EE060F; Sat, 23 Feb 2013 23:20:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2C95BE060F for ; Sat, 23 Feb 2013 23:20:09 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 63A3233D3DA for ; Sat, 23 Feb 2013 23:20:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id D2BBDE4075 for ; Sat, 23 Feb 2013 23:20:05 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1361661035.549cbadd2ccc3d0f11b5b1802175ca7afcdcb6a4.WilliamH@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: mk/ X-VCS-Repository: proj/openrc X-VCS-Files: mk/termcap.mk X-VCS-Directories: mk/ X-VCS-Committer: WilliamH X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 549cbadd2ccc3d0f11b5b1802175ca7afcdcb6a4 X-VCS-Branch: master Date: Sat, 23 Feb 2013 23:20:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: acd31d3f-fa7f-409b-b20e-f56a53e97aca X-Archives-Hash: c1df8a7733f933c42cd52ea47bf3c084 commit: 549cbadd2ccc3d0f11b5b1802175ca7afcdcb6a4 Author: William Hubbs gmail com> AuthorDate: Sat Feb 23 20:04:09 2013 +0000 Commit: William Hubbs gentoo org> CommitDate: Sat Feb 23 23:10:35 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=549cbadd build: use pkg-config to find ncurses libraries if it is available If ncurses was built with the --with-termlib switch enabled, tgoto, tgetent and tgetstr move to libtinfo. Fortunately, ncurses provides a pkg-config file which we can use if pkg-config is installed. If it is not, we still link to -lncurses for now, so pkg-config is not a hard requirement. Reported-by: jan.paesmans gmail.com X-Gentoo-Bug: 455912 X-Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=455912 --- mk/termcap.mk | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/mk/termcap.mk b/mk/termcap.mk index b716276..6f590da 100644 --- a/mk/termcap.mk +++ b/mk/termcap.mk @@ -1,5 +1,10 @@ ifeq (${MKTERMCAP},ncurses) + LTERMCAP:= $(shell pkg-config ncurses --libs 2> /dev/null) +ifeq ($(LTERMCAP),) LIBTERMCAP?= -lncurses +else +LIBTERMCAP?= $(LTERMCAP) +endif CPPFLAGS+= -DHAVE_TERMCAP LDADD+= ${LIBTERMCAP} else ifeq (${MKTERMCAP},termcap)