62 lines
2.5 KiB
Text
62 lines
2.5 KiB
Text
$NetBSD: patch-aa,v 1.3 2015/12/29 23:34:50 dholland Exp $
|
|
|
|
Configure for pkgsrc.
|
|
Install by Lua version so multiple versions can coexist.
|
|
DESTDIR support.
|
|
|
|
--- Makefile.orig 2012-02-10 09:50:23.000000000 +0000
|
|
+++ Makefile
|
|
@@ -9,11 +9,11 @@ PLAT= none
|
|
|
|
# Where to install. The installation starts in the src and doc directories,
|
|
# so take care if INSTALL_TOP is not an absolute path.
|
|
-INSTALL_TOP= /usr/local
|
|
+INSTALL_TOP= ${PREFIX}
|
|
INSTALL_BIN= $(INSTALL_TOP)/bin
|
|
-INSTALL_INC= $(INSTALL_TOP)/include
|
|
+INSTALL_INC= $(INSTALL_TOP)/include/lua-5.1
|
|
INSTALL_LIB= $(INSTALL_TOP)/lib
|
|
-INSTALL_MAN= $(INSTALL_TOP)/man/man1
|
|
+INSTALL_MAN= $(INSTALL_TOP)/${PKGMANDIR}/man1
|
|
#
|
|
# You probably want to make INSTALL_LMOD and INSTALL_CMOD consistent with
|
|
# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h (and also with etc/lua.pc).
|
|
@@ -24,7 +24,7 @@ INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
|
|
# may have to run ranlib on the installed liblua.a (do "make ranlib").
|
|
INSTALL= install -p
|
|
INSTALL_EXEC= $(INSTALL) -m 0755
|
|
-INSTALL_DATA= $(INSTALL) -m 0644
|
|
+#INSTALL_DATA= $(INSTALL) -m 0644
|
|
#
|
|
# If you don't have install you can use cp instead.
|
|
# INSTALL= cp -p
|
|
@@ -41,9 +41,9 @@ RANLIB= ranlib
|
|
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
|
|
|
|
# What to install.
|
|
-TO_BIN= lua luac
|
|
+TO_BIN= lua5.1 luac5.1
|
|
TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
|
|
-TO_LIB= liblua.a
|
|
+TO_LIB= liblua5.1.la
|
|
TO_MAN= lua.1 luac.1
|
|
|
|
# Lua version and release.
|
|
@@ -59,11 +59,12 @@ test: dummy
|
|
src/lua test/hello.lua
|
|
|
|
install: dummy
|
|
- cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
|
|
- cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
|
|
- cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
|
|
- cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
|
|
- cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
|
|
+ cd src && $(MKDIR) $(DESTDIR)$(INSTALL_BIN) $(DESTDIR)$(INSTALL_INC) $(DESTDIR)$(INSTALL_LIB) $(DESTDIR)$(INSTALL_MAN) $(DESTDIR)$(INSTALL_LMOD) $(DESTDIR)$(INSTALL_CMOD)
|
|
+ cd src && $(LIBTOOL) --tag=CC --mode=install $(BSD_INSTALL_PROGRAM) $(TO_BIN) $(DESTDIR)$(INSTALL_BIN)
|
|
+ cd src && $(INSTALL_DATA) $(TO_INC) $(DESTDIR)$(INSTALL_INC)
|
|
+ cd src && $(LIBTOOL) --tag=CC --mode=install $(BSD_INSTALL_LIB) $(TO_LIB) $(DESTDIR)$(INSTALL_LIB)
|
|
+ cd doc && $(INSTALL_DATA) lua.1 $(DESTDIR)$(INSTALL_MAN)/lua5.1.1
|
|
+ cd doc && $(INSTALL_DATA) luac.1 $(DESTDIR)$(INSTALL_MAN)/luac5.1.1
|
|
|
|
ranlib:
|
|
cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB)
|