BeShare: bump version (#6015)

This commit is contained in:
Alexander G. M. Smith
2021-06-29 15:34:50 -04:00
committed by GitHub
parent 9f3322c1e1
commit 48616e9e80
4 changed files with 89 additions and 127 deletions

View File

@@ -0,0 +1,10 @@
#!/bin/bash
# Make the writeable BeShare files directory, which is now needed
# since the application folder is read only due to the packaging
# system. AGMS20150113
mkdir --parents "`finddir B_USER_DIRECTORY`/BeShare/downloads"
mkdir --parents "`finddir B_USER_DIRECTORY`/BeShare/logs"
mkdir --parents "`finddir B_USER_DIRECTORY`/BeShare/shared"
notify --type information --group "BeShare Installer" --title "BeShare Folders" --timeout 45 "Folders for your shared files, downloads and logs have been created in `finddir B_USER_DIRECTORY`/BeShare/ Change them to symbolic links if you want to move them elsewhere."
notify --type information --group "BeShare Installer" --title "BeShare Documentation" --timeout 30 "Extra documentation has been installed in a documentation/packages/BeShare folder somewhere. Just do a desktop search for BeShare."

View File

@@ -1,69 +0,0 @@
SUMMARY="A native file sharing and chat application"
DESCRIPTION="BeShare is a BeOS/Haiku-native file sharing program. \
It operates similarly to other such programs (Napster, Hotline, etc) \
but with a few advantages:
- BeShare allows you to upload or download any type of file, not just mp3.
- When browsing files, you can see their attributes (similar Tracker's \
view)
- Your query is always \"live\", so if new files that match your query become \
available, you will see them added to the results list right away (you won't \
have to click \"refresh\" or anything first)
- BeShare includes a rudimentary chat mechanism for you social types.
- BeShare supports any number of simultaneous uploads and downloads \
in parallel, but will serialize simultaneous file requests to any \
given host for efficiency."
HOMEPAGE="https://github.com/HaikuArchives/BeShare"
COPYRIGHT="1999-2012 Jeremy Friesner"
LICENSE="Public Domain
libsanta"
REVISION="3"
srcGitRev="58031882f15a724e8c946ed80bc0d10541b8f645"
SOURCE_URI="https://github.com/HaikuArchives/BeShare/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="7cc736acbdc6d6f9a0298323fc58d043ff0cf44a272912d332839060f905b040"
SOURCE_FILENAME="beshare-$srcGitRev.tar.gz"
SOURCE_DIR="BeShare-$srcGitRev"
SOURCE_URI_2="https://public.msli.com/lcs/muscle/muscle6.11.zip"
CHECKSUM_SHA256_2="7cf3c92095f46e5a0858852e7d387d11fdf8e1e95a4de26b5e68e8319a373340"
PATCHES_2="muscle-6.11.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
beshare$secondaryArchSuffix = $portVersion
app:BeShare = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libsanta$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libsanta$secondaryArchSuffix
devel:libz$secondaryArchSuffix
# devel:muscle$secondaryArchSuffix
"
BUILD_PREREQUIRES="
makefile_engine
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
BUILD()
{
ln -sf ../../sources-2/muscle muscle
cd source
make $jobArgs
#LOCAL_INCLUDE_PATHS=$includeDir/muscle
}
INSTALL()
{
mkdir -p $appsDir/BeShare
cp -r app/* $appsDir/BeShare
addAppDeskbarSymlink $appsDir/BeShare/BeShare
}

View File

@@ -0,0 +1,79 @@
SUMMARY="A native file sharing and chat application"
DESCRIPTION="BeShare is a BeOS/Haiku-native file sharing program. \
It operates similarly to other such programs (IRC, Napster, Hotline, etc) \
but with a few advantages:
- BeShare allows you to upload or download any type of file, not just mp3.
- When browsing files, you can see their attributes (similar to Tracker's\
view).
- Your query is always \"live\", so if new files that match your query become\
available, you will see them added to the results list right away (you won't\
have to click \"refresh\" or anything first).
- BeShare includes a rudimentary chat mechanism for you social types.
- BeShare supports any number of simultaneous uploads and downloads\
in parallel, but will serialize simultaneous file requests to any\
given host for efficiency.
- BeShare connects to any MUSCLE server\
(see https://public.msli.com/lcs/muscle/ for details).
- BeShare source code is available, and serves as an example of how to write\
a MUSCLE client."
HOMEPAGE="
https://github.com/HaikuArchives/BeShare
http://web.ncf.ca/au829/BeOS/
"
COPYRIGHT="1999-2012 Jeremy Friesner"
LICENSE="Public Domain
libsanta"
# Use revision 3+ to take priority over existing 3.04 versions. AGMS20210622
REVISION="3"
SOURCE_URI="http://web.ncf.ca/au829/BeOS/BeShare_3.04.zip"
CHECKSUM_SHA256="37b9e590d2f3f5ce1395fdb6a31e8849ce0d286a79a53908476ea70f942987a2"
SOURCE_FILENAME="BeShare_3.04.zip"
SOURCE_DIR="BeShare"
ADDITIONAL_FILES="beshare-post-install.sh"
POST_INSTALL_SCRIPTS="$relativePostInstallDir/beshare-post-install.sh"
# Note this source code is portable and should compile on all platforms (PPC,
# all x86 varieties), and for both BeOS and Haiku. Please keep it that way.
ARCHITECTURES="x86_gcc2 ?x86 x86_64 ?arm ?ppc"
PROVIDES="
beshare$secondaryArchSuffix = $portVersion
app:BeShare = $portVersion
"
REQUIRES="haiku$secondaryArchSuffix"
BUILD_REQUIRES="haiku${secondaryArchSuffix}_devel"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
BUILD()
{
if [ $effectiveTargetArchitecture == x86_64 ]; then
CXXFLAGS="-DMUSCLE_64_BIT_PLATFORM"
fi
export CXXFLAGS="-D_BSD_SOURCE $CXXFLAGS"
cd source/beshare
make $jobArgs
}
INSTALL()
{
mkdir -p -v $appsDir
cp -av $sourceDir/source/beshare/BeShare $appsDir/BeShare
chmod -v a+rx $appsDir/BeShare
addAppDeskbarSymlink $appsDir/BeShare
mkdir -p -v $postInstallDir
cp -av $portDir/additional-files/beshare-post-install.sh $postInstallDir
chmod -v a+rx $postInstallDir/beshare-post-install.sh
mkdir -p -v $docDir
cp -av documentation/* $docDir
}

View File

@@ -1,58 +0,0 @@
From a8b6f2f1b8505643fc4c66e2a0ba4f22a3948857 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 29 Sep 2018 23:28:47 +0200
Subject: support for x86_64.
diff --git a/muscle/besupport/ConvertMessages.cpp b/muscle/besupport/ConvertMessages.cpp
index 83b4642..67c3669 100644
--- a/muscle/besupport/ConvertMessages.cpp
+++ b/muscle/besupport/ConvertMessages.cpp
@@ -81,7 +81,7 @@ status_t ConvertFromBMessage(const BMessage & from, Message & to)
for (int32 j=0; j<count; j++)
{
const void * nextItem;
- int32 itemSize;
+ ssize_t itemSize;
if (from.FindData(name, type, j, &nextItem, &itemSize) != B_NO_ERROR) return B_ERROR;
// do any necessary translation from the Be data types to Muscle data types
diff --git a/muscle/support/MuscleSupport.h b/muscle/support/MuscleSupport.h
index 5c12471..e03830a 100644
--- a/muscle/support/MuscleSupport.h
+++ b/muscle/support/MuscleSupport.h
@@ -180,6 +180,9 @@ typedef void * muscleVoidPointer; /* it's a bit easier, syntax-wise, to use thi
# if !((defined(BONE))||(defined(BONE_VERSION))||(defined(__HAIKU__)))
# define BEOS_OLD_NETSERVER
# endif
+# ifdef __x86_64__
+# define MUSCLE_64_BIT_PLATFORM 1
+# endif
#else
# define B_ERROR -1
# define B_NO_ERROR 0
diff --git a/muscle/util/FilePathInfo.cpp b/muscle/util/FilePathInfo.cpp
index ce520d1..e240fee 100644
--- a/muscle/util/FilePathInfo.cpp
+++ b/muscle/util/FilePathInfo.cpp
@@ -59,7 +59,7 @@ void FilePathInfo :: SetFilePath(const char * optFilePath)
CloseHandle(hFile);
}
#else
-# if defined(MUSCLE_64_BIT_PLATFORM) && !defined(__APPLE__)
+# if defined(MUSCLE_64_BIT_PLATFORM) && !defined(__APPLE__) && !defined(__HAIKU__)
struct stat64 statInfo;
if (stat64(optFilePath, &statInfo) == 0)
# else
@@ -72,7 +72,7 @@ void FilePathInfo :: SetFilePath(const char * optFilePath)
if (S_ISREG(statInfo.st_mode)) _flags |= (1L<<FPI_FLAG_ISREGULARFILE);
_size = statInfo.st_size;
-# if defined(MUSCLE_64_BIT_PLATFORM) && !defined(_POSIX_SOURCE)
+# if defined(MUSCLE_64_BIT_PLATFORM) && !defined(_POSIX_SOURCE) && !defined(__HAIKU__)
_atime = InternalizeTimeSpec(statInfo.st_atimespec);
# if !defined(__APPLE__) || (__DARWIN_64_BIT_INO_T == 1)
_ctime = InternalizeTimeSpec(statInfo.st_birthtimespec);
--
2.19.0