From owner-svn-doc-all@FreeBSD.ORG Sun Mar 24 18:16:17 2013 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9938D4E9; Sun, 24 Mar 2013 18:16:17 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8B5AFC24; Sun, 24 Mar 2013 18:16:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2OIGHqt072560; Sun, 24 Mar 2013 18:16:17 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2OIGHtX072558; Sun, 24 Mar 2013 18:16:17 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201303241816.r2OIGHtX072558@svn.freebsd.org> From: Warren Block Date: Sun, 24 Mar 2013 18:16:17 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r41304 - head/en_US.ISO8859-1/books/porters-handbook X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2013 18:16:17 -0000 Author: wblock Date: Sun Mar 24 18:16:16 2013 New Revision: 41304 URL: http://svnweb.freebsd.org/changeset/doc/41304 Log: Document CMake usage. Slightly modified version of patch submitted with PR. PR: docs/177141 Submitted by: Max Brazhnikov Modified: head/en_US.ISO8859-1/books/porters-handbook/book.xml head/en_US.ISO8859-1/books/porters-handbook/uses.xml Modified: head/en_US.ISO8859-1/books/porters-handbook/book.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/book.xml Sun Mar 24 13:35:32 2013 (r41303) +++ head/en_US.ISO8859-1/books/porters-handbook/book.xml Sun Mar 24 18:16:16 2013 (r41304) @@ -5422,6 +5422,110 @@ IGNORE= may not be redistributed because + + Using <command>cmake</command> + + For ports that use CMake, + define USES= cmake, or + USES= cmake:outsource to build in a + separate directory (see below). + + + Variables for Ports That Use + <command>cmake</command> + + + + + Variable + Means + + + + + + CMAKE_ARGS + Port specific CMake + flags to be passed to the cmake + binary. + + + + CMAKE_BUILD_TYPE + Type of build (CMake + predefined build profiles). Default is + Release, or + Debugif + WITH_DEBUG is set. + + + + CMAKE_ENV + Environment variables to be set for + cmake binary. Default is + ${CONFIGURE_ENV}. + + + + CMAKE_SOURCE_PATH + Path to the source directory. Default is + ${WRKSRC}. + + + +
+ + CMake supports the following + build profiles: Debug, + Release, + RelWithDebInfo and + MinSizeRel. Debug and + Release profiles respect system + *FLAGS, RelWithDebInfo + and MinSizeRel will set + CFLAGS to -O2 -g and + -Os -DNDEBUG correspondingly. The + lower-cased value of CMAKE_BUILD_TYPE is + exported to the PLIST_SUB and should be + used if port installs *.cmake files + depending on the build type (see deskutils/strigi for an + example). Please note that some projects may define their + own build profiles and/or force particular build type by + setting CMAKE_BUILD_TYPE in + CMakeLists.txt files. In order to + make a port for such a project respect + CFLAGS and WITH_DEBUG, + the CMAKE_BUILD_TYPE definitions must be + removed from those files. + + Most CMake-based projects + support an out-of-source method of building. The + out-of-source build for a port can be requested by using + :outsource suffix. When enabled, + CONFIGURE_WRKSRC, + BUILD_WRKSRC and + INSTALL_WRKSRC will be set to + ${WRKDIR}/.build and this + directory will be used to keep all files generated during + configuration and build stages, leaving the source directory + intact. + + + <literal>USES= cmake</literal> Example + + The following snippet demonstrates the use of + CMake for a port. + CMAKE_SOURCE_PATH is not usually + required, but can be set when the sources are not located + in the top directory, or if only a subset of the project + is intended to be built by the port. + + USES= cmake:outsource +CMAKE_SOURCE_PATH= ${WRKSRC}/subproject + +
+ Using <command>scons</command> @@ -6902,9 +7006,10 @@ do-configure: <makevar>USE_KDE4</makevar> Example This is a simple example for a KDE 4 port. - USE_CMAKE instructs the port to utilize - CMake — configuration - tool widely spread among KDE 4 projects. + USES= cmake:outsource instructs the + port to utilize CMake, a + configuration tool widely used by KDE 4 projects (see + for detailed usage). USE_KDE4 brings dependency on KDE libraries and makes port using automoc4 at build stage. @@ -6915,7 +7020,7 @@ do-configure: Qt 4 components, they should be specified in USE_QT4. - USE_CMAKE= yes + USES= cmake:outsource USE_KDE4= kdelibs kdeprefix automoc4 USE_QT4= moc_build qmake_build rcc_build uic_build Modified: head/en_US.ISO8859-1/books/porters-handbook/uses.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/uses.xml Sun Mar 24 13:35:32 2013 (r41303) +++ head/en_US.ISO8859-1/books/porters-handbook/uses.xml Sun Mar 24 18:16:16 2013 (r41304) @@ -30,10 +30,19 @@ + cmake + none, outsource + The port will use CMake for configuring + and building. With the outsource argument, an + out-of-source build will be performed. For more information see + . + + + + fuse none - Implies the port will depend on the FUSE library and handle the - the dependency on the kernel module depending on the version of + Implies the port will depend on the FUSE library and handle the the dependency on the kernel module depending on the version of &os;.