Ingo Feinerer <feine...@logic.at> writes: > On Fri, Feb 15, 2019 at 09:28:03AM +0000, Stuart Henderson wrote: > >> On 2019/02/15 09:45, Peter Hessler wrote: >> > On 2019 Feb 08 (Fri) at 20:34:00 +0100 (+0100), Ingo Feinerer wrote: >> > :Alternatively we could create a new port for the fork (e.g., >> > :lemonbar-xft). But since both LemonBoy/bar and krypt-n/bar have not seen >> > :a lot of changes recently we won't miss anything important if we just >> > :switch. >> > >> > I tried running it, but it kept puking on my existing scripts. >> > >> > Also, this branch is quite a few commits behind the existing one. >> > >> > I'd *much* rather we not change the upstream. > > @phessler: Thanks for testing! > >> > Either a new port or the big invasive patch. Considering how >> > inactive both projects are, carrying a patch isn't completely >> > terrible :/. >> >> I don't see a downside to adding a new lemonbar-xft port. The two can be >> merged later if appropriate. Just decide whether to rename files so they >> can be installed alongside each other, or mark the conflict. > > Please find attached a new lemonbar-xft port. > > OK to import? > >> Please don't use _ in the package version though. > > Done. > > # $OpenBSD$ > > COMMENT = featherweight lemon-scented bar with XFT support > > VERSION = 1.1.20180416 > > DISTNAME = lemonbar-xft-${VERSION} > > GH_ACCOUNT = krypt-n > GH_PROJECT = bar > GH_COMMIT = 00a3fe6f3485203896156480e86014136749a221 > > CATEGORIES = x11 > > MAINTAINER = Ingo Feinerer <feine...@logic.at> > > # MIT > PERMIT_PACKAGE_CDROM = Yes > > # uses pledge() > WANTLIB += X11 X11-xcb Xft c fontconfig freetype xcb xcb-randr > WANTLIB += xcb-xinerama z > > COMPILER = base-clang ports-gcc > COMPILER_LANGS = c > > MAKE_ENV = LDFLAGS="-L${X11BASE}/lib" > > USE_GMAKE = Yes > > NO_TEST = Yes > > CFLAGS += -I${X11BASE}/include > > ALL_TARGET = all doc > > do-install: > ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/lemonbar-xft/ > ${INSTALL_PROGRAM} ${WRKSRC}/lemonbar ${PREFIX}/bin/lemonbar-xft > ${INSTALL_MAN} ${WRKSRC}/lemonbar.1 ${PREFIX}/man/man1/lemonbar-xft.1 > ${INSTALL_DATA} ${WRKSRC}/LICENSE ${PREFIX}/share/doc/lemonbar-xft/ > > .include <bsd.port.mk> > SHA256 (lemonbar-xft-1.1.20180416-00a3fe6f.tar.gz) = > wNz3vlI37dHYiA/Zg0WIPDRDsxl6BFd6nYKuGzjDA94= > SIZE (lemonbar-xft-1.1.20180416-00a3fe6f.tar.gz) = 16715 > $OpenBSD$ > > Index: Makefile > --- Makefile.orig > +++ Makefile > @@ -7,7 +7,7 @@ ifneq "$(GIT_DESC)" "" > endif > > CC ?= gcc > -CFLAGS += -Wall -std=c99 -Os -DVERSION="\"$(VERSION)\"" > -I/usr/include/freetype2 > +CFLAGS += -Wall -std=c99 -DVERSION="\"$(VERSION)\"" > -I${X11BASE}/include/freetype2 > LDFLAGS += -lxcb -lxcb-xinerama -lxcb-randr -lX11 -lX11-xcb -lXft -lfreetype > -lz -lfontconfig > CFDEBUG = -g3 -pedantic -Wall -Wunused-parameter -Wlong-long \ > -Wsign-conversion -Wconversion -Wimplicit-function-declaration > @@ -22,7 +22,7 @@ BINDIR=${PREFIX}/bin > all: ${EXEC} > > doc: README.pod > - pod2man --section=1 --center="lemonbar Manual" --name "lemonbar" > --release="lemonbar $(VERSION)" README.pod > lemonbar.1 > + pod2man --section=1 --center="lemonbar-xft Manual" --name > "lemonbar-xft" --release="lemonbar-xft $(VERSION)" README.pod > lemonbar.1 > > .c.o: > ${CC} ${CFLAGS} -o $@ -c $< > $OpenBSD$ > > Index: README.pod > --- README.pod.orig > +++ README.pod > @@ -6,7 +6,7 @@ lemonbar - Featherweight lemon-scented bar > > =head1 SYNOPSIS > > -I<lemonbar> [-h | -g I<width>B<x>I<height>B<+>I<x>B<+>I<y> | -b | -d | -f > I<font> | -p | -n I<name> | -u I<pixel> | -B I<color> | -F I<color> | -U > I<color> | -o I<offset> ] > +I<lemonbar-xft> [-h | -g I<width>B<x>I<height>B<+>I<x>B<+>I<y> | -b | -d | > -f I<font> | -p | -n I<name> | -u I<pixel> | -B I<color> | -F I<color> | -U > I<color> | -o I<offset> ] > > =head1 DESCRIPTION > > @@ -185,7 +185,7 @@ Clicking on an area makes lemonbar output the command > > =head1 WWW > > -L<git repository|https://github.com/LemonBoy/bar> > +L<git repository|https://github.com/krypt-n/bar> > > =head1 AUTHOR > > $OpenBSD$ > > Index: lemonbar.c > --- lemonbar.c.orig > +++ lemonbar.c > @@ -1538,6 +1538,9 @@ main (int argc, char **argv) > // Prevent fgets to block > fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK); > > + if (pledge("stdio", NULL) == -1) > + fprintf(stderr, "pledge\n"); > + > for (;;) { > bool redraw = false; > > lemonbar (formerly known as bar) is a lightweight bar entirely based on XCB. > Provides full UTF-8 support, basic formatting, RandR and Xinerama support and > EWMH compliance without wasting your precious memory. > @comment $OpenBSD: PLIST,v$ > @bin bin/lemonbar-xft > @man man/man1/lemonbar-xft.1 > share/doc/lemonbar-xft/ > share/doc/lemonbar-xft/LICENSE
For some reason the compilation gives warning on pledge although unistd.h is included: lemonbar.c:1541:9: warning: implicit declaration of function 'pledge' is invalid in C99 [-Wimplicit-function-declaration] if (pledge("stdio", NULL) == -1) ^ 1 warning generated. Timo