Recipe cleanup and add freeglut (WIP)

This commit is contained in:
Jeremy Soller 2018-12-10 12:44:02 -07:00
parent 9c8f493fce
commit a421212313
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1
38 changed files with 215 additions and 126 deletions

View File

@ -13,7 +13,7 @@ function recipe_update {
}
function recipe_build {
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
export LDFLAGS="-L$sysroot/lib"
export CPPFLAGS="-I$sysroot/include"
./configure --host=${HOST} --prefix=/ --without-fonts

View File

@ -1,12 +1,14 @@
diff -ru source/lib/nonblock.c source-new/lib/nonblock.c
--- source/lib/nonblock.c 2017-08-07 15:42:29.000000000 -0700
+++ source-new/lib/nonblock.c 2017-08-17 10:57:30.123497389 -0700
diff -ruw source/lib/nonblock.c source-new/lib/nonblock.c
--- source/lib/nonblock.c 2018-10-27 04:00:54.000000000 -0600
+++ source-new/lib/nonblock.c 2018-12-10 12:40:21.350755609 -0700
@@ -47,7 +47,7 @@
int curlx_nonblock(curl_socket_t sockfd, /* operate on this */
int nonblock /* TRUE or FALSE */)
{
-#if defined(USE_BLOCKING_SOCKETS)
+#if 1
+#if defined(USE_BLOCKING_SOCKETS) || defined(__redox__)
(void)sockfd;
(void)nonblock;
return 0; /* returns success */
Only in source-new/lib: nonblock.c.orig
Only in source-new/lib: nonblock.c.rej

View File

@ -1,10 +1,12 @@
--- source/include/curl/curl.h 2017-08-07 15:42:29.000000000 -0700
+++ build/include/curl/curl.h 2018-09-20 14:27:20.462414020 -0700
@@ -74,6 +74,7 @@
diff -ruw source/include/curl/curl.h source-new/include/curl/curl.h
--- source/include/curl/curl.h 2018-10-30 10:53:59.000000000 -0600
+++ source-new/include/curl/curl.h 2018-12-10 12:42:52.504393368 -0700
@@ -74,7 +74,7 @@
#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
+ defined(__redox__) || \
- defined(__CYGWIN__) || \
+ defined(__CYGWIN__) || defined(__redox__) \
(defined(__FreeBSD_version) && (__FreeBSD_version < 800000))
#include <sys/select.h>
#endif

View File

@ -1,31 +0,0 @@
commit 3cb4bb6b5fb8a936cb69e2e9ea6a4e692122abb9
Author: Jakub Zakrzewski <slither.jz@gmail.com>
Date: Tue Aug 15 13:21:33 2017 -0400
curl-confopts.m4: fix --disable-threaded-resolver
Closes https://github.com/curl/curl/issues/1784
diff --git a/m4/curl-confopts.m4 b/m4/curl-confopts.m4
index d77a884d5..6dcd0f1a6 100644
--- a/m4/curl-confopts.m4
+++ b/m4/curl-confopts.m4
@@ -37,14 +37,14 @@ AC_HELP_STRING([--enable-threaded-resolver],[Enable threaded resolver])
AC_HELP_STRING([--disable-threaded-resolver],[Disable threaded resolver]),
OPT_THRES=$enableval)
case "$OPT_THRES" in
- *)
- dnl configure option not specified
- want_thres="yes"
- ;;
no)
dnl --disable-threaded-resolver option used
want_thres="no"
;;
+ *)
+ dnl configure option not specified
+ want_thres="yes"
+ ;;
esac
AC_MSG_RESULT([$want_thres])
])

View File

@ -1,10 +1,10 @@
TAR=https://curl.haxx.se/download/curl-7.55.1.tar.gz
BRANCH=redox
VERSION="7.62.0"
TAR=https://curl.haxx.se/download/curl-$VERSION.tar.gz
BUILD_DEPENDS=(openssl zlib)
DEPENDS="ca-certificates"
function recipe_version {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
echo "$VERSION"
skip=1
}
@ -14,9 +14,19 @@ function recipe_update {
}
function recipe_build {
sysroot="$(realpath ../sysroot)"
wget -O config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
autoreconf -i
./configure --prefix=/ --host=${HOST} --disable-tftp --disable-ftp --disable-ntlm-wb --disable-threaded-resolver --with-zlib="$PWD/../sysroot" --with-ssl="$PWD/../sysroot" --with-ca-path=/ssl/certs
./configure \
--prefix=/ \
--host=${HOST} \
--disable-tftp \
--disable-ftp \
--disable-ntlm-wb \
--disable-threaded-resolver \
--with-zlib="$sysroot" \
--with-ssl="$sysroot" \
--with-ca-path=/ssl/certs
make -j"$(nproc)"
skip=1
}
@ -34,6 +44,5 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
make DESTDIR="$dest" install
rm -rf "$1"/share
skip=1
}

View File

@ -13,7 +13,7 @@ function recipe_update {
}
function recipe_build {
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
export LDFLAGS="-L$sysroot/lib"
export CFLAGS="-I$sysroot/include -I$sysroot/include/SDL"
export SDLCONFIG="$sysroot/bin/sdl-config"

View File

@ -30,6 +30,6 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
make DESTDIR="$dest" install
rm -rf "$1"/{lib/pkgconfig,share}
rm -f "$dest/lib/"*.la
skip=1
}

View File

@ -0,0 +1,44 @@
TAR=https://cytranet.dl.sourceforge.net/project/freeglut/freeglut/3.0.0/freeglut-3.0.0.tar.gz
BUILD_DEPENDS=(mesa mesa_glu)
function recipe_version {
echo "3.0.0"
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
sysroot="$(realpath ../sysroot)"
export CFLAGS="-I$sysroot/include"
export CPPFLAGS="-I$sysroot/include"
export LDFLAGS="-L$sysroot/lib"
cmake \
-D CMAKE_TOOLCHAIN_FILE=../redox_cross_toolchain.cmake \
-D CMAKE_INSTALL_PREFIX=/ \
-D FREEGLUT_GLES=0 \
.
#./configure --host="${HOST}" --prefix=/ --enable-osmesa
make -j"$(nproc)"
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
make clean
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
make DESTDIR="$dest" install
skip=1
}

View File

@ -0,0 +1 @@
SET(CMAKE_SYSTEM_NAME Redox)

View File

@ -1,4 +1,4 @@
VERSION=2.9
VERSION=2.9.1
TAR=https://download.savannah.gnu.org/releases/freetype/freetype-$VERSION.tar.gz
BUILD_DEPENDS=(zlib libpng)
@ -13,10 +13,9 @@ function recipe_update {
}
function recipe_build {
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
export LDFLAGS="-L$sysroot/lib"
export CPPFLAGS="-I$sysroot/include"
./configure --host=${HOST} --prefix='/'
make -j"$(nproc)"
skip=1
@ -35,6 +34,6 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
make DESTDIR="$dest" install
sed -i -e "s%//lib/libpng16.la%$dest/../sysroot/lib/libpng16.la%" "$dest/lib/libfreetype.la"
rm -f "$dest/lib/"*.la
skip=1
}

View File

@ -12,7 +12,7 @@ function recipe_update {
function recipe_build {
cp ../gears.c gears.c
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
set -x
"${CXX}" -I "$sysroot/include" -L "$sysroot/lib" gears.c -o gears -lorbital -lOSMesa -lGLU -lglapi -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -lm
set +x

View File

@ -15,7 +15,7 @@ function recipe_update {
function recipe_build {
export CPPHOST=${HOST}-g++
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
export LDFLAGS="-L$sysroot/lib"
export CPPFLAGS="-I$sysroot/include"
make all -j"$(nproc)"

View File

@ -16,7 +16,7 @@ function recipe_update {
}
function recipe_build {
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
export LDFLAGS="-L$sysroot/lib"
export CPPFLAGS="-I$sysroot/include"
./configure --host=${HOST} --prefix=/ ac_cv_fread_reads_directories=yes ac_cv_snprintf_returns_bogus=yes ac_cv_lib_curl_curl_global_init=yes CURL_CONFIG=no

View File

@ -12,7 +12,7 @@ function recipe_update {
}
function recipe_build {
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
mkdir -p "$sysroot/usr"
ln -sf "$sysroot/include" "$sysroot/usr/include"
ln -sf "$sysroot/lib" "$sysroot/usr/lib"

View File

@ -12,7 +12,7 @@ function recipe_update {
}
function recipe_build {
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
export LDFLAGS="-L$sysroot/lib"
export CPPFLAGS="-I$sysroot/include"
./configure --host=${HOST} --prefix=/

View File

@ -30,5 +30,6 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
make DESTDIR="$dest" install
rm -f "$dest/lib/"*.la
skip=1
}

View File

@ -30,5 +30,6 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
make DESTDIR="$dest" install
rm -f "$dest/lib/"*.la
skip=1
}

View File

@ -37,5 +37,6 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
make DESTDIR="$dest" install
rm -f "$dest/bin/"*-config "$dest/lib/"*.la
skip=1
}

View File

@ -13,7 +13,7 @@ function recipe_update {
}
function recipe_build {
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
export CFLAGS="-I$sysroot/include -I$sysroot/include/ncursesw"
export LDFLAGS="-L$sysroot/lib"
make -j"$(nproc)"

View File

@ -14,13 +14,14 @@ function recipe_update {
}
function recipe_build {
NOCONFIGURE=1 ./autogen.sh
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
export CFLAGS="-I$sysroot/include -DHAVE_PTHREAD=1"
export CPPFLAGS="-I$sysroot/include -DHAVE_PTHREAD=1"
export LDFLAGS="-L$sysroot/lib"
EXPAT_LIBS="-lexpat" EXPAT_CFLAGS="." \
./configure --host="${HOST}" --prefix=/ \
NOCONFIGURE=1 ./autogen.sh
./configure \
--host="${HOST}" \
--prefix=/ \
--disable-dri \
--disable-dri3 \
--disable-driglx-direct \
@ -48,6 +49,6 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
make DESTDIR="$dest" install
sed -i -e "s%//lib/libglapi.la%$dest/lib/libglapi.la%" "$dest/lib/"*.la
rm -f "$dest/lib/"*.la
skip=1
}

View File

@ -1,8 +1,9 @@
TAR=ftp://ftp.freedesktop.org/pub/mesa/glu/glu-9.0.0.tar.bz2
VERSION=9.0.0
TAR=ftp://ftp.freedesktop.org/pub/mesa/glu/glu-$VERSION.tar.bz2
BUILD_DEPENDS=(mesa)
function recipe_version {
echo "9.0.0"
echo "$VERSION"
skip=1
}
@ -12,11 +13,11 @@ function recipe_update {
}
function recipe_build {
wget -O config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
export CFLAGS="-I$sysroot/include"
export CPPFLAGS="-I$sysroot/include"
export LDFLAGS="-L$sysroot/lib"
wget -O config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
./configure --host="${HOST}" --prefix=/ --enable-osmesa
make -j"$(nproc)"
skip=1
@ -35,5 +36,6 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
make DESTDIR="$dest" install
rm -f "$dest/lib/"*.la
skip=1
}

View File

@ -14,7 +14,7 @@ function recipe_update {
}
function recipe_build {
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
export TARGET="framebuffer"
export CFLAGS="-I$sysroot/include -I${PWD}/inst-${TARGET}/include"
export LDFLAGS="-L$sysroot/lib -L${PWD}/inst-${TARGET}/lib -Wl,--allow-multiple-definition"

View File

@ -12,7 +12,7 @@ function recipe_update {
}
function recipe_build {
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
export CFLAGS="-static -nostdinc -I $sysroot/include -I /usr/lib/gcc/x86_64-unknown-redox/7.0.1/include/ -nostdlib -L $sysroot/lib"
export CRT="$sysroot/lib/crt0.o"
export CLIBS="-lc -lm"

View File

@ -2,10 +2,6 @@ VERSION=0.1
GIT=https://github.com/AlisterT/openjazz
BUILD_DEPENDS=(sdl liborbital zlib)
export CFLAGS="-I$PWD/sysroot/include/ -I$PWD/sysroot/include/SDL/ -UUSE_SOCKETS -UUSE_SDL_NET"
export CPPFLAGS="$CFLAGS"
export LDFLAGS="-L$PWD/sysroot/lib/"
function recipe_version {
echo "$VERSION"
skip=1
@ -17,6 +13,10 @@ function recipe_update {
}
function recipe_build {
sysroot="$(realpath ../sysroot)"
export CFLAGS="-I$sysroot/include -UUSE_SOCKETS -UUSE_SDL_NET"
export CPPFLAGS="$CFLAGS"
export LDFLAGS="-L$sysroot/lib"
touch INSTALL NEWS README AUTHORS ChangeLog COPYING
autoreconf -fvi
autoconf

View File

@ -12,7 +12,7 @@ function recipe_update {
function recipe_build {
cp ../osdemo.c osdemo.c
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
set -x
"${CXX}" -I "$sysroot/include" -L "$sysroot/lib" osdemo.c -o osdemo -lorbital -lOSMesa -lGLU -lglapi -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -lm
set +x

View File

@ -13,7 +13,7 @@ function recipe_update {
}
function recipe_build {
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
export LDFLAGS="-L$sysroot/lib"
export CFLAGS="-I$sysroot/include"
./configure --disable-shared --host=${HOST} --prefix=""

View File

@ -14,7 +14,7 @@ function recipe_update {
function recipe_build {
wget -O config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
./configure \
--host=${HOST} \

View File

@ -2,9 +2,6 @@ VERSION=1.2.15
TAR=https://www.libsdl.org/release/SDL-$VERSION.tar.gz
BUILD_DEPENDS=(liborbital)
export CFLAGS="-I$PWD/sysroot/include/"
export LDFLAGS="-L$PWD/sysroot/lib/"
function recipe_version {
echo "$VERSION"
skip=1
@ -16,8 +13,22 @@ function recipe_update {
}
function recipe_build {
sysroot="$(realpath ../sysroot)"
export CFLAGS="-I$sysroot/include"
export LDFLAGS="-L$sysroot/lib"
./autogen.sh
./configure --prefix=/ --host=${HOST} --disable-shared --disable-pulseaudio --disable-video-x11 --disable-loadso --disable-threads --enable-audio --enable-dummyaudio --enable-video-orbital --enable-cdrom
./configure \
--host=${HOST} \
--prefix=/ \
--disable-shared \
--disable-pulseaudio \
--disable-video-x11 \
--disable-loadso \
--disable-threads \
--enable-audio \
--enable-dummyaudio \
--enable-video-orbital \
--enable-cdrom
make -j"$(nproc)"
skip=1
}
@ -35,5 +46,6 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
make DESTDIR="$dest" install
rm -f "$dest/bin/"*-config "$dest/lib/"*.la
skip=1
}

View File

@ -1,10 +1,7 @@
VERSION=2.0.25
VERSION=2.0.26
TAR=https://sourceforge.net/projects/sdlgfx/files/SDL_gfx-$VERSION.tar.gz
BUILD_DEPENDS=(sdl liborbital libiconv)
export CFLAGS="-I$PWD/sysroot/include/"
export LDFLAGS="-L$PWD/sysroot/lib/"
function recipe_version {
echo "$VERSION"
skip=1
@ -16,6 +13,9 @@ function recipe_update {
}
function recipe_build {
sysroot="$(realpath ../sysroot)"
export CFLAGS="-I$sysroot/include"
export LDFLAGS="-L$sysroot/lib"
./autogen.sh
./configure --prefix=/ --host=${HOST} --disable-shared --disable-sdltest
make -j"$(nproc)"
@ -34,8 +34,7 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
sysroot="$(realpath ../sysroot)"
make DESTDIR="$dest" install
sed -i -e "s%//lib/libSDL.la%$sysroot/lib/libSDL.la%" "$dest/lib/"*.la
rm -f "$dest/lib/"*.la
skip=1
}

View File

@ -1,9 +1,6 @@
VERSION=1.2.12
TAR=https://www.libsdl.org/projects/SDL_image/release/SDL_image-$VERSION.tar.gz
BUILD_DEPENDS=(sdl liborbital libjpeg libpng zlib)
export CFLAGS="-I$PWD/sysroot/include/"
export LDFLAGS="-L$PWD/sysroot/lib/"
BUILD_DEPENDS=(sdl liborbital libiconv libjpeg libpng zlib)
function recipe_version {
echo "$VERSION"
@ -16,6 +13,9 @@ function recipe_update {
}
function recipe_build {
sysroot="$(realpath ../sysroot)"
export CFLAGS="-I$sysroot/include"
export LDFLAGS="-L$sysroot/lib"
./autogen.sh
./configure --prefix=/ --host=${HOST} --disable-shared --disable-sdltest --enable-png --enable-jpg
make -j"$(nproc)"
@ -34,10 +34,7 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
sysroot="$(realpath ../sysroot)"
make DESTDIR="$dest" install
sed -i -e "s%//lib/libpng.la%$sysroot/lib/libpng.la%" "$dest/lib/"*.la
sed -i -e "s%//lib/libjpeg.la%$sysroot/lib/libjpeg.la%" "$dest/lib/"*.la
sed -i -e "s%//lib/libSDL.la%$sysroot/lib/libSDL.la%" "$dest/lib/"*.la
rm -f "$dest/lib/"*.la
skip=1
}

View File

@ -2,9 +2,6 @@ VERSION=1.2.12
TAR=https://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-$VERSION.tar.gz
BUILD_DEPENDS=(sdl liborbital)
export CFLAGS="-I$PWD/sysroot/include/"
export LDFLAGS="-L$PWD/sysroot/lib/"
function recipe_version {
echo "$VERSION"
skip=1
@ -16,8 +13,20 @@ function recipe_update {
}
function recipe_build {
sysroot="$(realpath ../sysroot)"
export CFLAGS="-I$sysroot/include"
export LDFLAGS="-L$sysroot/lib"
./autogen.sh
./configure --prefix=/ --host=${HOST} --disable-shared --disable-sdltest --disable-music-cmd --disable-music-mp3 --disable-smpegtest --disable-music-midi --disable-music-mod
./configure \
--prefix=/ \
--host=${HOST} \
--disable-shared \
--disable-sdltest \
--disable-music-cmd \
--disable-music-mp3 \
--disable-smpegtest \
--disable-music-midi \
--disable-music-mod
make -j"$(nproc)"
skip=1
}
@ -34,8 +43,7 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
sysroot="$(realpath ../sysroot)"
make DESTDIR="$dest" install
sed -i -e "s%//lib/libSDL.la%$sysroot/lib/libSDL.la%" "$dest/lib/"*.la
rm -f "$dest/lib/"*.la
skip=1
}

View File

@ -1,7 +1,7 @@
diff -rupNw source-original/config.sub source/config.sub
--- source-original/config.sub 2012-01-19 07:30:05.000000000 +0100
+++ source/config.sub 2018-05-01 17:31:52.766229515 +0200
@@ -1276,7 +1276,7 @@ case $os in
diff -ruw source/config.sub source-new/config.sub
--- source/config.sub 2012-01-14 21:44:08.000000000 -0700
+++ source-new/config.sub 2018-12-10 12:17:28.136784814 -0700
@@ -1276,7 +1276,7 @@
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
@ -9,4 +9,53 @@ diff -rupNw source-original/config.sub source/config.sub
+ | -kopensolaris* | -redox* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
Only in source-new: config.sub.orig
diff -ruw source/configure.in source-new/configure.in
--- source/configure.in 2012-01-14 21:44:08.000000000 -0700
+++ source-new/configure.in 2018-12-10 12:17:12.724883206 -0700
@@ -91,38 +91,13 @@
AM_CONDITIONAL(USE_VERSION_RC, test x$use_version_rc = xtrue)
dnl Check for the FreeType 2 library
-dnl
-dnl Get the cflags and libraries from the freetype-config script
-dnl
-AC_ARG_WITH(freetype-prefix,[ --with-freetype-prefix=PFX Prefix where FREETYPE is
-installed (optional)],
- freetype_prefix="$withval", freetype_prefix="")
-AC_ARG_WITH(freetype-exec-prefix,[ --with-freetype-exec-prefix=PFX Exec prefix
-where FREETYPE is installed (optional)],
- freetype_exec_prefix="$withval", freetype_exec_prefix="")
-
-if test x$freetype_exec_prefix != x ; then
- freetype_args="$freetype_args --exec-prefix=$freetype_exec_prefix"
- if test x${FREETYPE_CONFIG+set} != xset ; then
- FREETYPE_CONFIG=$freetype_exec_prefix/bin/freetype-config
- fi
-fi
-if test x$freetype_prefix != x ; then
- freetype_args="$freetype_args --prefix=$freetype_prefix"
- if test x${FREETYPE_CONFIG+set} != xset ; then
- FREETYPE_CONFIG=$freetype_prefix/bin/freetype-config
- fi
-fi
-AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
-no_freetype=""
-if test "$FREETYPE_CONFIG" = "no" ; then
- AC_MSG_ERROR([
-*** Unable to find FreeType2 library (http://www.freetype.org/)
+PKG_CHECK_MODULES([FT2], [freetype2 >= 7.0.1], [], [dnl
+ AC_CHECK_FT2(,,[AC_MSG_ERROR([dnl
+*** Unable to find FreeType2 library (http://www.freetype.org/)])]
+ )
])
-else
- CFLAGS="$CFLAGS `$FREETYPE_CONFIG $freetypeconf_args --cflags`"
- LIBS="$LIBS `$FREETYPE_CONFIG $freetypeconf_args --libs`"
-fi
+CFLAGS="$CFLAGS $FT2_CFLAGS"
+LIBS="$LIBS $FT2_LIBS"
dnl Check for SDL
SDL_VERSION=1.2.4

View File

@ -2,9 +2,6 @@ VERSION=2.0.11
TAR=https://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-$VERSION.tar.gz
BUILD_DEPENDS=(sdl liborbital freetype libpng zlib)
export CFLAGS="-I$PWD/sysroot/include/ -I$PWD/sysroot/include/freetype2/"
export LDFLAGS="-L$PWD/sysroot/lib/"
function recipe_version {
echo "$VERSION"
skip=1
@ -16,10 +13,9 @@ function recipe_update {
}
function recipe_build {
sysroot="${PWD}/../sysroot"
export SDL_CONFIG="$sysroot/bin/sdl-config"
export FREETYPE_CONFIG="$sysroot/bin/freetype-config"
sysroot="$(realpath ../sysroot)"
export CFLAGS="-I$sysroot/include"
export LDFLAGS="-L$sysroot/lib"
./autogen.sh
./configure --prefix=/ --host=${HOST} --disable-shared --disable-sdltest
make -j"$(nproc)"
@ -38,10 +34,7 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
sysroot="$(realpath ../sysroot)"
make DESTDIR="$dest" install
sed -i -e "s%//lib/libfreetype.la%$sysroot/lib/libfreetype.la%" "$dest/lib/"*.la
sed -i -e "s%//lib/libpng16.la%$sysroot/lib/libpng16.la%" "$dest/lib/"*.la
sed -i -e "s%//lib/libSDL.la%$sysroot/lib/libSDL.la%" "$dest/lib/"*.la
rm -f "$dest/lib/"*.la
skip=1
}

View File

@ -14,9 +14,10 @@ function recipe_update {
function recipe_build {
wget -O autotools/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
export CFLAGS="-I$sysroot/include -I$sysroot/include/SDL"
export LDFLAGS="-L$sysroot/lib"
export LIBS="-lSDL -lorbital" # TODO: Uses sdl-config instead of pkg-config
./configure --host=${HOST} --prefix='' --with-sdl-prefix="$sysroot"
make -j"$(nproc)"
skip=1

View File

@ -14,7 +14,7 @@ function recipe_update {
function newlib_build {
rm -rf ../newlib
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
cd ..
git clone --recursive https://github.com/sajattack/newlib -b ssh-deps
cd newlib
@ -42,7 +42,7 @@ function newlib_build {
function recipe_build {
newlib_build
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
export LDFLAGS="-L$sysroot/lib"
export CPPFLAGS="-I$sysroot/include"
./configure --host=${HOST} --prefix=/

View File

@ -13,11 +13,10 @@ function recipe_update {
}
function recipe_build {
sysroot="${PWD}/../sysroot"
export SDL_CONFIG="$sysroot/bin/sdl-config"
export CPPFLAGS="-I$sysroot/include -I$sysroot/include/SDL"
sysroot="$(realpath ../sysroot)"
export SDL_CONFIG="${PKG_CONFIG} sdl"
export CPPFLAGS="-I$sysroot/include"
export LDFLAGS="-L$sysroot/lib"
make -j"$(nproc)"
skip=1
}

View File

@ -14,7 +14,7 @@ function recipe_update {
}
function recipe_build {
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
export LDFLAGS="-L$sysroot/lib"
export CPPFLAGS="-I$sysroot/include"
export vim_cv_toupper_broken=set

View File

@ -30,6 +30,5 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
make DESTDIR="$dest" install
rm -rf "$1"/share
skip=1
}