fix: accountsservice definitions and aalib patches
This commit is contained in:
parent
9d660cd2e0
commit
f36475732e
107
src/aalib/c99.patch
Normal file
107
src/aalib/c99.patch
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
Add additional system header #include directives for more
|
||||||
|
function prototypes. This avoids implicit function declarations
|
||||||
|
and build failures with future compilers.
|
||||||
|
|
||||||
|
diff --git a/src/aafire.c b/src/aafire.c
|
||||||
|
index 4f36149aa84fba57..a59b5c5fa58e085b 100644
|
||||||
|
--- a/src/aafire.c
|
||||||
|
+++ b/src/aafire.c
|
||||||
|
@@ -1,4 +1,5 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
#include "aalib.h"
|
||||||
|
|
||||||
|
#define XSIZ aa_imgwidth(context)
|
||||||
|
diff --git a/src/aainfo.c b/src/aainfo.c
|
||||||
|
index d3f6d50f34590638..f4250ee37ae46134 100644
|
||||||
|
--- a/src/aainfo.c
|
||||||
|
+++ b/src/aainfo.c
|
||||||
|
@@ -1,3 +1,4 @@
|
||||||
|
+#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "aalib.h"
|
||||||
|
#include "aaint.h"
|
||||||
|
diff --git a/src/aakbdreg.c b/src/aakbdreg.c
|
||||||
|
index def65fe25646d75a..682616313c1b6ebd 100644
|
||||||
|
--- a/src/aakbdreg.c
|
||||||
|
+++ b/src/aakbdreg.c
|
||||||
|
@@ -1,4 +1,5 @@
|
||||||
|
#include <malloc.h>
|
||||||
|
+#include <string.h>
|
||||||
|
#include "config.h"
|
||||||
|
#include "aalib.h"
|
||||||
|
#include "aaint.h"
|
||||||
|
diff --git a/src/aalib.c b/src/aalib.c
|
||||||
|
index 11fecc8fe8ef6b59..1ef12c0dfa9026a4 100644
|
||||||
|
--- a/src/aalib.c
|
||||||
|
+++ b/src/aalib.c
|
||||||
|
@@ -1,4 +1,5 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <malloc.h>
|
||||||
|
#include "aalib.h"
|
||||||
|
diff --git a/src/aalinuxkbd.c b/src/aalinuxkbd.c
|
||||||
|
index c7f388abfe9e8c7f..ea988154518dfc8e 100644
|
||||||
|
--- a/src/aalinuxkbd.c
|
||||||
|
+++ b/src/aalinuxkbd.c
|
||||||
|
@@ -8,6 +8,7 @@
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
+#include <stdlib.h>
|
||||||
|
#ifdef LINUX_DRIVER
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
diff --git a/src/aamoureg.c b/src/aamoureg.c
|
||||||
|
index 03808289eb59b928..6d807416ae0d3dc2 100644
|
||||||
|
--- a/src/aamoureg.c
|
||||||
|
+++ b/src/aamoureg.c
|
||||||
|
@@ -1,4 +1,5 @@
|
||||||
|
#include <malloc.h>
|
||||||
|
+#include <string.h>
|
||||||
|
#include "config.h"
|
||||||
|
#include "aalib.h"
|
||||||
|
#include "aaint.h"
|
||||||
|
diff --git a/src/aaregist.c b/src/aaregist.c
|
||||||
|
index 54abec0b9797533a..768b8ce29e286b00 100644
|
||||||
|
--- a/src/aaregist.c
|
||||||
|
+++ b/src/aaregist.c
|
||||||
|
@@ -1,4 +1,5 @@
|
||||||
|
#include <malloc.h>
|
||||||
|
+#include <string.h>
|
||||||
|
#include "config.h"
|
||||||
|
#include "aalib.h"
|
||||||
|
#include "aaint.h"
|
||||||
|
diff --git a/src/aasavefont.c b/src/aasavefont.c
|
||||||
|
index b00e1e6d7f181952..864ba225d5ef626c 100644
|
||||||
|
--- a/src/aasavefont.c
|
||||||
|
+++ b/src/aasavefont.c
|
||||||
|
@@ -1,3 +1,4 @@
|
||||||
|
+#include <stdlib.h>
|
||||||
|
#include "aalib.h"
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
diff --git a/src/aatest.c b/src/aatest.c
|
||||||
|
index 9816f5d855134894..89933cfba6344270 100644
|
||||||
|
--- a/src/aatest.c
|
||||||
|
+++ b/src/aatest.c
|
||||||
|
@@ -1,3 +1,5 @@
|
||||||
|
+#include <stdlib.h>
|
||||||
|
+#include <string.h>
|
||||||
|
#include "aalib.h"
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
diff --git a/src/aaxkbd.c b/src/aaxkbd.c
|
||||||
|
index f16afc63bb565512..44b91458b4bef3bc 100644
|
||||||
|
--- a/src/aaxkbd.c
|
||||||
|
+++ b/src/aaxkbd.c
|
||||||
|
@@ -7,6 +7,7 @@
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/keysymdef.h>
|
||||||
|
#include <X11/keysym.h>
|
||||||
|
+#include <X11/Xutil.h>
|
||||||
|
#include "aalib.h"
|
||||||
|
#include "aaint.h"
|
||||||
|
#include "aaxint.h"
|
||||||
|
|
15
src/aalib/curses_getsize_fix.patch
Normal file
15
src/aalib/curses_getsize_fix.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
diff -up aalib-1.4.0/src/aacurses.c.opaque-ncurses-fix aalib-1.4.0/src/aacurses.c
|
||||||
|
--- aalib-1.4.0/src/aacurses.c.opaque-ncurses-fix 2024-02-10 06:32:32.008267145 -0500
|
||||||
|
+++ aalib-1.4.0/src/aacurses.c 2024-02-10 06:33:38.648245270 -0500
|
||||||
|
@@ -71,8 +71,8 @@ static void curses_getsize(aa_context *
|
||||||
|
{
|
||||||
|
if (__resized_curses)
|
||||||
|
curses_uninit(c), curses_init(&c->params, NULL,&c->driverparams, NULL), __resized_curses = 0;
|
||||||
|
- *width = stdscr->_maxx + 1;
|
||||||
|
- *height = stdscr->_maxy + 1;
|
||||||
|
+ *width = getmaxx(stdscr);
|
||||||
|
+ *height = getmaxy(stdscr);
|
||||||
|
#ifdef GPM_MOUSEDRIVER
|
||||||
|
gpm_mx = *width;
|
||||||
|
gpm_my = *height;
|
||||||
|
|
@ -2,8 +2,18 @@ NAME="aalib"
|
|||||||
DESC="Library to render any graphic into ASCII Ar"
|
DESC="Library to render any graphic into ASCII Ar"
|
||||||
VERSION="1.4rc5"
|
VERSION="1.4rc5"
|
||||||
|
|
||||||
FILES=("https://downloads.sourceforge.net/aa-project/aalib-${VERSION}.tar.gz")
|
FILES=(
|
||||||
HASHES=("9801095c42bba12edebd1902bcf0a990")
|
"https://downloads.sourceforge.net/aa-project/aalib-${VERSION}.tar.gz"
|
||||||
|
"rawmode_init_return.patch"
|
||||||
|
"curses_getsize_fix.patch"
|
||||||
|
"c99.patch"
|
||||||
|
)
|
||||||
|
HASHES=(
|
||||||
|
"9801095c42bba12edebd1902bcf0a990"
|
||||||
|
"b7ef5ababe8070c02ce6e66b7105c99b6d96d997ed6dcde877289bc2d58edd09"
|
||||||
|
"c0c0bbb30c4a5f0872c31d139a119c31a9264fb7acfc8219ef22793b422a2b5b"
|
||||||
|
"77302331599aebbae529ae2eaba3def77abf209998f0678c30e14f201033567a"
|
||||||
|
)
|
||||||
|
|
||||||
DEPENDS=("slang" "gpm" "mkfontscale" "fonts")
|
DEPENDS=("slang" "gpm" "mkfontscale" "fonts")
|
||||||
|
|
||||||
@ -12,11 +22,21 @@ PACKAGE() {
|
|||||||
cd "${NAME}-1.4.0"
|
cd "${NAME}-1.4.0"
|
||||||
|
|
||||||
sed -i -e '/AM_PATH_AALIB,/s/AM_PATH_AALIB/[&]/' aalib.m4
|
sed -i -e '/AM_PATH_AALIB,/s/AM_PATH_AALIB/[&]/' aalib.m4
|
||||||
./configure --prefix=/usr \
|
sed -e 's/8x13bold/-*-luxi mono-bold-r-normal--13-120-*-*-m-*-*-*/' \
|
||||||
--infodir=/usr/share/info \
|
-i src/aax.c
|
||||||
--mandir=/usr/share/man \
|
|
||||||
--with-ncurses=/usr \
|
patch -Np1 -i ../rawmode_init_return.patch
|
||||||
--disable-static
|
patch -Np1 -i ../curses_getsize_fix.patch
|
||||||
|
patch -Np1 -i ../c99.patch
|
||||||
|
|
||||||
|
autoreconf -fi
|
||||||
|
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--infodir=/usr/share/info \
|
||||||
|
--mandir=/usr/share/man \
|
||||||
|
--with-ncurses=/usr \
|
||||||
|
--disable-static
|
||||||
|
|
||||||
make
|
make
|
||||||
make DESTDIR="${ROOTDIR}" install
|
make DESTDIR="${ROOTDIR}" install
|
||||||
|
|
||||||
|
13
src/aalib/rawmode_init_return.patch
Normal file
13
src/aalib/rawmode_init_return.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff -Nur aalib-1.4.0-orig/src/aalinuxkbd.c aalib-1.4.0/src/aalinuxkbd.c
|
||||||
|
--- aalib-1.4.0-orig/src/aalinuxkbd.c 2001-04-26 16:37:31.000000000 +0200
|
||||||
|
+++ aalib-1.4.0/src/aalinuxkbd.c 2005-07-01 22:57:59.000000000 +0200
|
||||||
|
@@ -200,7 +200,7 @@
|
||||||
|
static int rawmode_init(void)
|
||||||
|
{
|
||||||
|
if (!closed)
|
||||||
|
- return;
|
||||||
|
+ return 1;
|
||||||
|
mypid = getpid();
|
||||||
|
if (tty_fd == -1) {
|
||||||
|
tty_fd = fileno(stdin);
|
||||||
|
|
@ -13,15 +13,22 @@ PACKAGE() {
|
|||||||
|
|
||||||
mv tests/dbusmock{,-tests}
|
mv tests/dbusmock{,-tests}
|
||||||
sed -e '/accounts_service\.py/s/dbusmock/dbusmock-tests/' \
|
sed -e '/accounts_service\.py/s/dbusmock/dbusmock-tests/' \
|
||||||
-i tests/test-libaccountsservice.py
|
-e 's/assertEquals/assertEqual/' \
|
||||||
|
-i tests/test-libaccountsservice.py
|
||||||
|
sed -i '/^SIMULATED_SYSTEM_LOCALE/s/en_IE.UTF-8/en_HK.iso88591/' tests/test-daemon.py
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
meson setup .. \
|
meson setup .. \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--buildtype=release \
|
--buildtype=release \
|
||||||
-Dadmin_group=adm
|
-Dadmin_group=adm
|
||||||
|
|
||||||
|
# print_indent is not defined in netgroup-debug.c, just put a defination
|
||||||
|
# in a random header so gcc doesnt complain
|
||||||
|
echo "void print_indent(FILE *stream, unsigned int indent);" >> ../subprojects/mocklibc-1.0/src/netgroup-debug.h
|
||||||
|
|
||||||
ninja
|
ninja
|
||||||
DESTDIR="${ROOTDIR}" ninja install
|
DESTDIR="${ROOTDIR}" ninja install
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user