Bug 160695 - devel/ncurses libncurses.a doesn't contain libtinfo.a
Summary: devel/ncurses libncurses.a doesn't contain libtinfo.a
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Rong-En Fan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-13 05:50 UTC by kasahara
Modified: 2013-09-20 16:42 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kasahara 2011-09-13 05:50:09 UTC
libncurses.a of the base system contains objects from libtinfo.a
(actually libtinfo.a is a symbolic link to libncurses.a), but 
libncurses.a from devel/ncurses doesn't contain these objects.
So, to link ncurses, I need to explicitly add -ltinfo in addition 
to -lncurses.

For example, editors/emacs-devel won't build when devel/ncurses is
installed because it doesn't check if -ltinfo is needed.
Maybe there are other ports like this.  Such incompatibility between
base vs port ncurses is not convenient.

Fix: 

For compatibility with base ncurses, --with-termlib should be removed
from configure option (I'm not sure about other effects by doing that...).
How-To-Repeat: 
1. Install devel/ncurses
2. Build editor/emacs-devel
Comment 1 Edwin Groothuis freebsd_committer 2011-09-13 05:50:19 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rafan

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 carpeddiem 2013-05-27 14:57:35 UTC
I ran into the same basic issue and submitted ports/179005 - I
suggested installing pkgconf files in the ncurses port.  If that's
done many ports will pick up the -ltinfo dependency for static linking
automatically.
Comment 3 Rong-En Fan freebsd_committer 2013-05-27 17:52:35 UTC
Ed, thanks! Will look into it after reviving my tinderbox.
Comment 4 dfilter service freebsd_committer 2013-06-08 06:58:53 UTC
Author: rafan
Date: Sat Jun  8 05:58:44 2013
New Revision: 320235
URL: http://svnweb.freebsd.org/changeset/ports/320235

Log:
  - Install pkg-config files to support static linking
  - Bump PORTREVISION
  
  PR:		ports/179005, ports/160695

Modified:
  head/devel/ncurses/Makefile
  head/devel/ncurses/pkg-plist

Modified: head/devel/ncurses/Makefile
==============================================================================
--- head/devel/ncurses/Makefile	Sat Jun  8 02:30:13 2013	(r320234)
+++ head/devel/ncurses/Makefile	Sat Jun  8 05:58:44 2013	(r320235)
@@ -3,7 +3,7 @@
 
 PORTNAME=	ncurses
 PORTVERSION=	${RELEASE}
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	devel
 MASTER_SITES=	${MASTER_SITE_GNU}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -21,7 +21,7 @@ CONFIGURE_SCRIPT=../configure
 CONFIGURE_ARGS=	--datadir=${PREFIX}/share/misc --disable-overwrite \
 		--enable-termcap --enable-bsdpad --enable-getcap \
 		--enable-colorfgbg --disable-home-terminfo \
-		--with-pkg-config=no \
+		--with-pkg-config=yes --enable-pc-files \
 		--includedir=${PREFIX}/include/ncurses \
 		--with-shared \
 		--without-curses-h --with-termlib --program-prefix= \
@@ -33,9 +33,11 @@ OPTIONS_DEFINE=	EXTCOLORS TRACE DEBUG
 EXTCOLORS_DESC=	256-color support (only for ncursesw)
 TRACE_DESC=	Add trace() function to all models of ncurses
 
-CONFIGURE_ENV=	gnat_exists="no"
+CONFIGURE_ENV=	PKG_CONFIG_LIBDIR=${LOCALBASE}/libdata/pkgconfig \
+		gnat_exists="no"
 
 USE_LDCONFIG=	yes
+USE_GNOME=	pkgconfig
 
 WIDEC_WRKSRC=	${WRKSRC}/build.widec
 NOWIDEC_WRKSRC=	${WRKSRC}/build.nowidec

Modified: head/devel/ncurses/pkg-plist
==============================================================================
--- head/devel/ncurses/pkg-plist	Sat Jun  8 02:30:13 2013	(r320234)
+++ head/devel/ncurses/pkg-plist	Sat Jun  8 05:58:44 2013	(r320235)
@@ -91,6 +91,28 @@ lib/libtinfo.so.%%REL_VER%%
 %%WIDEC%%lib/libtinfow.so.%%REL_VER_WIDEC%%
 %%WIDEC%%%%DEBUG%%lib/libtinfow_g.a
 %%WIDEC%%%%PROFILE%%lib/libtinfow_p.a
+libdata/pkgconfig/form.pc
+%%DEBUG%%libdata/pkgconfig/form_g.pc
+%%PROFILE%%libdata/pkgconfig/form_p.pc
+%%WIDEC%%libdata/pkgconfig/formw.pc
+libdata/pkgconfig/menu.pc
+%%DEBUG%%libdata/pkgconfig/menu_g.pc
+%%PROFILE%%libdata/pkgconfig/menu_p.pc
+%%WIDEC%%libdata/pkgconfig/menuw.pc
+libdata/pkgconfig/ncurses++.pc
+%%WIDEC%%libdata/pkgconfig/ncurses++w.pc
+libdata/pkgconfig/ncurses.pc
+%%DEBUG%%libdata/pkgconfig/ncurses_g.pc
+%%PROFILE%%libdata/pkgconfig/ncurses_p.pc
+%%WIDEC%%libdata/pkgconfig/ncursesw.pc
+libdata/pkgconfig/panel.pc
+%%DEBUG%%libdata/pkgconfig/panel_g.pc
+%%PROFILE%%libdata/pkgconfig/panel_p.pc
+%%WIDEC%%libdata/pkgconfig/panelw.pc
+libdata/pkgconfig/tinfo.pc
+%%DEBUG%%libdata/pkgconfig/tinfo_g.pc
+%%PROFILE%%libdata/pkgconfig/tinfo_p.pc
+%%WIDEC%%libdata/pkgconfig/tinfow.pc
 %%TERMINFO%%share/misc/tabset/std
 %%TERMINFO%%share/misc/tabset/stdcrt
 %%TERMINFO%%share/misc/tabset/vt100
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Rong-En Fan freebsd_committer 2013-09-20 16:42:36 UTC
State Changed
From-To: open->closed

Fixed.