mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
premake: add recipe for 5.0.0 alpha13
alpha14 misses a file.
This commit is contained in:
114
dev-util/premake/patches/premake-5.0.0~alpha13.patchset
Normal file
114
dev-util/premake/patches/premake-5.0.0~alpha13.patchset
Normal file
@@ -0,0 +1,114 @@
|
||||
From bbd703e2a306e62de743ba15adb10c6a2a711d75 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
||||
Date: Sat, 18 May 2019 19:11:35 +0200
|
||||
Subject: [PATCH 1/3] contrib/curl: use linux config for Haiku
|
||||
|
||||
Like svr4 we don't have SIOCGIFADDR.
|
||||
---
|
||||
contrib/curl/lib/curl_setup.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/contrib/curl/lib/curl_setup.h b/contrib/curl/lib/curl_setup.h
|
||||
index 589f274..5b20ad7 100644
|
||||
--- a/contrib/curl/lib/curl_setup.h
|
||||
+++ b/contrib/curl/lib/curl_setup.h
|
||||
@@ -86,7 +86,7 @@
|
||||
# include "config-linux.h"
|
||||
#endif
|
||||
|
||||
-#if defined(__sun__) && defined(__svr4__)
|
||||
+#if defined(__sun__) && defined(__svr4__) || defined(__HAIKU__)
|
||||
# include "config-linux.h"
|
||||
# undef HAVE_IOCTL_SIOCGIFADDR
|
||||
#endif
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From ed1c1caba42116b9a215ea875817c70f58bf1a9a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
||||
Date: Sat, 18 May 2019 19:17:40 +0200
|
||||
Subject: [PATCH 2/3] Haiku is POSIX enough
|
||||
|
||||
---
|
||||
src/host/premake.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/host/premake.h b/src/host/premake.h
|
||||
index f491c30..bcaff82 100644
|
||||
--- a/src/host/premake.h
|
||||
+++ b/src/host/premake.h
|
||||
@@ -43,7 +43,7 @@
|
||||
#define PLATFORM_STRING "windows"
|
||||
#endif
|
||||
|
||||
-#define PLATFORM_POSIX (PLATFORM_LINUX || PLATFORM_BSD || PLATFORM_MACOSX || PLATFORM_SOLARIS)
|
||||
+#define PLATFORM_POSIX (PLATFORM_LINUX || PLATFORM_BSD || PLATFORM_MACOSX || PLATFORM_SOLARIS || PLATFORM_HAIKU)
|
||||
|
||||
|
||||
/* Pull in platform-specific headers required by built-in functions */
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From 3201663da8e2f694c9a357eb749ed58c6eb3acb8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
||||
Date: Sat, 18 May 2019 20:34:05 +0200
|
||||
Subject: [PATCH 3/3] Fix Haiku build (link proper libs & -rdynamic)
|
||||
|
||||
m, dl & rt are included in libroot, and not available separately.
|
||||
Well we do have a fake libm but not the other ones.
|
||||
|
||||
We also need to link to libnetwork, and libbsd for getpass.
|
||||
|
||||
Building on haiku will require make HAIKU=1
|
||||
(these should really be detected properly)
|
||||
---
|
||||
build/gmake.unix/Premake5.make | 15 +++++++++++----
|
||||
1 file changed, 11 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/build/gmake.unix/Premake5.make b/build/gmake.unix/Premake5.make
|
||||
index 1cd63f7..c006eb4 100644
|
||||
--- a/build/gmake.unix/Premake5.make
|
||||
+++ b/build/gmake.unix/Premake5.make
|
||||
@@ -22,9 +22,9 @@ ifeq ($(config),release)
|
||||
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra
|
||||
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra -fno-stack-protector
|
||||
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||
- LIBS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a bin/Release/libmbedtls-lib.a -lm -ldl -lrt
|
||||
+ LIBS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a bin/Release/libmbedtls-lib.a
|
||||
LDDEPS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a bin/Release/libmbedtls-lib.a
|
||||
- ALL_LDFLAGS += $(LDFLAGS) -s -rdynamic
|
||||
+ ALL_LDFLAGS += $(LDFLAGS) -s
|
||||
LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
|
||||
define PREBUILDCMDS
|
||||
endef
|
||||
@@ -49,9 +49,9 @@ ifeq ($(config),debug)
|
||||
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra
|
||||
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra
|
||||
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||
- LIBS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a bin/Debug/libmbedtls-lib.a -lm -ldl -lrt
|
||||
+ LIBS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a bin/Debug/libmbedtls-lib.a
|
||||
LDDEPS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a bin/Debug/libmbedtls-lib.a
|
||||
- ALL_LDFLAGS += $(LDFLAGS) -rdynamic
|
||||
+ ALL_LDFLAGS += $(LDFLAGS)
|
||||
LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
|
||||
define PREBUILDCMDS
|
||||
endef
|
||||
@@ -64,6 +64,13 @@ all: prebuild prelink $(TARGET)
|
||||
|
||||
endif
|
||||
|
||||
+ifdef HAIKU
|
||||
+ LIBS += -lnetwork -lbsd
|
||||
+else
|
||||
+ LIBS += -lm -ldl -lrt
|
||||
+ ALL_LDFLAGS += -rdynamic
|
||||
+endif
|
||||
+
|
||||
OBJECTS := \
|
||||
$(OBJDIR)/buffered_io.o \
|
||||
$(OBJDIR)/criteria_matches.o \
|
||||
--
|
||||
2.21.0
|
||||
|
||||
46
dev-util/premake/premake-5.0.0~alpha13.recipe
Normal file
46
dev-util/premake/premake-5.0.0~alpha13.recipe
Normal file
@@ -0,0 +1,46 @@
|
||||
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"
|
||||
COPYRIGHT="2012 Industrious One, LLC"
|
||||
LICENSE="BSD (2-clause)"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/premake/premake-core/releases/download/v5.0.0-alpha13/premake-5.0.0-alpha13-src.zip"
|
||||
CHECKSUM_SHA256="b28d2d1f4dc7efa8bdfe20d331787461a58a0da558adac0aef939ad006019209"
|
||||
SOURCE_DIR="premake-5.0.0-alpha13"
|
||||
PATCHES="premake-5.0.0~alpha13.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
premake$secondaryArchSuffix = $portVersion
|
||||
cmd:premake5$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd build/gmake.unix
|
||||
make config=release HAIKU=1
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd bin/release
|
||||
mkdir -p $binDir
|
||||
install -m 0755 premake5 $binDir
|
||||
}
|
||||
Reference in New Issue
Block a user