Mercurial > vanilla
changeset 923:ea26d8ed5066
audio/ncmpc: initial import, closes #1600
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 27 Aug 2019 20:45:00 +0200 |
parents | ec97c3ab88bd |
children | 9c2079a14085 |
files | audio/ncmpc/ncmpc.sh audio/ncmpc/ncmpc.sha1 |
diffstat | 2 files changed, 96 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/audio/ncmpc/ncmpc.sh Tue Aug 27 20:45:00 2019 +0200 @@ -0,0 +1,95 @@ +#!/bin/sh +# +# Copyright (c) 2019 David Demelier <markand@malikania.fr> +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +PKGNAME=ncmpc +PKGVERSION=0.34 +PKGREVISION=1 +PKGLICENSE="GPLv20" +PKGSUMMARY="curses client for the Music Player Daemon" +PKGDOWNLOAD="https://www.musicpd.org/download/ncmpc/0/$PKGNAME-$PKGVERSION.tar.xz" +PKGDEPENDS="meson:build ncurses" +PKGOPTIONS="COLORS LOCALE MOUSE NLS REGEX" + +: ${CC:=clang} +: ${CFLAGS:=-O2} +: ${CXX:=clang++} +: ${CXXFLAGS:=-O2} +: ${LDFLAGS:=} +: ${COLORS:=yes} +: ${LOCALE:=yes} +: ${MOUSE:=yes} +: ${NLS:=yes} +: ${REGEX:=yes} # Note: regex support through pcre. + +if [ "$COLORS" = "yes" ]; then + with_colors="-D colors=true" +else + with_colors="-D colors=false" +fi + +if [ "$LOCALE" = "yes" ]; then + with_locale="-D locale=enabled" +else + with_locale="-D locale=disabled" +fi + +if [ "$MOUSE" = "yes" ]; then + with_mouse="-D mouse=enabled" +else + with_mouse="-D mouse=disabled" +fi + +if [ "$NLS" = "yes" ]; then + PKGDEPENDS="gettext $PKGDEPENDS" + with_nls="-D nls=enabled" +else + with_nls="-D nls=disabled" +fi + +if [ "$REGEX" = "yes" ]; then + PKGDEPENDS="pcre $PKGDEPENDS" + with_regex="-D regex=enabled" +else + with_regex="-D regex=disabled" +fi + +build() +{ + rm -rf $PKGNAME-$PKGVERSION + tar xvf $PKGNAME-$PKGVERSION.tar.xz + cd $PKGNAME-$PKGVERSION + + CC="$CC" \ + CFLAGS="$CFLAGS" \ + CXX="$CXX" \ + CXXFLAGS="$CXXFLAGS" \ + LDFLAGS="$LDFLAGS" \ + meson . build \ + --prefix / \ + --buildtype release \ + --default-library shared \ + $with_colors \ + $with_locale \ + $with_mouse \ + $with_nls \ + $with_regex + ninja -C build + DESTDIR=$DESTDIR ninja -C build install + + cd .. + rm -rf $PKGNAME-$PKGVERSION +}