Mercurial > vanilla
changeset 1195:6f99a368f617
text/scdoc: initial import, closes #2426
While here, add scdoc dependency on projects using it.
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 28 Oct 2019 21:50:00 +0100 |
parents | e4d19663ae34 |
children | dc0ccdbedc04 |
files | graphics/swaybg/swaybg.sh misc/swayidle/swayidle.sh security/swaylock/swaylock.sh text/scdoc/patch-makefile.patch text/scdoc/scdoc.sh text/scdoc/scdoc.sha1 wm/sway/sway.sh |
diffstat | 7 files changed, 70 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/graphics/swaybg/swaybg.sh Mon Oct 28 21:15:00 2019 +0100 +++ b/graphics/swaybg/swaybg.sh Mon Oct 28 21:50:00 2019 +0100 @@ -22,7 +22,7 @@ PKGSUMMARY="wallpaper tool for Wayland compositors" PKGWWW="https://github.com/swaywm/swaybg" PKGDOWNLOAD="https://github.com/swaywm/swaybg/archive/$PKGVERSION.tar.gz" -PKGDEPENDS="cairo glib meson:build wayland wayland-protocols:build" +PKGDEPENDS="cairo glib meson:build scdoc:build wayland wayland-protocols:build" PKGOPTIONS="GDK_PIXBUF" : ${CC:=clang}
--- a/misc/swayidle/swayidle.sh Mon Oct 28 21:15:00 2019 +0100 +++ b/misc/swayidle/swayidle.sh Mon Oct 28 21:50:00 2019 +0100 @@ -22,7 +22,7 @@ PKGSUMMARY="idle management daemon for Wayland" PKGWWW="https://github.com/swaywm/swayidle" PKGDOWNLOAD="https://github.com/swaywm/swayidle/archive/$PKGVERSION.tar.gz" -PKGDEPENDS="meson:build wayland wayland-protocols:build" +PKGDEPENDS="meson:build scdoc:build wayland wayland-protocols:build" PKGOPTIONS="ELOGIND" : ${CC:=clang}
--- a/security/swaylock/swaylock.sh Mon Oct 28 21:15:00 2019 +0100 +++ b/security/swaylock/swaylock.sh Mon Oct 28 21:50:00 2019 +0100 @@ -22,7 +22,7 @@ PKGSUMMARY="Screen locker for Wayland" PKGWWW="https://github.com/swaywm/swaylock" PKGDOWNLOAD="https://github.com/swaywm/swaylock/archive/1.4.tar.gz" -PKGDEPENDS="meson:build wayland wayland-protocols:build" +PKGDEPENDS="meson:build scdoc:build wayland wayland-protocols:build" PKGOPTIONS="GDK_PIXBUF PAM" : ${CC:=clang}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/text/scdoc/patch-makefile.patch Mon Oct 28 21:50:00 2019 +0100 @@ -0,0 +1,11 @@ +--- Makefile.orig 2019-10-28 17:52:42.041614618 +0100 ++++ Makefile 2019-10-28 17:54:45.709618417 +0100 +@@ -1,6 +1,6 @@ + VERSION=1.10.0 +-CFLAGS+=-g -DVERSION='"$(VERSION)"' -Wall -Wextra -Werror -Wno-unused-parameter +-LDFLAGS+=-static ++CFLAGS+=-g -DVERSION='"$(VERSION)"' -Wall -Wextra -Werror -Wno-unused-parameter $(EXTRA_CFLAGS) ++LDFLAGS+=$(EXTRA_LDFLAGS) + INCLUDE+=-Iinclude + PREFIX?=/usr/local + _INSTDIR=$(DESTDIR)$(PREFIX)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/text/scdoc/scdoc.sh Mon Oct 28 21:50:00 2019 +0100 @@ -0,0 +1,54 @@ +#!/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=scdoc +PKGVERSION=1.10.0 +PKGREVISION=1 +PKGLICENSE="MIT" +PKGSUMMARY="simple man page generator for POSIX systems written in C99" +PKGWWW="https://git.sr.ht/~sircmpwn/scdoc" +PKGDOWNLOAD="https://git.sr.ht/~sircmpwn/scdoc/archive/$PKGVERSION.tar.gz" +PKGOPTIONS="STATIC" + +: ${CC:=clang} +: ${CFLAGS:=-O2} +: ${LDFLAGS:=} +: ${STATIC:=no} + +if [ "$STATIC" = "yes" ]; then + with_static="-static" +fi + +build() +{ + rm -rf $PKGNAME-$PKGVERSION + tar -xvf $PKGVERSION.tar.gz + cd $PKGNAME-$PKGVERSION + + # Disable default -static, provide user option. + patch -p0 < ../patch-makefile.patch + make \ + CC="$CC" \ + DESTDIR=$DESTDIR \ + EXTRA_CFLAGS="$CFLAGS" \ + EXTRA_LDFLAGS="$LDFLAGS $with_static" \ + PREFIX= \ + all install + + cd .. + rm -rf $PKGNAME-$PKGVERSION +}