From c328594d52f098f253f22012df32bcdefe85141e Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Thu, 17 Mar 2022 15:17:16 +0100 Subject: [PATCH] notion: update to 4.0.2. - Fix homepage - Fix musl - Fix nonfree, upstream should be proper LGPL-2.1-or-later now - Use Lua 5.4 --- srcpkgs/notion/patches/musl.patch | 77 +++++++++++++++++++++++++++++++ srcpkgs/notion/template | 18 ++++---- 2 files changed, 85 insertions(+), 10 deletions(-) create mode 100644 srcpkgs/notion/patches/musl.patch diff --git a/srcpkgs/notion/patches/musl.patch b/srcpkgs/notion/patches/musl.patch new file mode 100644 index 000000000000..042547d69adf --- /dev/null +++ b/srcpkgs/notion/patches/musl.patch @@ -0,0 +1,77 @@ +--- a/mod_notionflux/mod_notionflux.c ++++ b/mod_notionflux/mod_notionflux.c +@@ -36,7 +36,7 @@ + + typedef struct{ + int fd; +- FILE *stdout; ++ FILE *std_out; + int ndata; + char *data; + } Buf; +@@ -64,9 +64,9 @@ + close(buf->fd); + buf->fd=-1; + buf->ndata=0; +- if(buf->stdout!=NULL){ +- fclose(buf->stdout); +- buf->stdout=NULL; ++ if(buf->std_out!=NULL){ ++ fclose(buf->std_out); ++ buf->std_out=NULL; + } + if(buf->data!=NULL){ + free(buf->data); +@@ -147,11 +147,11 @@ + bool success=FALSE; + int idx=buf-bufs; + +- if(buf->stdout==NULL){ /* no fd received yet, must be the very beginning */ +- int stdout_fd=unix_recv_fd(fd); +- if(stdout_fd==-2) ++ if(buf->std_out==NULL){ /* no fd received yet, must be the very beginning */ ++ int std_out_fd=unix_recv_fd(fd); ++ if(std_out_fd==-2) + goto closefd; +- if(stdout_fd==-3){ ++ if(std_out_fd==-3){ + char const *err="Magic number mismatch on notionflux socket - " + "is notionflux the same version as notion?"; + writes(fd, "E"); +@@ -160,13 +160,13 @@ + goto closefd; + } + +- if(stdout_fd==-1) { ++ if(std_out_fd==-1) { + if(errno==EWOULDBLOCK || errno==EAGAIN) + return; /* try again later */ + warn("No file descriptor received from notionflux, closing."); + goto closefd; + } +- if((buf->stdout=fdopen(stdout_fd, "w"))==NULL) { ++ if((buf->std_out=fdopen(std_out_fd, "w"))==NULL) { + warn("fdopen() failed on fd from notionflux"); + goto closefd; + } +@@ -239,9 +239,9 @@ + EXTL_EXPORT + bool mod_notionflux_xwrite(int idx, const char *str) + { +- if (idx<0 || idx>=MAX_SERVED || bufs[idx].stdout==NULL) ++ if (idx<0 || idx>=MAX_SERVED || bufs[idx].std_out==NULL) + return FALSE; +- return fputs(str, bufs[idx].stdout)!=EOF; ++ return fputs(str, bufs[idx].std_out)!=EOF; + } + + static void connection_attempt(int lfd, void *UNUSED(data)) +@@ -410,7 +410,7 @@ + + for(i=0; i