From owner-svn-doc-head@FreeBSD.ORG Fri Mar 7 17:52:45 2014 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37AAC2B3; Fri, 7 Mar 2014 17:52:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 239D6B96; Fri, 7 Mar 2014 17:52:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s27HqjUt068728; Fri, 7 Mar 2014 17:52:45 GMT (envelope-from mat@svn.freebsd.org) Received: (from mat@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s27Hqio3068727; Fri, 7 Mar 2014 17:52:44 GMT (envelope-from mat@svn.freebsd.org) Message-Id: <201403071752.s27Hqio3068727@svn.freebsd.org> From: Mathieu Arnold Date: Fri, 7 Mar 2014 17:52:44 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r44180 - head/en_US.ISO8859-1/books/porters-handbook/special X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2014 17:52:45 -0000 Author: mat (ports committer) Date: Fri Mar 7 17:52:44 2014 New Revision: 44180 URL: http://svnweb.freebsd.org/changeset/doc/44180 Log: Update the special considerations chapter part one. Sponsored by: Absolight Modified: head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml Modified: head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml Fri Mar 7 17:10:44 2014 (r44179) +++ head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml Fri Mar 7 17:52:44 2014 (r44180) @@ -33,12 +33,22 @@ (see ). When a port still requires system-wide privileges in order - to run the package target, this - line must be added to the + to run the stage and + package targets, this line must be + added to the Makefile: NEED_ROOT= yes + + The vast majority of ports do not really + need to be root. You can mostly avoid it by + using USES=uidfix, + and from time to time by slightly patching the port's + Makefiles. + + Meta ports, or ports that do not install files themselves but only depend on other ports, should avoid needlessly extracting the &man.mtree.8; to the stage directory. This is @@ -125,9 +135,10 @@ When installing 32-bit libraries on 64-bit system, use USE_LDCONFIG32 instead. - Try to keep shared library version numbers in the - libfoo.so.0 format. Our runtime linker - only cares for the major (first) number. + If the software you are porting uses autotools, and specifically + libtool, you should add USES=libtool. When the major library version number increments in the update to the new port version, all other ports that link to @@ -815,16 +826,21 @@ CMAKE_SOURCE_PATH= ${WRKSRC}/subp If your port requires gettext, set USES= gettext, and your port will inherit - a dependency on + a dependency on libintl.so from devel/gettext. Other values for gettext usage are listed in - . + USES=gettext. A rather common case is a port using gettext and configure. Generally, GNU configure should be able - to locate gettext automatically. If it - ever fails to, hints at the location of + to locate gettext automatically. + + USES= gettext +GNU_CONFIGURE= yes + + If it ever fails to, hints at the location of gettext can be passed in CPPFLAGS and LDFLAGS as follows: @@ -834,12 +850,6 @@ CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib GNU_CONFIGURE= yes - - Of course, the code can be more compact if there are no - more flags to pass to configure: - - USES= gettext -GNU_CONFIGURE= yes @@ -855,6 +865,20 @@ GNU_CONFIGURE= yes GNU_CONFIGURE= yes +OPTIONS_DEFINE= NLS +OPTIONS_SUB= yes + +NLS_USES= gettext +NKS_CONFIGURE_ENABLE= nls + +.include <bsd.port.mk> + + Or using the older way of using options: + + GNU_CONFIGURE= yes + +OPTIONS_DEFINE= NLS + .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MNLS}