Skip to content

Commit

Permalink
Merge pull request #17 from mariux64/support-meson-build-system
Browse files Browse the repository at this point in the history
Support Meson build system
  • Loading branch information
donald authored Jan 17, 2018
2 parents 768ca9c + df90cd2 commit f1a2cb8
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ BUILDTYPES+=cmake
BUILDTYPES+=configure
BUILDTYPES+=jb
BUILDTYPES+=make
BUILDTYPES+=meson
BUILDTYPES+=perl-module
BUILDTYPES+=perl-module-makemaker
BUILDTYPES+=python-module
Expand Down
55 changes: 55 additions & 0 deletions buildtypes/meson.sh.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#
# bee magic for meson
#
# Copyright (C) 2017
# Paul Menzel <pmenzel@molgen.mpg.de>
# and other bee developers
#
# This file is part of bee.
#
# bee is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

: ${BEE_BUILDTYPE_MESON_MESONBUILD:=${S}/meson.build}

if [ ! -r "${BEE_BUILDTYPE_MESON_MESONBUILD}" ] ; then
return
fi

BEE_BUILDTYPE_DETECTED=meson

BEE_BUILDTYPE_MESON_SOURCEDIR=${BEE_BUILDTYPE_MESON_MESONBUILD%/*}

#### bee_configure() ##########################################################

bee_configure() {
start_cmd meson \
--prefix ${PREFIX} \
--buildtype=plain \
"${@}" \
${S}
}

#### bee_build() ##############################################################

bee_build() {
start_cmd ninja -v -C ${B} ${BEE_MAKEFLAGS} "${@}"
}

#### bee_install() ############################################################

bee_install() {
DESTDIR=${D} start_cmd ninja -C ${B} install "${@}"
}

1 change: 1 addition & 0 deletions src/beesh.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,7 @@ bee_run patch "${bee_PATCHFILES[@]}"

bee_buildmagic=( $("${BEE_BINDIR}/beeuniq" "${BEE_BUILDTYPE[@]}" \
cmake \
meson \
autotools \
autogen \
perl-module \
Expand Down

0 comments on commit f1a2cb8

Please sign in to comment.