1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-11 07:22:22 +00:00

Add premake.

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!

PR:		ports/64735
Submitted by:	michael johnson <ahze@ahze.net>
This commit is contained in:
Pav Lucistnik 2004-03-28 11:45:56 +00:00
parent 71c26bead8
commit 0a32dd175f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=105490
6 changed files with 138 additions and 0 deletions

View File

@ -981,6 +981,7 @@
SUBDIR += powerpc-rtems-objc
SUBDIR += ppl
SUBDIR += prcs
SUBDIR += premake
SUBDIR += privman
SUBDIR += projectcenter.app
SUBDIR += prototype

28
devel/premake/Makefile Normal file
View File

@ -0,0 +1,28 @@
# New ports collection makefile for: premake
# Date created: 2004-03-25
# Whom: michael johnson <ahze@ahze.net>
#
# $FreeBSD$
#
PORTNAME= premake
PORTVERSION= 1.6.1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= premake
DISTNAME= ${PORTNAME}-src-${PORTVERSION}
MAINTAINER= ahze@ahze.net
COMMENT= Writes build scripts
USE_ZIP= yes
WRKSRC= ${WRKDIR}/Premake-${PORTVERSION}
USE_GMAKE= yes
PLIST_FILES= bin/premake
USE_REINPLACE= yes
MAKE_ENV= CC="${CC}" CFLAGS="${CFLAGS}"
do-install:
@${INSTALL} ${WRKSRC}/premake ${PREFIX}/bin
.include <bsd.port.mk>

2
devel/premake/distinfo Normal file
View File

@ -0,0 +1,2 @@
MD5 (premake-src-1.6.1.zip) = 3833bcf3ecd49b8bf90a4a431e825a82
SIZE (premake-src-1.6.1.zip) = 140011

View File

@ -0,0 +1,58 @@
--- Premake.make.orig Tue Feb 24 21:49:57 2004
+++ Premake.make Thu Mar 25 21:03:11 2004
@@ -8,13 +8,13 @@
TARGET =
ifeq ($(CONFIG),Debug)
- CFLAGS += --no-rtti --no-exceptions
- LDFLAGS += -ldl
+ CFLAGS += --no-exceptions
+ LDFLAGS +=
TARGET = premake
endif
ifeq ($(CONFIG),Release)
- CFLAGS += --no-rtti --no-exceptions -Os
- LDFLAGS += -ldl
+ CFLAGS += --no-exceptions -Os
+ LDFLAGS +=
TARGET = premake
endif
CXXFLAGS=$(CFLAGS)
@@ -23,37 +23,21 @@
-@if [ ! -d obj ]; then mkdir obj; fi
@echo $(notdir $<)
@$(CXX) $(CXXFLAGS) -MD -o $@ -c $<
- @cp obj/$*.d obj/$*.P; \
- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
- -e '/^$$/ d' -e 's/$$/ :/' < obj/$*.d >> obj/$*.P; \
- rm -f obj/$*.d
obj/%.o : %.cpp
-@if [ ! -d obj ]; then mkdir obj; fi
@echo $(notdir $<)
@$(CXX) $(CXXFLAGS) -MD -o $@ -c $<
- @cp obj/$*.d obj/$*.P; \
- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
- -e '/^$$/ d' -e 's/$$/ :/' < obj/$*.d >> obj/$*.P; \
- rm -f obj/$*.d
obj/%.o : %.cxx
-@if [ ! -d obj ]; then mkdir obj; fi
@echo $(notdir $<)
@$(CXX) $(CXXFLAGS) -MD -o $@ -c $<
- @cp obj/$*.d obj/$*.P; \
- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
- -e '/^$$/ d' -e 's/$$/ :/' < obj/$*.d >> obj/$*.P; \
- rm -f obj/$*.d
obj/%.o : %.c
-@if [ ! -d obj ]; then mkdir obj; fi
@echo $(notdir $<)
@$(CC) $(CFLAGS) -MD -o $@ -c $<
- @cp obj/$*.d obj/$*.P; \
- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
- -e '/^$$/ d' -e 's/$$/ :/' < obj/$*.d >> obj/$*.P; \
- rm -f obj/$*.d
OBJECTS = \
obj/premake.o \

View File

@ -0,0 +1,44 @@
--- Src/posix.c.orig Tue Feb 24 21:49:57 2004
+++ Src/posix.c Thu Mar 25 21:10:21 2004
@@ -20,6 +20,9 @@
#if defined(__linux__)
const char* osIdent = "linux";
+#endif
+#if defined(__FreeBSD__)
+const char* osIdent = "linux";
#else
#error Unknown OS type.
#endif
@@ -87,31 +90,7 @@
return 1;
}
- FILE* file = fopen("/etc/ld.so.conf", "rt");
- if (file == NULL) return 0;
-
- while (!feof(file))
- {
- // Read a line and trim off any trailing whitespace
- char linebuffer[2048];
- char* ptr;
-
- fgets(buffer, 2048, file);
- ptr = &buffer[strlen(buffer) - 1];
- while (isspace(*ptr))
- *(ptr--) = '\0';
-
- if (findLib(lib, buffer))
- {
- fclose(file);
- return 1;
- }
- }
-
- fclose(file);
- return 0;
}
-
//-----------------------------------------------------------------------------
int plat_generateUUID(char* uuid)

5
devel/premake/pkg-descr Normal file
View File

@ -0,0 +1,5 @@
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!
WWW: http://premake.sourceforge.net