mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2024-09-20 11:23:16 +00:00
testing/ace-of-penguins: fix build with gcc 14
This commit is contained in:
parent
33b191325f
commit
3b19afb425
2 changed files with 76 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
# Maintainer: Sebastian Hudak <sebastian@sebsite.pw>
|
||||
pkgname=ace-of-penguins
|
||||
pkgver=1.4
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="Collection of one-player games for X"
|
||||
url="https://www.delorie.com/store/ace/"
|
||||
arch="all"
|
||||
|
@ -15,6 +15,7 @@ subpackages="$pkgname-doc"
|
|||
source="https://www.delorie.com/store/ace/ace-$pkgver.tar.gz
|
||||
ace.patch
|
||||
fix-font.patch
|
||||
gcc14.patch
|
||||
canfield.desktop
|
||||
freecell.desktop
|
||||
golf.desktop
|
||||
|
@ -58,6 +59,7 @@ sha512sums="
|
|||
cd382db95dc17d75a76809c7f1e096e14f5863c1166aa5db7f93204ce949a9ed21979212946b9d3a09667f4a93b30f4cc44a220940f9b5dd8996f28ecb4a6dcc ace-1.4.tar.gz
|
||||
6846662deda4c21a89ecaf55afe1580f82f67122f236618a94dcd584cd3a5a76d0429c9bd4ac808e29d04ae78ab9cf9417e274585f87af46a0a769af4917f509 ace.patch
|
||||
b3cd34677326d4b9e47875698aa1bca6985231e1f0e14dc9acdb815c443f767f1199dbd8dd0c72a3aaa2eba62e35c3473a60acaab7c606d848c6cbdb854d3487 fix-font.patch
|
||||
c0eea7703a59c9946ce777ae8c495a7581375fd51451a653316878c1148c4b24412ebbe7b96555c267b212a5be5d8e24d6f6d86f65a68335fb41098be087e003 gcc14.patch
|
||||
4ba6813cb57d2ed41ee8a582b4cc3026a9f69d4c78ee5a012cdcb3284efee0b3efb04917ad2bd9fb4846b7007cce4bfef7e5e9bd8e91c229b4ed31d077f4f10b canfield.desktop
|
||||
3f0b3a55af0df885d23fcd73764e0548b7f7d0e25eb881ee1e24d108dd51a234e4140d37a6c616bc39dc2eb70aeeb0f370a1c0ef0ec3314ffb4a07ab89e0b005 freecell.desktop
|
||||
d76332b739d938ed29ad30f41baaddff6efa70e674aa7354f60b342f828d470212bebacb2a02f6921b8740a616b97b97002455eb153555d7350ffab3ea7b670a golf.desktop
|
||||
|
|
73
testing/ace-of-penguins/gcc14.patch
Normal file
73
testing/ace-of-penguins/gcc14.patch
Normal file
|
@ -0,0 +1,73 @@
|
|||
Fix -Wimplicit-function-declaration and -Wreturn-mismatch errors with gcc 14.
|
||||
|
||||
```
|
||||
imagelib.c: In function 'alloc_synth_image':
|
||||
imagelib.c:109:17: error: implicit declaration of function 'malloc'
|
||||
[-Wimplicit-function-declaration]
|
||||
109 | rv = (image *)malloc (sizeof(image));
|
||||
| ^~~~~~
|
||||
|
||||
./make-imglib.c: In function 'tokenize':
|
||||
./make-imglib.c:205:5: error: 'return' with no value, in function returning
|
||||
non-void [-Wreturn-mismatch]
|
||||
205 | return;
|
||||
| ^~~~~~
|
||||
./make-imglib.c:199:1: note: declared here
|
||||
199 | tokenize(char *string)
|
||||
| ^~~~~~~~
|
||||
./make-imglib.c:207:20: error: implicit declaration of function 'isgraph'
|
||||
[-Wimplicit-function-declaration]
|
||||
207 | while (*next && !isgraph(*next)) next++;
|
||||
| ^~~~~~~
|
||||
./make-imglib.c:10:1: note: include '<ctype.h>' or provide a declaration of
|
||||
'isgraph'
|
||||
9 | #include <png.h>
|
||||
+++ |+#include <ctype.h>
|
||||
```
|
||||
|
||||
--- ace-1.4-origin/lib/imagelib.c
|
||||
+++ ace-1.4/lib/imagelib.c
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "imagelib.h"
|
||||
#include "cards.h"
|
||||
--- ace-1.4-origin/lib/make-imglib.c
|
||||
+++ ace-1.4/lib/make-imglib.c
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <dirent.h>
|
||||
|
||||
#include <png.h>
|
||||
+#include <ctype.h>
|
||||
|
||||
static int verbose = 0;
|
||||
static char *basename = "images";
|
||||
@@ -202,7 +203,7 @@
|
||||
char *rv;
|
||||
if (string) {
|
||||
next = string;
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
while (*next && !isgraph(*next)) next++;
|
||||
if (!*next) return 0;
|
||||
@@ -257,7 +258,7 @@
|
||||
case 'd':
|
||||
depfile = fopen(optarg, "w");
|
||||
if (!depfile) {
|
||||
- fprintf(stderr, "Unable to open dependency file %s for writing\n", depfile);
|
||||
+ fprintf(stderr, "Unable to open dependency file %s for writing\n", optarg);
|
||||
perror("The error was");
|
||||
exit(1);
|
||||
}
|
||||
--- ace-1.4-origin/lib/table.c
|
||||
+++ ace-1.4/lib/table.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <X11/keysym.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/xpm.h>
|
||||
+#include <ctype.h>
|
||||
|
||||
#include "xwin.h"
|
||||
|
Loading…
Reference in a new issue