It was thus said that the Great Hisham once stated: > >> > >> This expands to `-Ddummy -std=c99` in the compilation lines and does > >> what you expect... > > > > I hate to say that it didn't work. > > It didn't? I just tested it here and it seems to pass the flag. Just > to be clear, this 'defines' table is supposed to be inside each > module's entry in a builtin-type build section, like this: > > build = { > type = "builtin", > modules = { > foo = { > sources = { "foo.c" }, > defines = { "dummy -std=c99" }, > }, > re = "re.lua" > } > } > > Running that, I get the following line here: > > gcc -O2 -fPIC -I/Programs/Lua/Current/include -c foo.c -o foo.o -Ddummy > -std=c99
package = "org.conman.uuid" version = "1.2.0-1" source = { url = "git://github.com/spc476/SPCUUID.git", tag = "1.2.0" } supported_platforms = { "unix" } description = { homepage = "http://github.com/spc476/SPCUUID.git", maintainer = "Sean Conner <s...@conman.org>", license = "LGPL", summary = "A Lua module to generate UUIDs", detailed = [[ org.conman.uuid provides functionality to generate UUIDs based on RFC-4122. It supports MAC/timed based UUIDs (v1), name-based UUIDs (v3/MD5,v5/SHA-1) and random UUIDs (v4). ]] } dependencies = { "lua ~> 5.1" } build = { type = "builtin", modules = { ['org.conman.uuid'] = { defines = { "dummy -std=c99 "}, sources = { 'src/luauuid.c' , 'src/uuid_ns_dns.c', 'src/uuid_ns_null.c', 'src/uuid_ns_oid.c', 'src/uuid_ns_url.c', 'src/uuid_ns_x500.c', 'src/uuidlib_cmp.c', 'src/uuidlib_parse.c', 'src/uuidlib_toa.c', 'src/uuidlib_v1.c', 'src/uuidlib_v2.c', 'src/uuidlib_v3.c', 'src/uuidlib_v4.c', 'src/uuidlib_v5.c' } } } } Looks good to me, but ... [spc]lucy:/tmp>luarocks install org.conman.uuid-1.2.0-1.rockspec Using org.conman.uuid-1.2.0-1.rockspec... switching to 'build' mode Cloning into 'SPCUUID'... remote: Counting objects: 28, done. remote: Compressing objects: 100% (26/26), done. remote: Total 28 (delta 14), reused 10 (delta 2) Receiving objects: 100% (28/28), 15.13 KiB, done. Resolving deltas: 100% (14/14), done. Note: checking out 'cc068e473d6c06f4a75137ca82c5699ed387f401'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b new_branch_name gcc -O2 -fPIC -I/usr/local/include -c src/luauuid.c -o src/luauuid.o -Ddummy -std=c99 In file included from src/luauuid.c:38: src/uuid.h:84: error: redefinition of parameter 'restrict' src/uuid.h:84: error: previous definition of 'restrict' was here Error: Build error: Failed compiling object src/luauuid.o [spc]lucy:/tmp> Yet, if I run that command line by hand (cut-n-paste the command line): [spc]lucy:~/source/uuid>gcc -O2 -fPIC -I/usr/local/include -c src/luauuid.c -o src/luauuid.o -Ddummy -std=c99 [spc]lucy:~/source/uuid> "restrict" is a C99ism, so the defines line isn't working (or else gcc wouldn't complain about "restrict"). -spc ------------------------------------------------------------------------------ Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with <2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1 _______________________________________________ Luarocks-developers mailing list Luarocks-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/luarocks-developers