mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-20 20:04:19 +08:00
Add freeciv (WIP), fixes for sdl libtool files
This commit is contained in:
parent
af13aa8509
commit
ce09215a76
18
recipes/freeciv/01_redox.patch
Normal file
18
recipes/freeciv/01_redox.patch
Normal file
@ -0,0 +1,18 @@
|
||||
diff -ruw source/client/servers.c source-new/client/servers.c
|
||||
--- source/client/servers.c 2018-07-21 15:42:11.000000000 -0600
|
||||
+++ source-new/client/servers.c 2018-12-10 09:31:49.817815930 -0700
|
||||
@@ -80,6 +80,14 @@
|
||||
|
||||
#include "gui_main_g.h"
|
||||
|
||||
+// Redox patches
|
||||
+#define IP_ADD_MEMBERSHIP 35
|
||||
+#define IP_MULTICAST_TTL 33
|
||||
+struct ip_mreq {
|
||||
+ struct in_addr imr_multiaddr; /* IP multicast address of group */
|
||||
+ struct in_addr imr_interface; /* local IP address of interface */
|
||||
+};
|
||||
+
|
||||
struct server_scan {
|
||||
enum server_scan_type type;
|
||||
ServerScanErrorFunc error_func;
|
||||
48
recipes/freeciv/recipe.sh
Normal file
48
recipes/freeciv/recipe.sh
Normal file
@ -0,0 +1,48 @@
|
||||
VERSION=2.6.0
|
||||
TAR=http://files.freeciv.org/stable/freeciv-$VERSION.tar.bz2
|
||||
BUILD_DEPENDS=(curl freetype libiconv liborbital libpng sdl sdl_gfx sdl_image sdl_mixer sdl_ttf zlib)
|
||||
|
||||
function recipe_version {
|
||||
echo "$VERSION"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_update {
|
||||
echo "skipping update"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
wget -O bootstrap/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
|
||||
sysroot="$(realpath ../sysroot)"
|
||||
export CFLAGS="-I$sysroot/include"
|
||||
export LDFLAGS="-L$sysroot/lib"
|
||||
export LIBS="-lpthread"
|
||||
./configure \
|
||||
--host="$HOST" \
|
||||
--prefix='' \
|
||||
--disable-server \
|
||||
--enable-client=sdl \
|
||||
--enable-fcmp=cli \
|
||||
--with-sdl-prefix="$sysroot" \
|
||||
ac_cv_lib_SDL_image_IMG_Load=yes \
|
||||
ac_cv_lib_SDL_ttf_TTF_OpenFont=yes
|
||||
make -j"$(nproc)" V=1
|
||||
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
|
||||
}
|
||||
@ -34,6 +34,8 @@ 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
|
||||
skip=1
|
||||
}
|
||||
|
||||
@ -34,6 +34,10 @@ 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
|
||||
skip=1
|
||||
}
|
||||
|
||||
@ -34,6 +34,8 @@ 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
|
||||
skip=1
|
||||
}
|
||||
|
||||
@ -38,6 +38,10 @@ 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
|
||||
skip=1
|
||||
}
|
||||
|
||||
@ -17,9 +17,8 @@ function recipe_build {
|
||||
sysroot="${PWD}/../sysroot"
|
||||
export CFLAGS="-I$sysroot/include -I$sysroot/include/SDL"
|
||||
export LDFLAGS="-L$sysroot/lib"
|
||||
|
||||
./configure --host=${HOST} --prefix='' --with-sdl-prefix="$sysroot"
|
||||
make
|
||||
make -j"$(nproc)"
|
||||
skip=1
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user