From 1f1d4af8ba7db8f56435d13a1c191ecff3d4a85b Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Fri, 13 Apr 2018 01:54:35 +0300 Subject: [PATCH] Nuke the custom configure file. There is nothing provided that meson can't do on it's own. --- README.md | 9 +-- configure | 186 ------------------------------------------------------ 2 files changed, 3 insertions(+), 192 deletions(-) delete mode 100755 configure diff --git a/README.md b/README.md index 29c030e..b5de554 100644 --- a/README.md +++ b/README.md @@ -61,14 +61,11 @@ flatpak build-bundle repo hammond org.gnome.Hammond ```sh git clone https://gitlab.gnome.org/alatiera/hammond.git cd hammond/ -./configure --prefix=/usr/local -make && sudo make install +meson --prefix=/usr build +ninja -C build +sudo ninja -C build install ``` -**Additional:** - -You can run `sudo make uninstall` for removal - #### Dependencies * Rust stable 1.22 or later along with cargo. diff --git a/configure b/configure deleted file mode 100755 index bbe0646..0000000 --- a/configure +++ /dev/null @@ -1,186 +0,0 @@ -#!/bin/bash - -# Adapted from: -# https://gitlab.gnome.org/danigm/libgepub/blob/27f0d374e0c8f6fa972dbd111d4ce0c0f3096914/configure_meson - -# configure script adapter for Meson -# Based on build-api: https://github.com/cgwalters/build-api -# Copyright 2010, 2011, 2013 Colin Walters -# Copyright 2016, 2017 Emmanuele Bassi -# Copyright 2017 Iñigo Martínez -# Licensed under the new-BSD license (http://www.opensource.org/licenses/bsd-license.php) - -# Build API variables: - -# Little helper function for reading args from the commandline. -# it automatically handles -a b and -a=b variants, and returns 1 if -# we need to shift $3. -read_arg() { - # $1 = arg name - # $2 = arg value - # $3 = arg parameter - local rematch='^[^=]*=(.*)$' - if [[ $2 =~ $rematch ]]; then - read "$1" <<< "${BASH_REMATCH[1]}" - else - read "$1" <<< "$3" - # There is no way to shift our callers args, so - # return 1 to indicate they should do it instead. - return 1 - fi -} - -sanitycheck() { - # $1 = arg name - # $1 = arg command - # $2 = arg alternates - local cmd=$( which $2 2>/dev/null ) - - if [ -x "$cmd" ]; then - read "$1" <<< "$cmd" - return 0 - fi - - test -z $3 || { - for alt in $3; do - cmd=$( which $alt 2>/dev/null ) - - if [ -x "$cmd" ]; then - read "$1" <<< "$cmd" - return 0 - fi - done - } - - echo -e "\e[1;31mERROR\e[0m: Command '$2' not found" - exit 1 -} - -checkoption() { - # $1 = arg - option="${1#*--}" - action="${option%%-*}" - name="${option#*-}" - if [ ${default_options[$name]+_} ]; then - case "$action" in - enable) meson_options[$name]=true;; - disable) meson_options[$name]=false;; - *) echo -e "\e[1;33mINFO\e[0m: Ignoring unknown action '$action'";; - esac - else - echo -e "\e[1;33mINFO\e[0m: Ignoring unknown option '$option'" - fi -} - -echooption() { - # $1 = option - if [ ${meson_options[$1]+_} ]; then - echo ${meson_options[$1]} - elif [ ${default_options[$1]+_} ]; then - echo ${default_options[$1]} - fi -} - -sanitycheck MESON 'meson' -sanitycheck MESONTEST 'mesontest' -sanitycheck NINJA 'ninja' 'ninja-build' - -declare -A meson_options - -while (($# > 0)); do - case "${1%%=*}" in - --prefix) read_arg prefix "$@" || shift;; - --bindir) read_arg bindir "$@" || shift;; - --sbindir) read_arg sbindir "$@" || shift;; - --libexecdir) read_arg libexecdir "$@" || shift;; - --datarootdir) read_arg datarootdir "$@" || shift;; - --datadir) read_arg datadir "$@" || shift;; - --sysconfdir) read_arg sysconfdir "$@" || shift;; - --libdir) read_arg libdir "$@" || shift;; - --mandir) read_arg mandir "$@" || shift;; - --includedir) read_arg includedir "$@" || shift;; - *) checkoption $1;; - esac - shift -done - -# Defaults -test -z ${prefix} && prefix="/usr/local" -test -z ${bindir} && bindir=${prefix}/bin -test -z ${sbindir} && sbindir=${prefix}/sbin -test -z ${libexecdir} && libexecdir=${prefix}/bin -test -z ${datarootdir} && datarootdir=${prefix}/share -test -z ${datadir} && datadir=${datarootdir} -test -z ${sysconfdir} && sysconfdir=${prefix}/etc -test -z ${libdir} && libdir=${prefix}/lib -test -z ${mandir} && mandir=${prefix}/share/man -test -z ${includedir} && includedir=${prefix}/include - -# The source directory is the location of this file -srcdir=$(dirname $0) - -# The build directory is the current location -builddir=`pwd` - -# If we're calling this file from the source directory then -# we automatically create a build directory and ensure that -# both Meson and Ninja invocations are relative to that -# location -if [[ -f "${builddir}/meson.build" ]]; then - mkdir -p _build - builddir="${builddir}/_build" - NINJA_OPT="-C ${builddir}" -fi - -# Wrapper Makefile for Ninja -cat > Makefile <