mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
t4k_common: new recipe (#1251)
This commit is contained in:
committed by
Jérôme Duval
parent
43856c218f
commit
87301ce481
87
dev-games/t4k_common/patches/t4k_common-0.1.1.patchset
Normal file
87
dev-games/t4k_common/patches/t4k_common-0.1.1.patchset
Normal file
@@ -0,0 +1,87 @@
|
||||
From e7a9a104aba2c0f3d5558021b54298cce3488467 Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Sat, 25 Mar 2017 09:50:43 +0000
|
||||
Subject: gcc2 patch
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 7b54dfb..a7c20c2 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -10,7 +10,7 @@ AC_CANONICAL_HOST
|
||||
AC_CANONICAL_BUILD
|
||||
AC_CANONICAL_TARGET
|
||||
|
||||
-AM_INIT_AUTOMAKE(foreign)
|
||||
+AM_INIT_AUTOMAKE([subdir-objects] [foreign])
|
||||
AC_CONFIG_SRCDIR([config.h.in])
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
|
||||
diff --git a/src/t4k_main.c b/src/t4k_main.c
|
||||
index 95d3ec2..97dd368 100644
|
||||
--- a/src/t4k_main.c
|
||||
+++ b/src/t4k_main.c
|
||||
@@ -59,7 +59,8 @@ int T4K_HandleStdEvents (const SDL_Event* event)
|
||||
if (event->type != SDL_KEYDOWN)
|
||||
return 0;
|
||||
|
||||
- SDLKey key = event->key.keysym.sym;
|
||||
+ {
|
||||
+ SDLKey key = event->key.keysym.sym;
|
||||
|
||||
/* Toggle screen mode: */
|
||||
if (key == SDLK_F10)
|
||||
@@ -79,4 +80,5 @@ int T4K_HandleStdEvents (const SDL_Event* event)
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/t4k_menu.c b/src/t4k_menu.c
|
||||
index b1ed842..6b1ab42 100644
|
||||
--- a/src/t4k_menu.c
|
||||
+++ b/src/t4k_menu.c
|
||||
@@ -828,7 +828,8 @@ int T4K_RunMenu(int index, bool return_choice, void (*draw_background)(), int (*
|
||||
|
||||
first_loop = 0;
|
||||
|
||||
- int key = event.key.keysym.sym;
|
||||
+ {
|
||||
+ int key = event.key.keysym.sym;
|
||||
|
||||
if (key == SDLK_F10) {
|
||||
T4K_PrerenderAll(); // Important when the screen is being RESIZED
|
||||
@@ -887,6 +888,7 @@ int T4K_RunMenu(int index, bool return_choice, void (*draw_background)(), int (*
|
||||
|
||||
}
|
||||
old_loc = loc;
|
||||
+ }
|
||||
}
|
||||
|
||||
/* handle special action that was caused by an event */
|
||||
--
|
||||
2.7.0
|
||||
|
||||
|
||||
From f08c8e2305921766fee2e44ee528fa99afd94b40 Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Sun, 26 Mar 2017 15:24:57 +0000
|
||||
Subject: fix missing const define for ICONV_CONST
|
||||
|
||||
|
||||
diff --git a/src/linebreak/linebreak.c b/src/linebreak/linebreak.c
|
||||
index f9c88a1..e050d3d 100644
|
||||
--- a/src/linebreak/linebreak.c
|
||||
+++ b/src/linebreak/linebreak.c
|
||||
@@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
* to allow compilation under mingw-cross-env:
|
||||
*/
|
||||
|
||||
-#if defined BUILD_MINGW32 && !defined ICONV_CONST
|
||||
+#if (defined(MINGW32) || defined(__HAIKU__)) && !defined ICONV_CONST
|
||||
#define ICONV_CONST const
|
||||
#endif
|
||||
|
||||
--
|
||||
2.7.0
|
||||
|
||||
97
dev-games/t4k_common/t4k_common-0.1.1.recipe
Normal file
97
dev-games/t4k_common/t4k_common-0.1.1.recipe
Normal file
@@ -0,0 +1,97 @@
|
||||
SUMMARY="The common library for tuxmath and tuxtype"
|
||||
DESCRIPTION="t4k_common, a library of code shared between tuxmath and tuxtype"
|
||||
HOMEPAGE="http://tux4kids.alioth.debian.org/"
|
||||
COPYRIGHT="2007 Free Software Foundation, Inc."
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://downloads.sourceforge.net/project/tuxmath/t4k_common/t4k_common-0.1.1.tar.gz"
|
||||
CHECKSUM_SHA256="42c155816dae2c5dad560faa50edaa1ca84536530283d37859c4b91e82675110"
|
||||
PATCHES="t4k_common-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
t4k_common$secondaryArchSuffix = $portVersion
|
||||
lib:libt4k_common$secondaryArchSuffix = 0.0.0 compat >= 0
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libgl$secondaryArchSuffix
|
||||
lib:libglu$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libsdl$secondaryArchSuffix
|
||||
lib:libsdl_image$secondaryArchSuffix
|
||||
lib:libsdl_mixer$secondaryArchSuffix
|
||||
lib:libsdl_net_1.2$secondaryArchSuffix
|
||||
lib:libsdl_pango$secondaryArchSuffix
|
||||
lib:libsdl_ttf$secondaryArchSuffix
|
||||
lib:libxml2$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
PROVIDES_devel="
|
||||
t4k_common${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libt4k_common$secondaryArchSuffix = 0.0.0 compat >= 0
|
||||
"
|
||||
REQUIRES_devel="
|
||||
t4k_common$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libgl$secondaryArchSuffix
|
||||
devel:libglu$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:libintl$secondaryArchSuffix
|
||||
devel:libpng$secondaryArchSuffix
|
||||
devel:libsdl$secondaryArchSuffix
|
||||
devel:libsdl_image$secondaryArchSuffix
|
||||
devel:libsdl_mixer$secondaryArchSuffix
|
||||
devel:libsdl_net$secondaryArchSuffix
|
||||
devel:libsdl_pango$secondaryArchSuffix
|
||||
devel:libsdl_ttf$secondaryArchSuffix
|
||||
devel:libxml2$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:autoconf
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
libtoolize -fci
|
||||
aclocal -I m4
|
||||
automake --add-missing --force-missing
|
||||
autoconf
|
||||
|
||||
runConfigure ./configure --without-rsvg \
|
||||
#--without-sdlpango #sdl_pango doesn't work on gcc2
|
||||
#build can be done by passing --without-sdl_pango
|
||||
#and without the lib and devel for sdl_pango
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
# remove libtool library files
|
||||
rm $libDir/*.la
|
||||
|
||||
prepareInstalledDevelLib \
|
||||
libt4k_common
|
||||
fixPkgconfig
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
}
|
||||
Reference in New Issue
Block a user