From 6ed36d5d34b1a7b692da05e6dd1c4d5fd12d8c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Arroyo=20Calle?= Date: Wed, 7 Jan 2015 16:22:43 +0000 Subject: [PATCH 1/4] Premake 4.3 --- dev-util/premake/patches/premake-4.3.patch | 37 ------------- dev-util/premake/patches/premake-4.3.patchset | 54 +++++++++++++++++++ dev-util/premake/premake-4.3.recipe | 54 +++++++++++++++---- 3 files changed, 98 insertions(+), 47 deletions(-) delete mode 100644 dev-util/premake/patches/premake-4.3.patch create mode 100644 dev-util/premake/patches/premake-4.3.patchset diff --git a/dev-util/premake/patches/premake-4.3.patch b/dev-util/premake/patches/premake-4.3.patch deleted file mode 100644 index e02982f80..000000000 --- a/dev-util/premake/patches/premake-4.3.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -Naur premake-4.3/build/gmake.unix/Premake4.make premake-4.3-haiku/build/gmake.unix/Premake4.make ---- premake-4.3/build/gmake.unix/Premake4.make 2010-11-16 11:29:14.028311552 +0000 -+++ premake-4.3-haiku/build/gmake.unix/Premake4.make 2012-12-27 23:50:16.043253760 +0000 -@@ -28,8 +28,8 @@ - CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES) - CFLAGS += $(CPPFLAGS) $(ARCH) -Wall -Os - CXXFLAGS += $(CFLAGS) -- LDFLAGS += -s -rdynamic -- LIBS += -lm -ldl -+ LDFLAGS += -s -+ LIBS += - RESFLAGS += $(DEFINES) $(INCLUDES) - LDDEPS += - LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(ARCH) $(LIBS) -diff -Naur premake-4.3/src/host/lua-5.1.4/src/luaconf.h premake-4.3-haiku/src/host/lua-5.1.4/src/luaconf.h ---- premake-4.3/src/host/lua-5.1.4/src/luaconf.h 2010-11-16 11:29:12.042991616 +0000 -+++ premake-4.3-haiku/src/host/lua-5.1.4/src/luaconf.h 2012-12-27 23:50:16.050331648 +0000 -@@ -55,7 +55,6 @@ - #define LUA_USE_MKSTEMP - #define LUA_USE_ISATTY - #define LUA_USE_POPEN --#define LUA_USE_ULONGJMP - #endif - - -diff -Naur premake-4.3/src/host/premake.h premake-4.3-haiku/src/host/premake.h ---- premake-4.3/src/host/premake.h 2010-11-16 11:29:12.047185920 +0000 -+++ premake-4.3-haiku/src/host/premake.h 2012-12-27 23:50:16.052166656 +0000 -@@ -12,7 +12,7 @@ - - /* Identify the current platform I'm not sure how to reliably detect - * Windows but since it is the most common I use it as the default */ --#if defined(__linux__) -+#if defined(__linux__) || defined(__HAIKU__) - #define PLATFORM_LINUX (1) - #define PLATFORM_STRING "linux" - #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) diff --git a/dev-util/premake/patches/premake-4.3.patchset b/dev-util/premake/patches/premake-4.3.patchset new file mode 100644 index 000000000..75f9cdc9e --- /dev/null +++ b/dev-util/premake/patches/premake-4.3.patchset @@ -0,0 +1,54 @@ +From 24fb42f5d8c5e23290a9e22d577174a6151f4a6e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Adri=C3=A1n=20Arroyo=20Calle?= + +Date: Wed, 7 Jan 2015 16:17:46 +0000 +Subject: Fixing Premake4 + + +diff --git a/build/gmake.unix/Premake4.make b/build/gmake.unix/Premake4.make +index bbc159b..7cb8ce5 100644 +--- a/build/gmake.unix/Premake4.make ++++ b/build/gmake.unix/Premake4.make +@@ -28,8 +28,8 @@ ifeq ($(config),release) + CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES) + CFLAGS += $(CPPFLAGS) $(ARCH) -Wall -Os + CXXFLAGS += $(CFLAGS) +- LDFLAGS += -s -rdynamic +- LIBS += -lm -ldl ++ LDFLAGS += -s ++ LIBS += -lbe -lroot -ltracker + RESFLAGS += $(DEFINES) $(INCLUDES) + LDDEPS += + LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(ARCH) $(LIBS) +diff --git a/src/host/lua-5.1.4/src/luaconf.h b/src/host/lua-5.1.4/src/luaconf.h +index e2cb261..b702731 100644 +--- a/src/host/lua-5.1.4/src/luaconf.h ++++ b/src/host/lua-5.1.4/src/luaconf.h +@@ -55,8 +55,10 @@ + #define LUA_USE_MKSTEMP + #define LUA_USE_ISATTY + #define LUA_USE_POPEN ++#ifndef __HAIKU__ + #define LUA_USE_ULONGJMP + #endif ++#endif + + + /* +diff --git a/src/host/premake.h b/src/host/premake.h +index 4358b18..72371e1 100644 +--- a/src/host/premake.h ++++ b/src/host/premake.h +@@ -24,6 +24,9 @@ + #elif defined(__sun__) && defined(__svr4__) + #define PLATFORM_SOLARIS (1) + #define PLATFORM_STRING "solaris" ++#elif defined(__HAIKU__) ++#define PLATFORM_LINUX (1) ++#define PLATFORM_STRING "haiku" + #else + #define PLATFORM_WINDOWS (1) + #define PLATFORM_STRING "windows" +-- +1.8.3.4 + diff --git a/dev-util/premake/premake-4.3.recipe b/dev-util/premake/premake-4.3.recipe index d01ce86be..eef25d8d6 100644 --- a/dev-util/premake/premake-4.3.recipe +++ b/dev-util/premake/premake-4.3.recipe @@ -1,23 +1,57 @@ -DESCRIPTION="Powerfully simple build configuration" +SUMMARY="Powerfully simple build configuration" +DESCRIPTION=" +Describe your software project with a full-featured scripting language and \ +let Premake write the build scripts for you. With one file your project can \ +support both IDE-addicted Windows coders and Linux command-line junkies! +" HOMEPAGE="http://industriousone.com/premake" SRC_URI="http://sourceforge.net/projects/premake/files/Premake/4.3/premake-4.3-src.zip/download" -CHECKSUM_MD5="8cfafee76f9665c93b2e9ad15b015eb7" +CHECKSUM_SHA256="36536490f8928d8ecde135da80cd8b751ea5bebe50cabba5c0de49cd41cb2780" REVISION="1" -STATUS_HAIKU="stable" -DEPEND="" +LICENSE="BSD (2-clause)" +COPYRIGHT="2012 Industrious One, LLC" + +ARCHITECTURES="x86 ?x86_64" +if [ $effectiveTargetArchitecture != x86_gcc2 ]; then + ARCHITECTURES="$ARCHITECTURES x86_gcc2" +else + ARCHITECTURES="$ARCHITECTURES !x86_gcc2" +fi +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + premake4$secondaryArchSuffix = $portVersion + cmd:premake4$secondaryArchSuffix = $portVersion +" + +REQUIRES=" + haiku$secondaryArchSuffix +" + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel +" + +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make +" + +SOURCE_DIR="premake-4.3" + +PATCHES="premake-4.3.patchset" BUILD() { - cd premake-4.3/build/gmake.unix + cd build/gmake.unix make config=release } INSTALL() { - cd premake-4.3/bin/release - mkdir -p $DESTDIR`finddir B_COMMON_BIN_DIRECTORY` - install -m 0755 premake4 $DESTDIR`finddir B_COMMON_BIN_DIRECTORY` + cd bin/release + mkdir -p $binDir + install -m 0755 premake4 $binDir } -LICENSE="BSD (2-clause)" -COPYRIGHT="2012 Industrious One, LLC" From 2b722b18a569018a482f381b7b76e3e4cf09c85a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Arroyo=20Calle?= Date: Thu, 8 Jan 2015 18:40:55 +0000 Subject: [PATCH 2/4] Fixed Premake 4.4 --- dev-util/premake/patches/premake-4.3.patchset | 54 ------------------- .../patches/premake-4.4-beta5.patchset | 39 ++++++++++++++ ...ke-4.3.recipe => premake-4.4.beta5.recipe} | 9 ++-- 3 files changed, 44 insertions(+), 58 deletions(-) delete mode 100644 dev-util/premake/patches/premake-4.3.patchset create mode 100644 dev-util/premake/patches/premake-4.4-beta5.patchset rename dev-util/premake/{premake-4.3.recipe => premake-4.4.beta5.recipe} (85%) diff --git a/dev-util/premake/patches/premake-4.3.patchset b/dev-util/premake/patches/premake-4.3.patchset deleted file mode 100644 index 75f9cdc9e..000000000 --- a/dev-util/premake/patches/premake-4.3.patchset +++ /dev/null @@ -1,54 +0,0 @@ -From 24fb42f5d8c5e23290a9e22d577174a6151f4a6e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Adri=C3=A1n=20Arroyo=20Calle?= - -Date: Wed, 7 Jan 2015 16:17:46 +0000 -Subject: Fixing Premake4 - - -diff --git a/build/gmake.unix/Premake4.make b/build/gmake.unix/Premake4.make -index bbc159b..7cb8ce5 100644 ---- a/build/gmake.unix/Premake4.make -+++ b/build/gmake.unix/Premake4.make -@@ -28,8 +28,8 @@ ifeq ($(config),release) - CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES) - CFLAGS += $(CPPFLAGS) $(ARCH) -Wall -Os - CXXFLAGS += $(CFLAGS) -- LDFLAGS += -s -rdynamic -- LIBS += -lm -ldl -+ LDFLAGS += -s -+ LIBS += -lbe -lroot -ltracker - RESFLAGS += $(DEFINES) $(INCLUDES) - LDDEPS += - LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(ARCH) $(LIBS) -diff --git a/src/host/lua-5.1.4/src/luaconf.h b/src/host/lua-5.1.4/src/luaconf.h -index e2cb261..b702731 100644 ---- a/src/host/lua-5.1.4/src/luaconf.h -+++ b/src/host/lua-5.1.4/src/luaconf.h -@@ -55,8 +55,10 @@ - #define LUA_USE_MKSTEMP - #define LUA_USE_ISATTY - #define LUA_USE_POPEN -+#ifndef __HAIKU__ - #define LUA_USE_ULONGJMP - #endif -+#endif - - - /* -diff --git a/src/host/premake.h b/src/host/premake.h -index 4358b18..72371e1 100644 ---- a/src/host/premake.h -+++ b/src/host/premake.h -@@ -24,6 +24,9 @@ - #elif defined(__sun__) && defined(__svr4__) - #define PLATFORM_SOLARIS (1) - #define PLATFORM_STRING "solaris" -+#elif defined(__HAIKU__) -+#define PLATFORM_LINUX (1) -+#define PLATFORM_STRING "haiku" - #else - #define PLATFORM_WINDOWS (1) - #define PLATFORM_STRING "windows" --- -1.8.3.4 - diff --git a/dev-util/premake/patches/premake-4.4-beta5.patchset b/dev-util/premake/patches/premake-4.4-beta5.patchset new file mode 100644 index 000000000..9c3b851de --- /dev/null +++ b/dev-util/premake/patches/premake-4.4-beta5.patchset @@ -0,0 +1,39 @@ +From 0621b3e542f32146cea8177b128665e0aa7d44b9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Adri=C3=A1n=20Arroyo=20Calle?= + +Date: Thu, 8 Jan 2015 18:10:54 +0000 +Subject: Finxing Haiku build + + +diff --git a/build/gmake.unix/Premake4.make b/build/gmake.unix/Premake4.make +index 5b8e979..314879c 100644 +--- a/build/gmake.unix/Premake4.make ++++ b/build/gmake.unix/Premake4.make +@@ -29,9 +29,9 @@ ifeq ($(config),release) + ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os + ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) + ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) +- ALL_LDFLAGS += $(LDFLAGS) -L. -s -rdynamic ++ ALL_LDFLAGS += $(LDFLAGS) -L. -s + LDDEPS += +- LIBS += $(LDDEPS) -lm -ldl ++ LIBS += $(LDDEPS) + LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) + define PREBUILDCMDS + endef +diff --git a/src/host/lua-5.1.4/src/luaconf.h b/src/host/lua-5.1.4/src/luaconf.h +index e2cb261..e2c6418 100644 +--- a/src/host/lua-5.1.4/src/luaconf.h ++++ b/src/host/lua-5.1.4/src/luaconf.h +@@ -55,7 +55,7 @@ + #define LUA_USE_MKSTEMP + #define LUA_USE_ISATTY + #define LUA_USE_POPEN +-#define LUA_USE_ULONGJMP ++/* #define LUA_USE_ULONGJMP */ + #endif + + +-- +1.8.3.4 + diff --git a/dev-util/premake/premake-4.3.recipe b/dev-util/premake/premake-4.4.beta5.recipe similarity index 85% rename from dev-util/premake/premake-4.3.recipe rename to dev-util/premake/premake-4.4.beta5.recipe index eef25d8d6..cf13a4684 100644 --- a/dev-util/premake/premake-4.3.recipe +++ b/dev-util/premake/premake-4.4.beta5.recipe @@ -5,8 +5,8 @@ let Premake write the build scripts for you. With one file your project can \ support both IDE-addicted Windows coders and Linux command-line junkies! " HOMEPAGE="http://industriousone.com/premake" -SRC_URI="http://sourceforge.net/projects/premake/files/Premake/4.3/premake-4.3-src.zip/download" -CHECKSUM_SHA256="36536490f8928d8ecde135da80cd8b751ea5bebe50cabba5c0de49cd41cb2780" +SRC_URI="http://sourceforge.net/projects/premake/files/Premake/4.4/premake-4.4-beta5-src.zip" +CHECKSUM_SHA256="0fa1ed02c5229d931e87995123cdb11d44fcc8bd99bba8e8bb1bbc0aaa798161" REVISION="1" LICENSE="BSD (2-clause)" COPYRIGHT="2012 Industrious One, LLC" @@ -20,6 +20,7 @@ fi SECONDARY_ARCHITECTURES="x86" PROVIDES=" + premake premake4$secondaryArchSuffix = $portVersion cmd:premake4$secondaryArchSuffix = $portVersion " @@ -38,9 +39,9 @@ BUILD_PREREQUIRES=" cmd:make " -SOURCE_DIR="premake-4.3" +SOURCE_DIR="premake-4.4-beta5" -PATCHES="premake-4.3.patchset" +PATCHES="premake-4.4-beta5.patchset" BUILD() { From 6c343795e082c405a60a199e45195d747af45dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Arroyo=20Calle?= Date: Thu, 8 Jan 2015 19:10:07 +0000 Subject: [PATCH 3/4] Using SED for patches --- .../patches/premake-4.4-beta5.patchset | 39 ------------------- dev-util/premake/premake-4.4.beta5.recipe | 7 +++- 2 files changed, 6 insertions(+), 40 deletions(-) delete mode 100644 dev-util/premake/patches/premake-4.4-beta5.patchset diff --git a/dev-util/premake/patches/premake-4.4-beta5.patchset b/dev-util/premake/patches/premake-4.4-beta5.patchset deleted file mode 100644 index 9c3b851de..000000000 --- a/dev-util/premake/patches/premake-4.4-beta5.patchset +++ /dev/null @@ -1,39 +0,0 @@ -From 0621b3e542f32146cea8177b128665e0aa7d44b9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Adri=C3=A1n=20Arroyo=20Calle?= - -Date: Thu, 8 Jan 2015 18:10:54 +0000 -Subject: Finxing Haiku build - - -diff --git a/build/gmake.unix/Premake4.make b/build/gmake.unix/Premake4.make -index 5b8e979..314879c 100644 ---- a/build/gmake.unix/Premake4.make -+++ b/build/gmake.unix/Premake4.make -@@ -29,9 +29,9 @@ ifeq ($(config),release) - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os - ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) - ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -- ALL_LDFLAGS += $(LDFLAGS) -L. -s -rdynamic -+ ALL_LDFLAGS += $(LDFLAGS) -L. -s - LDDEPS += -- LIBS += $(LDDEPS) -lm -ldl -+ LIBS += $(LDDEPS) - LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) - define PREBUILDCMDS - endef -diff --git a/src/host/lua-5.1.4/src/luaconf.h b/src/host/lua-5.1.4/src/luaconf.h -index e2cb261..e2c6418 100644 ---- a/src/host/lua-5.1.4/src/luaconf.h -+++ b/src/host/lua-5.1.4/src/luaconf.h -@@ -55,7 +55,7 @@ - #define LUA_USE_MKSTEMP - #define LUA_USE_ISATTY - #define LUA_USE_POPEN --#define LUA_USE_ULONGJMP -+/* #define LUA_USE_ULONGJMP */ - #endif - - --- -1.8.3.4 - diff --git a/dev-util/premake/premake-4.4.beta5.recipe b/dev-util/premake/premake-4.4.beta5.recipe index cf13a4684..995f7d6ae 100644 --- a/dev-util/premake/premake-4.4.beta5.recipe +++ b/dev-util/premake/premake-4.4.beta5.recipe @@ -41,7 +41,12 @@ BUILD_PREREQUIRES=" SOURCE_DIR="premake-4.4-beta5" -PATCHES="premake-4.4-beta5.patchset" +PATCH() +{ + sed -i '/#define LUA_USE_ULONGJMP/d' src/host/lua-5.1.4/src/luaconf.h + sed -i '/-lm/d' build/gmake.unix/Premake4.make + sed -i 's/-rdynamic//g' build/gmake.unix/Premake4.make +} BUILD() { From cc1872182eb9704427cb7ed5b1a2db9b502617bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Arroyo=20Calle?= Date: Thu, 8 Jan 2015 19:18:30 +0000 Subject: [PATCH 4/4] Fix lines for HaikuDepot --- dev-util/premake/premake-4.4.beta5.recipe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-util/premake/premake-4.4.beta5.recipe b/dev-util/premake/premake-4.4.beta5.recipe index 995f7d6ae..0fb50e685 100644 --- a/dev-util/premake/premake-4.4.beta5.recipe +++ b/dev-util/premake/premake-4.4.beta5.recipe @@ -1,5 +1,5 @@ SUMMARY="Powerfully simple build configuration" -DESCRIPTION=" +DESCRIPTION="\ Describe your software project with a full-featured scripting language and \ let Premake write the build scripts for you. With one file your project can \ support both IDE-addicted Windows coders and Linux command-line junkies!