Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jun 2014 23:51:02 -0700
From:      Sergei G <sergeig.public@gmail.com>
To:        vmagerya@gmail.com, ports@FreeBSD.org
Subject:   Patch for premake 4.4 beta 5 from premake 4
Message-ID:  <53A91FD6.9030205@gmail.com>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------080107000309050004010308
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

I had to update Premake 4 port (4.3) to 4.4 beta 5 on FreeBSD 
10.0-RELEASE #0.

I included patch file with changes applied to Premake 4 port. The 
changes consist of:

 1. updating version and addition of beta version in Makefile
 2. switch to clang compiler in Makefile
 3. update of download file signatures
 4. removal of 2 patch files, because the files appear to be obsolete
    and I could not figure out the proper fix. Keeping both patch files
    resulted in error during premake execution.

I was successful for my small scope of compiling Box2D, but I observed a 
couple of issues with my upgrade.

3 regression tests failed (it appears due to at least one missing patch 
file):

cd /usr/ports/devel/premake4.4/work/premake-4.4-beta5/tests && ./test
Building configurations...
Running action 'test'...
os.findlib_FindSystemLib: [string "function os.executef(cmd, 
...)..."]:12: attempt to call method 'lines' (a nil value)
os.findlib_FailsOnBadLibName: [string "function os.executef(cmd, 
...)..."]:12: attempt to call method 'lines' (a nil value)
premake_command.valueIsSet: 
...remake-4.4-beta5/tests/base/test_premake_command.lua:13: expected 
/usr/ports/devel/premake4.4/work/premake-4.4-beta5/bin/debug/premake4 
but was 
/usr/ports/devel/premake4.4/work/premake-4.4-beta5/bin/release/premake4
running time : 1.9140625
713 tests passed, 3 failed
Done.

Once I installed premake I observed that it generated Makefile with gcc 
in it, instead of clang. Should switch to clang be applied at premake or 
Box2D project level?


Thanks

--------------080107000309050004010308
Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0";
 name="premake4.3-4.4.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="premake4.3-4.4.patch"

diff -Naur premake4/Makefile premake4.4/Makefile
--- premake4/Makefile	2014-01-24 16:41:42.000000000 -0800
+++ premake4.4/Makefile	2014-06-23 23:33:07.000000000 -0700
@@ -2,10 +2,11 @@
 # $FreeBSD: head/devel/premake4/Makefile 340969 2014-01-25 00:41:42Z bap=
t $
=20
 PORTNAME=3D	premake4
-PORTVERSION=3D	4.3
+PORTVERSION=3D	4.4
+BETAVERSION=3D    -beta5
 CATEGORIES=3D	devel
 MASTER_SITES=3D	SF/premake/Premake/${PORTVERSION}
-DISTNAME=3D	premake-${PORTVERSION}-src
+DISTNAME=3D	premake-${PORTVERSION}${BETAVERSION}-src
 EXTRACT_SUFX=3D	.zip
=20
 MAINTAINER=3D	vmagerya@gmail.com
@@ -13,7 +14,7 @@
=20
 OPTIONS_DEFINE=3D	DOCS
=20
-WRKSRC=3D		${WRKDIR}/premake-${PORTVERSION}
+WRKSRC=3D		${WRKDIR}/premake-${PORTVERSION}${BETAVERSION}
 BUILD_WRKSRC=3D	${WRKSRC}/build/gmake.unix
=20
 USES=3D		gmake
@@ -24,7 +25,7 @@
 PORTDOCS=3D	CHANGES.txt LICENSE.txt README.txt
=20
 post-patch:
-	${REINPLACE_CMD} -e 's|-ldl||' ${BUILD_WRKSRC}/Premake4.make
+	${REINPLACE_CMD} -e 's|-ldl||' -e 's|CC =3D gcc|CC =3D clang|' -e 's|CX=
X =3D g\+\+|CXX =3D clang++|' ${BUILD_WRKSRC}/Premake4.make
 	${REINPLACE_CMD} -e 's|debug|release|' ${WRKSRC}/tests/test
=20
 do-install:
diff -Naur premake4/distinfo premake4.4/distinfo
--- premake4/distinfo	2014-01-22 07:30:13.000000000 -0800
+++ premake4.4/distinfo	2014-06-23 22:01:46.000000000 -0700
@@ -1,2 +1,2 @@
-SHA256 (premake-4.3-src.zip) =3D 36536490f8928d8ecde135da80cd8b751ea5beb=
e50cabba5c0de49cd41cb2780
-SIZE (premake-4.3-src.zip) =3D 514366
+SHA256 (premake-4.4-beta5-src.zip) =3D 0fa1ed02c5229d931e87995123cdb11d4=
4fcc8bd99bba8e8bb1bbc0aaa798161
+SIZE (premake-4.4-beta5-src.zip) =3D 596883
diff -Naur premake4/files/patch-src-base-os.lua premake4.4/files/patch-sr=
c-base-os.lua
--- premake4/files/patch-src-base-os.lua	2014-01-22 09:40:44.000000000 -0=
800
+++ premake4.4/files/patch-src-base-os.lua	1969-12-31 16:00:00.000000000 =
-0800
@@ -1,17 +0,0 @@
---- src/base/os.lua.orig	2012-01-31 15:40:25.000000000 +0200
-+++ src/base/os.lua	2012-01-31 15:42:16.000000000 +0200
-@@ -33,14 +33,6 @@
- 			else
- 				formats =3D { "lib%s.so", "%s.so" }
- 				path =3D os.getenv("LD_LIBRARY_PATH") or ""
--=09
--				io.input("/etc/ld.so.conf")
--				if io.input() then
--					for line in io.lines() do
--						path =3D path .. ":" .. line
--					end
--					io.input():close()
--				end
- 			end
- 		=09
- 			table.insert(formats, "%s")=09
diff -Naur premake4/files/patch-src-host-scripts.c premake4.4/files/patch=
-src-host-scripts.c
--- premake4/files/patch-src-host-scripts.c	2014-01-22 09:40:44.000000000=
 -0800
+++ premake4.4/files/patch-src-host-scripts.c	1969-12-31 16:00:00.0000000=
00 -0800
@@ -1,5 +0,0 @@
---- src/host/scripts.c.orig	2010-11-16 13:29:13.000000000 +0200
-+++ src/host/scripts.c	2012-01-31 16:05:26.000000000 +0200
-@@ -7 +7 @@
--	"function os.executef(cmd, ...)\ncmd =3D string.format(cmd, unpack(arg=
))\nreturn os.execute(cmd)\nend\nfunction os.findlib(libname)\nlocal path=
, formats\nif os.is(\"windows\") then\nformats =3D { \"%s.dll\", \"%s\" }=
\npath =3D os.getenv(\"PATH\")\nelse\nif os.is(\"macosx\") then\nformats =
=3D { \"lib%s.dylib\", \"%s.dylib\" }\npath =3D os.getenv(\"DYLD_LIBRARY_=
PATH\")\nelse\nformats =3D { \"lib%s.so\", \"%s.so\" }\npath =3D os.geten=
v(\"LD_LIBRARY_PATH\") or \"\"\nio.input(\"/etc/ld.so.conf\")\nif io.inpu=
t() then\nfor line in io.lines() do\npath =3D path .. \":\" .. line\nend\=
nio.input():close()\nend\nend\ntable.insert(formats, \"%s\")\npath =3D (p=
ath or \"\") .. \":/lib:/usr/lib:/usr/local/lib\"\nend\nfor _, fmt in ipa=
irs(formats) do\nlocal name =3D string.format(fmt, libname)\nlocal result=
 =3D os.pathsearch(name, path)\nif result then return result end\nend\nen=
d\nfunction os.get()\nreturn _OPTIONS.os or _OS\nend\nfunction os.is(id)\=
nreturn (os.get():lower() =3D=3D id:lower())\nend\nlocal function domatch=
(result, mask, wantfiles)\nif mas"
-+	"function os.executef(cmd, ...)\ncmd =3D string.format(cmd, unpack(arg=
))\nreturn os.execute(cmd)\nend\nfunction os.findlib(libname)\nlocal path=
, formats\nif os.is(\"windows\") then\nformats =3D { \"%s.dll\", \"%s\" }=
\npath =3D os.getenv(\"PATH\")\nelse\nif os.is(\"macosx\") then\nformats =
=3D { \"lib%s.dylib\", \"%s.dylib\" }\npath =3D os.getenv(\"DYLD_LIBRARY_=
PATH\")\nelse\nformats =3D { \"lib%s.so\", \"%s.so\" }\npath =3D os.geten=
v(\"LD_LIBRARY_PATH\") or \"\"\nend\ntable.insert(formats, \"%s\")\npath =
=3D (path or \"\") .. \":/lib:/usr/lib:/usr/local/lib\"\nend\nfor _, fmt =
in ipairs(formats) do\nlocal name =3D string.format(fmt, libname)\nlocal =
result =3D os.pathsearch(name, path)\nif result then return result end\ne=
nd\nend\nfunction os.get()\nreturn _OPTIONS.os or _OS\nend\nfunction os.i=
s(id)\nreturn (os.get():lower() =3D=3D id:lower())\nend\nlocal function d=
omatch(result, mask, wantfiles)\nif mas"

--------------080107000309050004010308--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53A91FD6.9030205>