Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 469012 Details for
Bug 597182
An eclass for dev-util/meson build system
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
meson.eclass
meson.eclass (text/plain), 3.06 KB, created by
William Hubbs
on 2017-04-02 22:36:36 UTC
(
hide
)
Description:
meson.eclass
Filename:
MIME Type:
Creator:
William Hubbs
Created:
2017-04-02 22:36:36 UTC
Size:
3.06 KB
patch
obsolete
># Copyright 2017 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 > ># @ECLASS: meson.eclass ># @MAINTAINER: ># William Hubbs <williamh@gentoo.org> ># @BLURB: common ebuild functions for meson-based packages ># @DESCRIPTION: ># ># @EXAMPLE: ># Typical ebuild using meson.eclass: ># ># @CODE ># EAPI=6 ># ># inherit meson ># ># ... ># ># src_configure() { ># local mymesonargs=( ># $(use_enable debug) ># $(use_with qt4) ># $(use_enable threads multithreading) ># $(use_with tiff) ># ) ># meson_src_configure ># } ># ># src_compile() { ># meson_src_compile ># } ># ># src_install() { ># meson_src_install ># } ># ># @CODE > >case ${EAPI:-0} in > 6) ;; > *) die "EAPI=${EAPI} is not supported" ;; >esac > >EXPORT_FUNCTIONS src_configure src_compile src_install src_test > >if [[ -z ${_MESON} ]]; then > >DEPEND=">=dev-util/meson-0.39.1" > ># @ECLASS-VARIABLE: BUILD_DIR ># @DEFAULT_UNSET ># @DESCRIPTION: ># Build directory, location where all generated files should be placed. ># The default is ${WORKDIR}/${P}_build. > ># @VARIABLE: mymesonargs ># @DEFAULT_UNSET ># @DESCRIPTION: ># Optional meson arguments as Bash array; this should be defined before ># calling meson_src_configure. ># @CODE ># src_configure() { ># local mymesonargs=( ># --disable-readline ># --with-confdir="/etc/nasty foo confdir/" ># $(use_enable debug cnddebug) ># $(use_enable threads multithreading) ># ) ># meson_src_configure ># } ># @CODE > ># Set build directory >_set_build_dir() { > : ${BUILD_DIR:=${WORKDIR}/${P}_build} > echo ">>> Working in BUILD_DIR: \"${BUILD_DIR}\"" >} > ># @FUNCTION: meson_src_configure ># @DESCRIPTION: ># The src_configure function. ># Configuration parameters defined in myconfargs are passed to meson. ># Additionally, the static-libs use flag is known and toggles the ># --default-library setting to static if it is defined. >meson_src_configure() { > debug-print-function ${FUNCNAME} "$@" > > [[ -z ${mymesonargs+1} || $(declare -p mymesonargs) == 'declare -a'* ]] \ > || die 'meson.eclass: mymesonargs must be an array.' > > # Common args > local mesonargs=( > --prefix "${EPREFIX}"/usr > --buildtype plain > ) > > # Handle static-libs found in IUSE, disable them by default > if in_iuse static-libs; then > mesonargs+=( > --default-library $(usex static-libs static shared) > ) > fi > > # for crossdev we need to find a way to generate a crossfile then do > # this: > #mesonargs+=( > # --cross-file /path/to/crossfile > # ) > > # Append user args > mesonargs+=("${mymesonargs[@]}") > > _set_build_dir > CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" \ > meson "${mesonargs[@]}" "${BUILD_DIR}" "$@" >} > ># @FUNCTION: meson_src_compile ># @DESCRIPTION: ># The src_compile function. >meson_src_compile() { > debug-print-function ${FUNCNAME} "$@" > > ninja -v -C "${BUILD_DIR}" || die >} > ># @FUNCTION: meson_src_test ># @DESCRIPTION: ># The src_test function. >meson_src_test() { > debug-print-function ${FUNCNAME} "$@" > > ninja -C "${BUILD_DIR}" test || die >} > ># @FUNCTION: meson_src_install ># @DESCRIPTION: ># The src_install function. >meson_src_install() { > debug-print-function ${FUNCNAME} "$@" > > DESTDIR="${ED}" ninja -C "${BUILD_DIR}" install || die >} > >_MESON=1 >fi
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 597182
: 469012