Added recipes for libprefs and launchpad, word by GCI2013 student Adrián Arroyo Calle

This commit is contained in:
Scott McCreary
2013-11-24 08:49:26 +00:00
parent 7df5218bd1
commit e9e5fc81a8
6 changed files with 209 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
SUMMARY="A simple BeOS application/file/folder launcher"
DESCRIPTION="A simple BeOS application/file/folder launcher"
HOMEPAGE="http://sourceforge.net/projects/launchpad"
SRC_URI="http://launchpad.cvs.sourceforge.net/viewvc/launchpad/buta/LaunchPad/?view=tar"
#CHECKSUM_MD5="9001e130b7ceb90aaef9791b8fac1afb"
REVISION="1"
LICENSE="BSD (3-clause)"
COPYRIGHT="1997-2000 Hiromasa Kato"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
launchpad = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libprefs
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
lib:libprefs
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
cmd:autoconf
cmd:libtool
cmd:aclocal
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
SOURCE_DIR="LaunchPad"
PATCHES="
configure.patch
configure.in.patch
Makefile.in.patch
"
BUILD()
{
libtoolize --force --copy --install
./configure --with-libprefs=$portPackageLinksDir/lib~libprefs/lib
make
}
INSTALL()
{
mkdir -p $appsDir
cp src/LaunchPad $appsDir
addAppDeskbarSymlink $appsDir/LaunchPad
}

View File

@@ -0,0 +1,13 @@
diff --git a/src/Makefile.in b/src/Makefile.in
index 15486d7..c8c4802 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -25,7 +25,7 @@ RSRCS = LaunchPad_ppc.rsrc
OBJS = $(addsuffix .o, $(foreach file, $(SRCS), $(basename $(notdir $(file)))))
-LIBS = $(LIBPREFSDIR)/bigprefs.$(CPU).a -lbe
+LIBS = $(LIBPREFSDIR)/libprefs.so -lbe # Was first $(LIBPREFSDIR)/bigprefs.$(CPU).a
all: LaunchPad

View File

@@ -0,0 +1,26 @@
diff --git a/configure.in b/configure.in
index 9cd3a85..0138f84 100644
--- a/configure.in
+++ b/configure.in
@@ -20,21 +20,6 @@ esac
AC_SUBST(CPU)
dnl -------------------------------------------------------------------
-dnl Check for BeOS R4
-dnl -------------------------------------------------------------------
-AC_MSG_CHECKING( [BeOS Release] )
-release=[$(uname -r | sed 's/\([^\.]*\)\..*/\1/')]
-case "$release" in
- 5|4)
- AC_MSG_RESULT( [post-R4] )
- ;;
- *)
- AC_MSG_RESULT( [not R4] )
- AC_MSG_ERROR( [BeOS Release 4 is required] )
- ;;
-esac
-
-dnl -------------------------------------------------------------------
dnl Check for libprefs source distribution
dnl -------------------------------------------------------------------
AC_ARG_WITH( libprefs, [ --with-libprefs=PATH path to the libprefs distribution ] )

View File

@@ -0,0 +1,13 @@
diff --git a/configure b/configure
index a438f22..1162706 100755
--- a/configure
+++ b/configure
@@ -585,7 +585,7 @@ echo $ac_n "checking BeOS Release ""... $ac_c" 1>&6
echo "configure:586: checking BeOS Release " >&5
release=$(uname -r | sed 's/\([^\.]*\)\..*/\1/')
case "$release" in
- 5|4)
+ 5|4|1)
echo "$ac_t""post-R4 " 1>&6
;;
*)

View File

@@ -0,0 +1,48 @@
SUMMARY="Shared library to take care your preferences"
DESCRIPTION="Shared library to take care your preferences"
HOMEPAGE="ftp://ftp.icm.edu.pl/vol/rzm1/beos/contrib/libraries"
SRC_URI="ftp://ftp.icm.edu.pl/vol/rzm1/beos/contrib/libraries/libprefs125.zip"
CHECKSUM_MD5="890f1fc84b7402505ac2536f4d1c5075"
REVISION="1"
LICENSE="Public Domain"
COPYRIGHT="1998 libprefs@mindcontrol.org"
ARCHITECTURES="x86_gcc2 !x86 !x86_64"
SECONDARY_ACRHITECTURES="x86_gcc2 !x86"
PROVIDES="
libprefs$secondaryArchSuffix = $portVersion
lib:libprefs$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
"
BUILD_REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
haiku${secondaryArchSuffix}_devel >= $haikuVersion
cmd:gcc
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
cmd:make
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
"
SOURCE_DIR="libprefs125"
PATCHES="libprefs.patch"
BUILD()
{
g++ -shared -fPIC -o libprefs.so src/libprefs.cpp -lroot -lbe
}
INSTALL()
{
mkdir -p $libDir
mkdir -p $includeDir
#cp bigprefs.x86.a $libDir/bigprefs.x86.a
cp libprefs.so $libDir
cp src/*.h $includeDir
}

View File

@@ -0,0 +1,50 @@
diff --git a/src/libprefs.cpp b/src/libprefs.cpp
index da58013..90d0aa4 100644
--- a/src/libprefs.cpp
+++ b/src/libprefs.cpp
@@ -71,6 +71,7 @@
#include <image.h>
#endif
+#include <Entry.h>
/* identifier for this implementation of the prefs library */
#define PREF_VERSION_STRING "simple libprefs.so version 1.2.4"
@@ -435,7 +436,7 @@ _PREFMakePath(
{
status_t err = B_OK;
BPath bpath;
- err = find_directory(user_level ? B_USER_SETTINGS_DIRECTORY : B_COMMON_SETTINGS_DIRECTORY, &bpath, true, NULL);
+ err = find_directory(B_USER_SETTINGS_DIRECTORY, &bpath, true, NULL);
if (err < B_OK) return err;
strncpy(path, bpath.Path(), path_max);
path[path_max-1] = 0;
@@ -894,9 +895,9 @@ PREFReloadSet(PREFData data)
#if DEBUG
printf("reload read %d\n", rd);
#endif
+ char * buffer = (char *)malloc(size);
if (rd < 0) { err = rd; goto cleanup; }
if (rd != sizeof(size)) { err = B_ERROR; goto cleanup; }
- char * buffer = (char *)malloc(size);
if (buffer == NULL) { err = B_NO_MEMORY; goto cleanup; }
rd = read(data->transaction->fd, buffer, size);
#if DEBUG
@@ -1156,7 +1157,7 @@ typedef struct _PREFAppIterator {
curItem = 0;
item = new char*[block];
BPath bpath;
- if (!find_directory(user_level ? B_USER_SETTINGS_DIRECTORY : B_COMMON_SETTINGS_DIRECTORY, &bpath, true, NULL))
+ if (!find_directory(B_USER_SETTINGS_DIRECTORY, &bpath, true, NULL))
{
BDirectory dir(bpath.Path());
BEntry entry;
@@ -1278,7 +1279,7 @@ typedef struct _PREFSetIterator
curItem = 0;
item = new char*[block];
BPath bpath;
- if (!find_directory(user_level ? B_USER_SETTINGS_DIRECTORY : B_COMMON_SETTINGS_DIRECTORY, &bpath, true, NULL))
+ if (!find_directory(B_USER_SETTINGS_DIRECTORY, &bpath, true, NULL))
{
char str[B_FILE_NAME_LENGTH+20];
strcpy(str, LP_MAGIC);