mirror of
https://gitlab.freedesktop.org/freetype/freetype.git
synced 2026-05-07 05:18:10 +02:00
Enable tests on Plan 9.
This commit is contained in:
parent
7974be74d8
commit
4478eeb049
3 changed files with 61 additions and 2 deletions
6
mkfile
6
mkfile
|
|
@ -69,7 +69,13 @@ builds/plan9/p9ftopt.h:D: include/freetype/config/ftoption.h
|
|||
|
||||
clean:V:
|
||||
rm -f *.[$OS] src/*/*.[$OS] $CLEANFILES
|
||||
cd tests && mk $target
|
||||
|
||||
nuke:V:
|
||||
rm -f *.[$OS] src/*/*.[$OS] $CLEANFILES
|
||||
rm -f libfreetype.a[$OS] builds/plan9/p9ftopt.h
|
||||
cd tests && mk $target
|
||||
|
||||
test:V: runtest
|
||||
runtest:V: $LIB
|
||||
cd tests && mk $target
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include <freetype/freetype.h>
|
||||
#include <ft2build.h>
|
||||
|
||||
#ifndef _PLAN9
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
int
|
||||
main( void )
|
||||
|
|
@ -42,6 +43,9 @@ main( void )
|
|||
printf( "unknown %d for char %lu, gid %u\n", code, i, gid );
|
||||
}
|
||||
|
||||
#ifdef _PLAN9
|
||||
exits(0);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
49
tests/mkfile
Normal file
49
tests/mkfile
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# mkfile for Plan 9 from Bell Labs
|
||||
#
|
||||
# Copyright (C) 2026 by Yaroslav Kolomiiets.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used,
|
||||
# modified, and distributed under the terms of the FreeType project
|
||||
# license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
# this file you indicate that you have read the license and understand
|
||||
# and accept it fully.
|
||||
#
|
||||
</$objtype/mkfile
|
||||
|
||||
LIB=../libfreetype.a$O
|
||||
LIBHFILES=../builds/plan9/p9ftopt.h
|
||||
|
||||
TARG=issue-1063
|
||||
OFILES=issue-1063/main.$O
|
||||
HFILES=$LIBHFILES
|
||||
WFILES=data/As.I.Lay.Dying.ttf
|
||||
|
||||
CFLAGS=-p -I../builds/plan9 -I../include \
|
||||
-D'FT_CONFIG_OPTIONS_H=<p9ftopt.h>' \
|
||||
-D'FT_CONFIG_STANDARD_LIBRARY_H=<p9lib.h>' \
|
||||
-D_PLAN9 \
|
||||
|
||||
</sys/src/cmd/mkone
|
||||
|
||||
%.$O: %.c
|
||||
$CC $CFLAGS -o $stem.$O $stem.c
|
||||
|
||||
# compilation requires the generated header
|
||||
$OFILES: $LIB
|
||||
$LIB:
|
||||
cd ..; mk install
|
||||
|
||||
test:V:runtest
|
||||
runtest:V: $O.out $WFILES
|
||||
FREETYPE_TESTS_DATA_DIR=data
|
||||
./$O.out
|
||||
|
||||
data/%.ttf:
|
||||
mkdir -p data
|
||||
hget https://github.com/python-pillow/Pillow/files/6622147/As.I.Lay.Dying.zip |
|
||||
@{cd data && unzip -s && mv 'As I Lay Dying.ttf' $stem.ttf}
|
||||
|
||||
clean:V:
|
||||
rm -f [$OS].* */*.[$OS]
|
||||
nuke:V:
|
||||
rm -f [$OS].* */*.[$OS] $WFILES
|
||||
Loading…
Add table
Reference in a new issue