mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
Add recipe for MultiTalk.
This commit is contained in:
65
app-office/multitalk/multitalk-1.4.recipe
Normal file
65
app-office/multitalk/multitalk-1.4.recipe
Normal file
@@ -0,0 +1,65 @@
|
||||
SUMMARY="A nonlinear presentation software."
|
||||
DESCRIPTION="MultiTalk is an SDL based presentation program with slides laid \
|
||||
on a grid instead of linearly. Slides can have any size (bigger or smaller \
|
||||
than the screen, and you can move in both directions between them. Hyperlinks \
|
||||
are also possible."
|
||||
LICENSE="GNU GPL v2"
|
||||
COPYRIGHT="
|
||||
2006-2008 David Ingram
|
||||
2010 Johannes Buchner
|
||||
"
|
||||
HOMEPAGE="https://github.com/JohannesBuchner/multitalk"
|
||||
REVISION="1"
|
||||
ARCHITECTURES="x86_gcc2"
|
||||
|
||||
SRC_URI="https://github.com/JohannesBuchner/multitalk/archive/master.zip"
|
||||
CHECKSUM_SHA256="e7b582f5c97905492a6a6554c6087d9d00879b22a42afbe97445a2b3f8ce60e1"
|
||||
SOURCE_DIR="multitalk-master"
|
||||
PATCHES="multitalk-$portVersion.patchset"
|
||||
|
||||
PROVIDES="
|
||||
multitalk = $portVersion
|
||||
cmd:multitalk
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku >= $haikuVersion
|
||||
sdl_gfx
|
||||
sdl_image
|
||||
sdl_ttf
|
||||
libsdl
|
||||
lib:libstdc++
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
devel:sdl_gfx
|
||||
devel:sdl_image
|
||||
devel:sdl_ttf
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
haiku_devel >= $haikuVersion
|
||||
cmd:g++
|
||||
cmd:make
|
||||
cmd:sdl_config
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
make CCFLAGS="-O3 -lbe" $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $binDir
|
||||
cp multitalk $binDir
|
||||
mkdir -p $dataDir/multitalk/fonts
|
||||
mkdir -p $dataDir/multitalk/styles
|
||||
mkdir -p $dataDir/multitalk/gfx
|
||||
cp -a fonts/* $dataDir/multitalk/fonts
|
||||
cp -a gfx/* $dataDir/multitalk/gfx
|
||||
cp -d styles/*.style $dataDir/multitalk/styles
|
||||
|
||||
mkdir -p $docDir
|
||||
cp docs/multitalk.pdf $docDir
|
||||
}
|
||||
118
app-office/multitalk/patches/multitalk-1.4.patchset
Normal file
118
app-office/multitalk/patches/multitalk-1.4.patchset
Normal file
@@ -0,0 +1,118 @@
|
||||
From 15fe9df35deee50d5ba82453978d850218588955 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Fri, 29 Aug 2014 14:04:57 +0200
|
||||
Subject: Fix build on Haiku.
|
||||
|
||||
* Missing includes
|
||||
* No support for procfs
|
||||
|
||||
diff --git a/latex.cpp b/latex.cpp
|
||||
index f7179a4..2e42a13 100644
|
||||
--- a/latex.cpp
|
||||
+++ b/latex.cpp
|
||||
@@ -12,6 +12,7 @@ published by the Free Software Foundation. */
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
+#include <sys/wait.h>
|
||||
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL/SDL_image.h>
|
||||
diff --git a/multitalk.cpp b/multitalk.cpp
|
||||
index 32ea719..e4dd805 100644
|
||||
--- a/multitalk.cpp
|
||||
+++ b/multitalk.cpp
|
||||
@@ -28,6 +28,10 @@ published by the Free Software Foundation. */
|
||||
#include "datatype.h"
|
||||
#include "multitalk.h"
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#include <OS.h>
|
||||
+#endif
|
||||
+
|
||||
slidevector *talk;
|
||||
slidevector *render_list;
|
||||
|
||||
@@ -523,6 +527,7 @@ void warp_down()
|
||||
warp_to_slide(nearest);
|
||||
}
|
||||
|
||||
+#ifdef __linux__
|
||||
int check_memory()
|
||||
{
|
||||
int pid, fd, bytes, spaces;
|
||||
@@ -573,9 +578,17 @@ int check_memory()
|
||||
printf("Maximum rss = %ld, others %ld, %ld, %ld.\n", bytes,
|
||||
bytes1, bytes2, bytes3);
|
||||
*/
|
||||
-
|
||||
+
|
||||
return mem;
|
||||
}
|
||||
+#elif defined __HAIKU__
|
||||
+int check_memory()
|
||||
+{
|
||||
+ system_info info;
|
||||
+ get_system_info(&info);
|
||||
+ return info.used_pages;
|
||||
+}
|
||||
+#endif
|
||||
|
||||
void copy_radar_to_screen()
|
||||
{
|
||||
diff --git a/web.cpp b/web.cpp
|
||||
index 6854162..360ffe0 100644
|
||||
--- a/web.cpp
|
||||
+++ b/web.cpp
|
||||
@@ -12,6 +12,7 @@ published by the Free Software Foundation. */
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
+#include <sys/wait.h>
|
||||
|
||||
#include <SDL/SDL_image.h>
|
||||
#include <SDL/SDL_ttf.h>
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 5b718cebf525a4e0757e84e700c3feb18bb1a5f7 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Fri, 29 Aug 2014 14:11:43 +0200
|
||||
Subject: Use PathFinder to find resources.
|
||||
|
||||
|
||||
diff --git a/files.cpp b/files.cpp
|
||||
index 0286df6..b93ecc8 100644
|
||||
--- a/files.cpp
|
||||
+++ b/files.cpp
|
||||
@@ -28,6 +28,11 @@ published by the Free Software Foundation. */
|
||||
#include "datatype.h"
|
||||
#include "multitalk.h"
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#include <PathFinder.h>
|
||||
+#include <Path.h>
|
||||
+#endif
|
||||
+
|
||||
extern Config *config;
|
||||
|
||||
// Prototypes:
|
||||
@@ -260,7 +265,14 @@ int absolute_path(char *s)
|
||||
Config *init_paths(const char *talk_ref)
|
||||
{
|
||||
Config *config = new Config();
|
||||
+#ifdef __HAIKU__
|
||||
+ BPathFinder finder;
|
||||
+ BPath path;
|
||||
+ finder.FindPath(B_FIND_PATH_DATA_DIRECTORY, NULL, path);
|
||||
+ const char* sys_prefix = path.Path();
|
||||
+#else
|
||||
const char *sys_prefix = "/usr/local/share";
|
||||
+#endif
|
||||
|
||||
config->talk_path = replace_extension(talk_ref, "talk");
|
||||
config->graph_path = replace_extension(talk_ref, "graph");
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
Reference in New Issue
Block a user