mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
RetroShare: add recipe and patch for version 0.6.0
This commit is contained in:
293
net-p2p/retroshare/patches/retroshare_x86-0.6.0.patchset
Normal file
293
net-p2p/retroshare/patches/retroshare_x86-0.6.0.patchset
Normal file
@@ -0,0 +1,293 @@
|
||||
From b9111fc85b82eea35ce5af0160cc049ae4e23be0 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Tue, 20 Oct 2015 13:37:35 +0300
|
||||
Subject: Add Haiku support
|
||||
|
||||
|
||||
diff --git a/libbitdht/src/libbitdht.pro b/libbitdht/src/libbitdht.pro
|
||||
index 6f705fa..6c66841 100644
|
||||
--- a/libbitdht/src/libbitdht.pro
|
||||
+++ b/libbitdht/src/libbitdht.pro
|
||||
@@ -99,6 +99,12 @@ openbsd-* {
|
||||
DESTDIR = lib
|
||||
}
|
||||
|
||||
+################################# Haiku ##########################################
|
||||
+
|
||||
+haiku-* {
|
||||
+ DESTDIR = lib
|
||||
+}
|
||||
+
|
||||
################################### COMMON stuff ##################################
|
||||
################################### COMMON stuff ##################################
|
||||
|
||||
diff --git a/libbitdht/src/udp/udplayer.cc b/libbitdht/src/udp/udplayer.cc
|
||||
index ddf0258..4a37abf 100644
|
||||
--- a/libbitdht/src/udp/udplayer.cc
|
||||
+++ b/libbitdht/src/udp/udplayer.cc
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
+#include <sys/select.h>
|
||||
|
||||
/***
|
||||
* #define UDP_ENABLE_BROADCAST 1
|
||||
diff --git a/libbitdht/src/util/bdrandom.cc b/libbitdht/src/util/bdrandom.cc
|
||||
index 3d2bc6a..6288f86 100644
|
||||
--- a/libbitdht/src/util/bdrandom.cc
|
||||
+++ b/libbitdht/src/util/bdrandom.cc
|
||||
@@ -13,7 +13,7 @@ static bool auto_seed = bdRandom::seed( (time(NULL) + ((uint32_t) pthread_self()
|
||||
#else
|
||||
#ifdef __APPLE__
|
||||
static bool auto_seed = bdRandom::seed( (time(NULL) + pthread_mach_thread_np(pthread_self())*0x1293fe + (getpid()^0x113ef76b))^0x18e34a12 ) ;
|
||||
- #elif defined(__FreeBSD__)
|
||||
+ #elif defined(__FreeBSD__) || (__HAIKU__)
|
||||
// since this is completely insecure anyway, just kludge for now
|
||||
static bool auto_seed = bdRandom::seed(time(NULL));
|
||||
#elif defined(__OpenBSD__)
|
||||
diff --git a/libretroshare/src/libretroshare.pro b/libretroshare/src/libretroshare.pro
|
||||
index a103392..ee17470 100644
|
||||
--- a/libretroshare/src/libretroshare.pro
|
||||
+++ b/libretroshare/src/libretroshare.pro
|
||||
@@ -300,6 +300,19 @@ freebsd-* {
|
||||
DESTDIR = lib
|
||||
}
|
||||
|
||||
+################################# Haiku ##########################################
|
||||
+
|
||||
+haiku-* {
|
||||
+
|
||||
+ QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dstat64=stat -Dstatvfs64=statvfs -Dfopen64=fopen
|
||||
+ OPENPGPSDK_DIR = ../../openpgpsdk/src
|
||||
+ INCLUDEPATH *= $${OPENPGPSDK_DIR} ../openpgpsdk
|
||||
+ DEFINES *= NO_SQLCIPHER
|
||||
+ CONFIG += release
|
||||
+ CONFIG += upnp_libupnp
|
||||
+ DESTDIR = lib
|
||||
+}
|
||||
+
|
||||
################################# OpenBSD ##########################################
|
||||
|
||||
openbsd-* {
|
||||
diff --git a/libretroshare/src/pqi/pqinetwork.cc b/libretroshare/src/pqi/pqinetwork.cc
|
||||
index 00e24c6..1762f09 100644
|
||||
--- a/libretroshare/src/pqi/pqinetwork.cc
|
||||
+++ b/libretroshare/src/pqi/pqinetwork.cc
|
||||
@@ -55,6 +55,10 @@ int errno;
|
||||
|
||||
#endif
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+# define IFF_RUNNING 0x0001
|
||||
+#endif
|
||||
+
|
||||
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
#ifndef WINDOWS_SYS
|
||||
|
||||
@@ -146,6 +150,7 @@ std::string socket_errorType(int err)
|
||||
|
||||
#include <net/if.h>
|
||||
#include <sys/ioctl.h>
|
||||
+#include <sys/sockio.h>
|
||||
|
||||
bool getLocalInterfaces_ipv4(struct in_addr &/*routeAddr*/, std::list<struct in_addr> &addrs)
|
||||
{
|
||||
diff --git a/libretroshare/src/pqi/pqinetwork.h b/libretroshare/src/pqi/pqinetwork.h
|
||||
index f8118f7..9d8b02e 100644
|
||||
--- a/libretroshare/src/pqi/pqinetwork.h
|
||||
+++ b/libretroshare/src/pqi/pqinetwork.h
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <sys/poll.h>
|
||||
+#include <errno.h>
|
||||
|
||||
//socket blocking/options.
|
||||
#include <fcntl.h>
|
||||
diff --git a/libretroshare/src/rsserver/rsinit.cc b/libretroshare/src/rsserver/rsinit.cc
|
||||
index 7357326..ee9cdd2 100644
|
||||
--- a/libretroshare/src/rsserver/rsinit.cc
|
||||
+++ b/libretroshare/src/rsserver/rsinit.cc
|
||||
@@ -1251,7 +1251,11 @@ int RsServer::StartupRetroShare()
|
||||
std::vector<std::string> plugins_directories ;
|
||||
|
||||
#ifndef WINDOWS_SYS
|
||||
- plugins_directories.push_back(std::string("/usr/lib/retroshare/extensions6/")) ;
|
||||
+#ifdef __HAIKU__
|
||||
+ plugins_directories.push_back(std::string("./plugins")) ;
|
||||
+#else
|
||||
+ plugins_directories.push_back(std::string("/usr/lib/retroshare/extensions6/")) ;
|
||||
+#endif
|
||||
#endif
|
||||
std::string extensions_dir = rsAccounts->PathBaseDirectory() + "/extensions6/" ;
|
||||
plugins_directories.push_back(extensions_dir) ;
|
||||
diff --git a/libretroshare/src/rsserver/rsloginhandler.cc b/libretroshare/src/rsserver/rsloginhandler.cc
|
||||
index b8b9a66..e5a7783 100644
|
||||
--- a/libretroshare/src/rsserver/rsloginhandler.cc
|
||||
+++ b/libretroshare/src/rsserver/rsloginhandler.cc
|
||||
@@ -118,6 +118,7 @@ bool RsLoginHandler::tryAutoLogin(const RsPeerId& ssl_id,std::string& ssl_passwd
|
||||
std::cerr << "RsTryAutoLogin()" << std::endl;
|
||||
|
||||
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
+#ifndef __HAIKU__
|
||||
#ifndef WINDOWS_SYS /* UNIX */
|
||||
#if defined(UBUNTU) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
|
||||
@@ -349,6 +350,7 @@ bool RsLoginHandler::tryAutoLogin(const RsPeerId& ssl_id,std::string& ssl_passwd
|
||||
|
||||
return isDecrypt;
|
||||
#endif
|
||||
+#endif
|
||||
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
|
||||
return false;
|
||||
@@ -360,6 +362,7 @@ bool RsLoginHandler::enableAutoLogin(const RsPeerId& ssl_id,const std::string& s
|
||||
std::cerr << "RsStoreAutoLogin()" << std::endl;
|
||||
|
||||
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
+#ifndef __HAIKU__
|
||||
#ifndef WINDOWS_SYS /* UNIX */
|
||||
#if defined(UBUNTU) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
if(GNOME_KEYRING_RESULT_OK == gnome_keyring_store_password_sync(&my_schema, NULL, (gchar*)("RetroShare password for SSL Id "+ssl_id.toStdString()).c_str(),(gchar*)ssl_passwd.c_str(),"RetroShare SSL Id",ssl_id.toStdString().c_str(),NULL))
|
||||
@@ -517,6 +520,7 @@ bool RsLoginHandler::enableAutoLogin(const RsPeerId& ssl_id,const std::string& s
|
||||
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
|
||||
return false;
|
||||
+#endif
|
||||
}
|
||||
|
||||
bool RsLoginHandler::clearAutoLogin(const RsPeerId& ssl_id)
|
||||
diff --git a/libretroshare/src/tcponudp/tou.cc b/libretroshare/src/tcponudp/tou.cc
|
||||
index 019eb72..e6fb7f4 100644
|
||||
--- a/libretroshare/src/tcponudp/tou.cc
|
||||
+++ b/libretroshare/src/tcponudp/tou.cc
|
||||
@@ -35,6 +35,7 @@ static const int kInitStreamTable = 5;
|
||||
#include <time.h>
|
||||
|
||||
#include "udp/udpstack.h"
|
||||
+#include "pqi/pqinetwork.h"
|
||||
#include "tcpstream.h"
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
@@ -42,6 +43,7 @@ static const int kInitStreamTable = 5;
|
||||
#include <errno.h>
|
||||
|
||||
#define DEBUG_TOU_INTERFACE 1
|
||||
+#define EUSERS 87
|
||||
|
||||
struct TcpOnUdp_t
|
||||
{
|
||||
diff --git a/libretroshare/src/util/rsdir.cc b/libretroshare/src/util/rsdir.cc
|
||||
index 4e7ccae..b396b16 100644
|
||||
--- a/libretroshare/src/util/rsdir.cc
|
||||
+++ b/libretroshare/src/util/rsdir.cc
|
||||
@@ -27,7 +27,7 @@
|
||||
// Includes for directory creation.
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
-#include <sys/fcntl.h>
|
||||
+#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "util/rsdir.h"
|
||||
diff --git a/plugins/FeedReader/FeedReader.pro b/plugins/FeedReader/FeedReader.pro
|
||||
index 67a00e9..968b944 100644
|
||||
--- a/plugins/FeedReader/FeedReader.pro
|
||||
+++ b/plugins/FeedReader/FeedReader.pro
|
||||
@@ -103,3 +103,10 @@ openbsd-* {
|
||||
LIBS += -lcurl -lxml2 -lxslt
|
||||
}
|
||||
|
||||
+haiku-* {
|
||||
+ LIBXML2_DIR = /system/develop/headers/x86/libxml2
|
||||
+
|
||||
+ INCLUDEPATH += $${LIBXML2_DIR}
|
||||
+
|
||||
+ LIBS += -lcurl -lxml2 -lxslt
|
||||
+}
|
||||
diff --git a/retroshare-gui/src/retroshare-gui.pro b/retroshare-gui/src/retroshare-gui.pro
|
||||
index 2eece55..3006cde 100644
|
||||
--- a/retroshare-gui/src/retroshare-gui.pro
|
||||
+++ b/retroshare-gui/src/retroshare-gui.pro
|
||||
@@ -263,6 +263,24 @@ freebsd-* {
|
||||
LIBS += -lsqlite3
|
||||
}
|
||||
|
||||
+##################################### Haiku ######################################
|
||||
+
|
||||
+haiku-* {
|
||||
+ PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
|
||||
+ PRE_TARGETDEPS *= ../../openpgpsdk/src/lib/libops.a
|
||||
+
|
||||
+ LIBS *= ../../libretroshare/src/lib/libretroshare.a
|
||||
+ LIBS *= ../../openpgpsdk/src/lib/libops.a -lbz2 -lbsd
|
||||
+ LIBS *= -lssl -lcrypto -lnetwork
|
||||
+ LIBS *= -lgpgme
|
||||
+ LIBS *= -lupnp
|
||||
+ LIBS *= -lz
|
||||
+ LIBS *= -lixml
|
||||
+
|
||||
+ LIBS += ../../supportlibs/pegmarkdown/libpegmarkdown.a
|
||||
+ LIBS += -lsqlite3
|
||||
+}
|
||||
+
|
||||
##################################### OpenBSD ######################################
|
||||
|
||||
openbsd-* {
|
||||
diff --git a/retroshare-gui/src/util/global.h b/retroshare-gui/src/util/global.h
|
||||
index 8ff3671..891ff8b 100644
|
||||
--- a/retroshare-gui/src/util/global.h
|
||||
+++ b/retroshare-gui/src/util/global.h
|
||||
@@ -85,6 +85,8 @@
|
||||
#define OS_OPENBSD
|
||||
#elif defined(__GNU_HURD__)
|
||||
#define OS_HURD
|
||||
+#elif defined(__HAIKU__)
|
||||
+ #define OS_HAIKU
|
||||
#elif defined(WIN32_PLATFORM_PSPC)
|
||||
#define OS_WINCE_POCKETPC
|
||||
#elif defined(WIN32_PLATFORM_WFSP)
|
||||
@@ -101,7 +103,7 @@
|
||||
#define OS_BSD
|
||||
#endif
|
||||
|
||||
-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_HURD) || defined(OS_BSD)
|
||||
+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_HURD) || defined(OS_BSD) || defined(OS_HAIKU)
|
||||
#define OS_POSIX
|
||||
#endif
|
||||
|
||||
diff --git a/retroshare-nogui/src/retroshare-nogui.pro b/retroshare-nogui/src/retroshare-nogui.pro
|
||||
index 5bdc218..72f3a50 100644
|
||||
--- a/retroshare-nogui/src/retroshare-nogui.pro
|
||||
+++ b/retroshare-nogui/src/retroshare-nogui.pro
|
||||
@@ -177,6 +177,26 @@ openbsd-* {
|
||||
LIBS *= -rdynamic
|
||||
}
|
||||
|
||||
+##################################### Haiku ######################################
|
||||
+
|
||||
+haiku-* {
|
||||
+ QMAKE_CXXFLAGS *= -D_BSD_SOURCE
|
||||
+
|
||||
+ PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
|
||||
+ PRE_TARGETDEPS *= ../../openpgpsdk/src/lib/libops.a
|
||||
+
|
||||
+ LIBS *= ../../libretroshare/src/lib/libretroshare.a
|
||||
+ LIBS *= ../../openpgpsdk/src/lib/libops.a -lbz2 -lbsd
|
||||
+ LIBS *= -lssl -lcrypto -lnetwork
|
||||
+ LIBS *= -lgpgme
|
||||
+ LIBS *= -lupnp
|
||||
+ LIBS *= -lz
|
||||
+ LIBS *= -lixml
|
||||
+
|
||||
+ LIBS += ../../supportlibs/pegmarkdown/libpegmarkdown.a
|
||||
+ LIBS += -lsqlite3
|
||||
+
|
||||
+}
|
||||
|
||||
############################## Common stuff ######################################
|
||||
|
||||
--
|
||||
2.2.2
|
||||
|
||||
106
net-p2p/retroshare/retroshare-0.6.0.recipe
Normal file
106
net-p2p/retroshare/retroshare-0.6.0.recipe
Normal file
@@ -0,0 +1,106 @@
|
||||
SUMMARY="An open source application that offers secure chat and file sharing"
|
||||
DESCRIPTION="Retroshare creates encrypted connections to your friends. Nobody \
|
||||
can spy on you. Retroshare is completely decentralized. This means there are \
|
||||
no central servers. It is entirely Open-Source and free. There are no costs, \
|
||||
no ads and no Terms of Service."
|
||||
HOMEPAGE="http://retroshare.sourceforge.net/"
|
||||
COPYRIGHT="2006-2015, drbob"
|
||||
LICENSE="
|
||||
GNU GPL v2
|
||||
GNU LGPL v2.1
|
||||
"
|
||||
SOURCE_URI="https://github.com/RetroShare/RetroShare/archive/v0.6.0-RC2-SVN.zip"
|
||||
SOURCE_DIR="RetroShare-0.6.0-RC2-SVN"
|
||||
CHECKSUM_SHA256="a5c75a274cd2f2028a2f96d3b0188fd9297505d4b47fb5e338bd6bada618baab"
|
||||
REVISION="1"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86 !x86_gcc2"
|
||||
|
||||
PROVIDES="
|
||||
retroshare$secondaryArchSuffix = $portVersion
|
||||
app:RetroShare = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
qt5base${secondaryArchSuffix}
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libgl$secondaryArchSuffix
|
||||
lib:libgpgme$secondaryArchSuffix
|
||||
lib:libmicrohttpd$secondaryArchSuffix
|
||||
# lib:linopencv$secondaryArchSuffix
|
||||
# lib:libspeex$secondaryArchSuffix
|
||||
# lib:libsqlcipher$secondaryArchSuffix
|
||||
lib:libsqlite3$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
lib:libupnp$secondaryArchSuffix
|
||||
lib:libxml2$secondaryArchSuffix
|
||||
lib:libxslt$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
qt5base${secondaryArchSuffix}
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libcrypto$secondaryArchSuffix
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libgl$secondaryArchSuffix
|
||||
devel:libgpgme$secondaryArchSuffix
|
||||
devel:libmicrohttpd$secondaryArchSuffix
|
||||
# devel:linopencv$secondaryArchSuffix
|
||||
# devel:libspeex$secondaryArchSuffix
|
||||
# devel:libsqlcipher$secondaryArchSuffix
|
||||
devel:libsqlite3$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix
|
||||
devel:libupnp$secondaryArchSuffix
|
||||
devel:libxml2$secondaryArchSuffix
|
||||
devel:libxslt$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:awk
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
PATCHES="retroshare_x86-0.6.0.patchset"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
# disable VOIP plugin for now since we don't have opencv package yet
|
||||
sed -i 's/VOIP/#VOIP/g' plugins/plugins.pro
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
# TODO: change path: /boot/home/.retroshare
|
||||
# TODO: for extra security use libsqlcipher instead of libsqlite3
|
||||
# FIXME: plugins don't seem to be looked up correctly
|
||||
|
||||
pushd supportlibs/pegmarkdown
|
||||
qmake
|
||||
make $jobArg
|
||||
popd
|
||||
|
||||
qmake CONFIG=release CONFIG+=NO_SQLCIPHER
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir/RetroShare/plugins
|
||||
cp retroshare-gui/src/RetroShare $appsDir/RetroShare
|
||||
cp -r plugins/FeedReader/*.so* $appsDir/RetroShare/plugins
|
||||
# cp -r plugins/VOIP $appsDir/RetroShare/plugins
|
||||
strip -s $appsDir/RetroShare/RetroShare
|
||||
|
||||
# TODO: add resource file with icon
|
||||
# addResourcesToBinaries $portDir/additional-files/retroshare.rdef $appsDir/RetroShare/RetroShare
|
||||
addAppDeskbarSymlink $appsDir/RetroShare/RetroShare
|
||||
}
|
||||
Reference in New Issue
Block a user