From e9e5fc81a897aaebf802e3678ec6ee1d210fe00c Mon Sep 17 00:00:00 2001 From: Scott McCreary Date: Sun, 24 Nov 2013 08:49:26 +0000 Subject: [PATCH] =?UTF-8?q?Added=20recipes=20for=20libprefs=20and=20launch?= =?UTF-8?q?pad,=20word=20by=20GCI2013=20student=20Adri=C3=A1n=20Arroyo=20C?= =?UTF-8?q?alle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- haiku-apps/launchpad/launchpad-1.3.recipe | 59 +++++++++++++++++++ .../launchpad/patches/Makefile.in.patch | 13 ++++ .../launchpad/patches/configure.in.patch | 26 ++++++++ haiku-apps/launchpad/patches/configure.patch | 13 ++++ haiku-libs/libprefs/libprefs-1.2.5.recipe | 48 +++++++++++++++ haiku-libs/libprefs/patches/libprefs.patch | 50 ++++++++++++++++ 6 files changed, 209 insertions(+) create mode 100644 haiku-apps/launchpad/launchpad-1.3.recipe create mode 100644 haiku-apps/launchpad/patches/Makefile.in.patch create mode 100644 haiku-apps/launchpad/patches/configure.in.patch create mode 100644 haiku-apps/launchpad/patches/configure.patch create mode 100644 haiku-libs/libprefs/libprefs-1.2.5.recipe create mode 100644 haiku-libs/libprefs/patches/libprefs.patch diff --git a/haiku-apps/launchpad/launchpad-1.3.recipe b/haiku-apps/launchpad/launchpad-1.3.recipe new file mode 100644 index 000000000..3f3501eb0 --- /dev/null +++ b/haiku-apps/launchpad/launchpad-1.3.recipe @@ -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 + +} diff --git a/haiku-apps/launchpad/patches/Makefile.in.patch b/haiku-apps/launchpad/patches/Makefile.in.patch new file mode 100644 index 000000000..640f62bd6 --- /dev/null +++ b/haiku-apps/launchpad/patches/Makefile.in.patch @@ -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 + diff --git a/haiku-apps/launchpad/patches/configure.in.patch b/haiku-apps/launchpad/patches/configure.in.patch new file mode 100644 index 000000000..18bdaf601 --- /dev/null +++ b/haiku-apps/launchpad/patches/configure.in.patch @@ -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 ] ) diff --git a/haiku-apps/launchpad/patches/configure.patch b/haiku-apps/launchpad/patches/configure.patch new file mode 100644 index 000000000..bec72bfbe --- /dev/null +++ b/haiku-apps/launchpad/patches/configure.patch @@ -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 + ;; + *) diff --git a/haiku-libs/libprefs/libprefs-1.2.5.recipe b/haiku-libs/libprefs/libprefs-1.2.5.recipe new file mode 100644 index 000000000..17b83ea82 --- /dev/null +++ b/haiku-libs/libprefs/libprefs-1.2.5.recipe @@ -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 +} diff --git a/haiku-libs/libprefs/patches/libprefs.patch b/haiku-libs/libprefs/patches/libprefs.patch new file mode 100644 index 000000000..a08e04b42 --- /dev/null +++ b/haiku-libs/libprefs/patches/libprefs.patch @@ -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 + #endif + ++#include + + /* 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);