This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

luajit, lgi: Change default CPATH

  • Loading branch information...
TingPing committed Apr 9, 2016
1 parent b184e53 commit c8847ff886bc08c9e6cabe16eca6479c485f7858
Showing with 12 additions and 8 deletions.
  1. +3 −3 lgi/lgi/Makefile-msvc.mak
  2. +9 −5 luajit/lua-default-path.patch
@@ -7,7 +7,7 @@ SOURCES = \
object.c \
record.c

DLL = lgi.dll
DLL = corelgilua51.dll

LUA_CFLAGS = /I$(PREFIX)\include\luajit-2.0
GLIB_CFLAGS = /I$(PREFIX)\include\glib-2.0 /I$(PREFIX)\lib\glib-2.0\include
@@ -23,8 +23,8 @@ $(DLL): $(SOURCES)
link /nologo /DLL /OUT:$(DLL) .\*.obj /libpath:$(PREFIX)\lib $(LUA_LIBS) $(GLIB_LIBS) $(GIR_LIBS) $(FFI_LIBS)

install: $(DLL)
mkdir $(DESTDIR)\bin
copy $(DLL) $(DESTDIR)\bin
mkdir $(DESTDIR)\lib\lua\lgi
copy $(DLL) $(DESTDIR)\lib\lua\lgi

mkdir $(DESTDIR)\share\lua\lgi\override
copy ..\lgi.lua $(DESTDIR)\share\lua
@@ -1,17 +1,21 @@
--- luajit.orig/src/luaconf.h 2015-05-14 11:30:00.000000000 -0700
+++ luajit/src/luaconf.h 2016-04-07 16:41:19.903401700 -0700
@@ -18,10 +18,11 @@
@@ -18,12 +18,14 @@
** In Windows, any exclamation mark ('!') in the path is replaced by the
** path of the directory of the executable file of the current process.
*/
-#define LUA_LDIR "!\\lua\\"
-#define LUA_CDIR "!\\"
+#define LUA_LDIR1 "!\\share\\lua\\"
+#define LUA_LDIR2 "!\\..\\share\\lua\\"
#define LUA_CDIR "!\\"
-#define LUA_PATH_DEFAULT \
+#define LUA_CDIR1 "!\\lib\\lua\\"
+#define LUA_CDIR2 "!\\..\\lib\\lua\\"
#define LUA_PATH_DEFAULT \
- ".\\?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;"
+#define LUA_PATH_DEFAULT \
+ ".\\?.lua;" LUA_LDIR1"?.lua;" LUA_LDIR1"?\\init.lua;" LUA_LDIR2"?.lua;" LUA_LDIR2"?\\init.lua;"
#define LUA_CPATH_DEFAULT \
".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
- ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
+ ".\\?.dll;" LUA_CDIR1"?.dll;" LUA_CDIR1"loadall.dll;" LUA_CDIR2"?.dll;" LUA_CDIR2"loadall.dll;"
#else
/*
** Note to distribution maintainers: do NOT patch the following lines!

2 comments on commit c8847ff

@nacho

This comment has been minimized.

Copy link
Contributor

nacho replied Apr 10, 2016

@TingPing The commit message does not say why you need to change this. Should this go upstream? Is there an upstream bug report for this?

@TingPing

This comment has been minimized.

Copy link
Member Author

TingPing replied Apr 10, 2016

@nacho Changing the lua paths are pretty common practice, we just do this to fit in with our directories layout.

Please sign in to comment.