From 922289abdd4832a3fc6e85470c0c07b5ec2bb269 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 19 Oct 2014 22:11:27 +0200 Subject: [PATCH] Add recipe for BRexx. Quite hacky, may not be really working yet (needs more __BEOS__ > __HAIKU__). --- dev-lang/brexx/brexx-1.3.2.recipe | 72 +++++ dev-lang/brexx/patches/brexx-1.3.2.patchset | 316 ++++++++++++++++++++ 2 files changed, 388 insertions(+) create mode 100644 dev-lang/brexx/brexx-1.3.2.recipe create mode 100644 dev-lang/brexx/patches/brexx-1.3.2.patchset diff --git a/dev-lang/brexx/brexx-1.3.2.recipe b/dev-lang/brexx/brexx-1.3.2.recipe new file mode 100644 index 000000000..aa18dd85b --- /dev/null +++ b/dev-lang/brexx/brexx-1.3.2.recipe @@ -0,0 +1,72 @@ +SUMMARY="A REXX interpreter with Haiku scripting integration" +DESCRIPTION=" +Rexx (Restructured Extended Executor) is an interpreted programming language \ +developed at IBM by Mike Cowlishaw. It is a structured, high-level programming \ +language designed for ease of learning and reading. + +BeBRexx 1.3.2 is the first public release of a port of Bill Vlachoudis' BRexx \ +version 1.3 to BeOS, a REXX interpreter with a number of improvements and \ +additions: +* Support for BeOS application scripting. +* Support for running BRexx scripts from the desktop. +* Additional functions and features. +" +REVISION="1" +ARCHITECTURES="x86_gcc2" +HOMEPAGE="http://www.verifiedlogic.com/" +LICENSE=" +Public Domain +BSD (3-clause) +" +COPYRIGHT=" +1991-1999, Be Incorporated +1999 Willy Langeveld +1999 Vassilis Vlachoudis +" + +SRC_URI="http://www.verifiedlogic.com/BeBRexx.zip" +CHECKSUM_SHA256="0386a9f04e04a120af5785c034e254bbfedc24973e241fe744e6777b453c8055" +SOURCE_DIR="BeBRexx" + +PROVIDES=" + brexx = $portVersion + cmd:PortManager + cmd:Squares + cmd:rx + lib:libPortManager +" + +REQUIRES=" + haiku >= $haikuVersion +" + +BUILD_PREREQUIRES=" + haiku_devel >= $haikuVersion + makefile_engine + cmd:gcc + cmd:make + cmd:mkdepend +" + +BUILD() +{ + make all OBJ_DIR=obj +} + +INSTALL() +{ + mkdir -p $binDir + mkdir -p $libDir + + copyattr -d PortManager/obj/PortManager $binDir + copyattr -d Squares/obj/Squares $binDir + copyattr -d src/obj/rx $binDir + + copyattr -d PortLib/obj/libPortManager.so $libDir +} + +TEST() +{ + export LIBRARY_PATH=PortLib/obj:$LIBRARY_PATH + make test OBJ_DIR=obj +} diff --git a/dev-lang/brexx/patches/brexx-1.3.2.patchset b/dev-lang/brexx/patches/brexx-1.3.2.patchset new file mode 100644 index 000000000..91062bdcc --- /dev/null +++ b/dev-lang/brexx/patches/brexx-1.3.2.patchset @@ -0,0 +1,316 @@ +From 8d1fd936b9fe34ed1ec98fdec9664a4b3082cec5 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 19 Oct 2014 21:56:48 +0200 +Subject: Fix build for Haiku. + +This needed more changes than I expected. Maybe an HaikuArchives repo is +a good idea. + +diff --git a/PortLib/makefile b/PortLib/makefile +index ec7539e..868f446 100644 +--- a/PortLib/makefile ++++ b/PortLib/makefile +@@ -104,5 +104,5 @@ LINKER_FLAGS = + + + ## include the makefile-engine +-include /boot/develop/etc/makefile-engine ++include /system/develop/etc/makefile-engine + +diff --git a/PortManager/makefile b/PortManager/makefile +index c69746b..fc33940 100644 +--- a/PortManager/makefile ++++ b/PortManager/makefile +@@ -59,7 +59,7 @@ LIBS= PortManager be + # be recursive, so include all of the paths where libraries can + # be found. Directories where source files are found are + # automatically included. +-LIBPATHS= /boot/home/config/lib ++LIBPATHS= /boot/home/config/lib ../PortLib/$(OBJ_DIR) + + # additional paths to look for system headers + # thes use the form: #include
+@@ -104,5 +104,5 @@ LINKER_FLAGS = + + + ## include the makefile-engine +-include /boot/develop/etc/makefile-engine ++include /system/develop/etc/makefile-engine + +diff --git a/Squares/makefile b/Squares/makefile +index 53c9741..7212b16 100644 +--- a/Squares/makefile ++++ b/Squares/makefile +@@ -59,7 +59,7 @@ LIBS= PortManager be + # be recursive, so include all of the paths where libraries can + # be found. Directories where source files are found are + # automatically included. +-LIBPATHS= /boot/home/config/lib ++LIBPATHS= /boot/home/config/lib ../PortLib/$(OBJ_DIR) + + # additional paths to look for system headers + # thes use the form: #include
+@@ -104,5 +104,5 @@ LINKER_FLAGS = + + + ## include the makefile-engine +-include /boot/develop/etc/makefile-engine ++include /system/develop/etc/makefile-engine + +diff --git a/makefile b/makefile +index 4e144cf..5048dae 100644 +--- a/makefile ++++ b/makefile +@@ -14,8 +14,8 @@ all: portlib portman squares brexx + + portlib: + @echo " " +- @echo "Creating PortManager library, and copying to /boot/home/config/lib" +- -cd PortLib; make; copyattr -d $(OBJ_DIR)/libPortManager.so /boot/home/config/lib ++ @echo "Creating PortManager library" ++ -cd PortLib; make + + + portman: +@@ -31,15 +31,16 @@ squares: + brexx: + @echo " " + @echo "Creating BRexx itself" +- -cd src; make ++ -cd src; make OBJ_DIR=$(OBJ_DIR) + + install: + @echo " " +- @echo "Installing BRexx executables" ++ @echo "Installing BRexx executables and libraries" + -kill PortManager + -copyattr -d PortManager/$(OBJ_DIR)/PortManager /boot/home/config/bin + -copyattr -d Squares/$(OBJ_DIR)/Squares /boot/home/config/bin + -copyattr -d src/$(OBJ_DIR)/rx /boot/home/config/bin ++ -copyattr -d PortLib/$(OBJ_DIR)/libPortManager.so /boot/home/config/lib + + uninstall: + @echo " " +diff --git a/src/PropDump.h b/src/PropDump.h +index ccb003a..388812f 100644 +--- a/src/PropDump.h ++++ b/src/PropDump.h +@@ -1,6 +1,7 @@ + #ifndef _propdump_h + #define _propdump_h + ++#include + #include + + enum { +@@ -16,4 +17,4 @@ BString DumpPropInfo(const BPropertyInfo* info, int32 pprint); + BString GetCommandName(type_code command); + BString GetSpecName(type_code spec); + +-#endif /* _propdump_h */ +\ No newline at end of file ++#endif /* _propdump_h */ +diff --git a/src/be_cmd.cpp b/src/be_cmd.cpp +index d7315fd..898e103 100644 +--- a/src/be_cmd.cpp ++++ b/src/be_cmd.cpp +@@ -3,8 +3,6 @@ + * Commands and functions that apply to BeOS + * + **/ +-#ifdef __BEOS__ +- + #include + #include + #include +@@ -358,4 +356,3 @@ char *be_app_list(Lstr *appname, char pad, char listtype) + return(buff); + } + +-#endif +diff --git a/src/be_main.cpp b/src/be_main.cpp +index 8f56d0d..d1a28ea 100644 +--- a/src/be_main.cpp ++++ b/src/be_main.cpp +@@ -3,7 +3,6 @@ + * Commands and functions that apply to BeOS + * + **/ +-#ifdef __BEOS__ + + #include + #include +@@ -484,4 +483,3 @@ void R_closeconsole(args *arg) + return; + } + +-#endif +diff --git a/src/consolebe.cc b/src/consolebe.cc +index 7ab1b42..f6260cd 100644 +--- a/src/consolebe.cc ++++ b/src/consolebe.cc +@@ -11,8 +11,6 @@ + #include + #include + +-#ifdef __BEOS__ +- + #include + #include + #include "consolebe.hh" +@@ -295,4 +293,3 @@ void ConsoleBe::InsertText(const char *text, int32 length, int32 offset, const t + return; + } + +-#endif +diff --git a/src/consolebe.hh b/src/consolebe.hh +index da24682..56cebb1 100644 +--- a/src/consolebe.hh ++++ b/src/consolebe.hh +@@ -8,7 +8,6 @@ + #ifndef CONSOLEBE__H + #define CONSOLEBE__H + +-#ifdef __BEOS__ + #include + #include + #include +@@ -64,4 +63,3 @@ private: + }; + + #endif +-#endif +diff --git a/src/consoletty.cc b/src/consoletty.cc +index f5f29a0..a4e680c 100644 +--- a/src/consoletty.cc ++++ b/src/consoletty.cc +@@ -57,7 +57,7 @@ void ConsoleTTY::setraw(long wait) + { + if (cooked == 0) return; + +-#ifdef __BEOS__ ++#ifdef __HAIKU__ + waitflag = wait; + struct termios termios; + +@@ -142,7 +142,7 @@ ConsoleTTY::~ConsoleTTY() + void ConsoleTTY::setcooked(void) + { + if (cooked) return; +-#ifdef __BEOS__ ++#ifdef __HAIKU__ + if (fd >= 0) { + tcsetattr(fd, TCSANOW, &savedsettings); + if (waitflag == 0) { +@@ -172,7 +172,7 @@ int ConsoleTTY::get_char(void) + + if (cooked) return((long) getchar()); + +-#ifndef __BEOS__ ++#ifndef __HAIKU__ + if (waitflag == 0) { + ioctl(fd, FIONREAD, &nbytes); + if (nbytes <= 0) return(-1); +diff --git a/src/consoletty.hh b/src/consoletty.hh +index 8df54c3..cc01d18 100644 +--- a/src/consoletty.hh ++++ b/src/consoletty.hh +@@ -35,7 +35,7 @@ protected: + private: + int fd; + +-#ifndef __BEOS__ ++#ifndef __HAIKU__ + sgttyb savedsettings; + #else + termios savedsettings; +diff --git a/src/hey.cpp b/src/hey.cpp +index dc29a64..e00dfdc 100644 +--- a/src/hey.cpp ++++ b/src/hey.cpp +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + #include + #include + #include "PropDump.h" +diff --git a/src/hey.h b/src/hey.h +index 0711bd7..108da88 100644 +--- a/src/hey.h ++++ b/src/hey.h +@@ -1,6 +1,8 @@ + #ifndef HEY_H + #define HEY_H + ++#include ++#include + #include + + +diff --git a/src/makefile b/src/makefile +index ebf288a..bfc0b62 100644 +--- a/src/makefile ++++ b/src/makefile +@@ -63,7 +63,7 @@ LIBS= PortManager be tracker + # be recursive, so include all of the paths where libraries can + # be found. Directories where source files are found are + # automatically included. +-LIBPATHS= /boot/home/config/lib ++LIBPATHS= /boot/home/config/lib ../PortLib/obj + + # additional paths to look for system headers + # thes use the form: #include
+@@ -108,5 +108,5 @@ LINKER_FLAGS = + + + ## include the makefile-engine +-include /boot/develop/etc/makefile-engine ++include /system/develop/etc/makefile-engine + +diff --git a/src/rexx.c b/src/rexx.c +index 1bfdf25..eb99123 100644 +--- a/src/rexx.c ++++ b/src/rexx.c +@@ -220,7 +220,7 @@ void release_everything( void ) + } /* release_everything */ + + /* -------------------------------------------------------------- */ +-#ifdef __BEOS__ ++#ifdef __HAIKU__ + int BRexxMain(int argc, char **argv) + #else + int main( int argc, char **argv) +diff --git a/src/rxfiles.c b/src/rxfiles.c +index 5e1e706..933e5a3 100644 +--- a/src/rxfiles.c ++++ b/src/rxfiles.c +@@ -12,11 +12,7 @@ + #include + #include + #include +-#ifdef __sun__ + #include +-#else +-#include +-#endif + #include + + #include "rexx.h" +diff --git a/src/utils.c b/src/utils.c +index 004bc10..bd82efa 100644 +--- a/src/utils.c ++++ b/src/utils.c +@@ -226,7 +226,7 @@ void set_trace( char *str ) + /* ---------------------------------------------------------- */ + Lstr *readline ( Lstr **A) + { +-#ifdef __BEOS__ ++#ifdef __HAIKU__ + extern char *bgetline(char *, long); + char buff[4096]; + int i, l; +-- +1.8.3.4 +