You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.5 KiB
50 lines
1.5 KiB
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# Filename: package/.../lua/lua.conf |
|
# Copyright (C) 2008 - 2009 The OpenSDE Project |
|
# Copyright (C) 2004 - 2006 The T2 SDE Project |
|
# |
|
# More information can be found in the files COPYING and README. |
|
# |
|
# This program is free software; you can redistribute it and/or modify |
|
# it under the terms of the GNU General Public License as published by |
|
# the Free Software Foundation; version 2 of the License. A copy of the |
|
# GNU General Public License can be found in the file COPYING. |
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
# FIXME also build and install swig runtime |
|
|
|
# choose platform |
|
var_append makeopt ' ' 'linux' |
|
|
|
# packages support |
|
pkginstalled readline || var_append patchfiles ' ' "$confdir/no-readline.diff" |
|
|
|
# adjust installation path |
|
var_append makeinstopt ' ' "INSTALL_TOP=$root/$prefix" |
|
|
|
lua_conf() { |
|
local LUA_ROOT="${prefix:+/$prefix}/" |
|
local LUA_LDIR="LUA_ROOT \"${luadatadir#$LUA_ROOT}/\"" |
|
local LUA_CDIR="LUA_ROOT \"${lualibdir#$LUA_ROOT}/\"" |
|
|
|
LUA_ROOT="\"$LUA_ROOT\"" |
|
|
|
sed -i -e "s,^\(#define LUA_ROOT[ \t]\+\)[^ \t].*,\1$LUA_ROOT," \ |
|
-e "s,^\(#define LUA_LDIR[ \t]\+\)[^ \t].*,\1$LUA_LDIR," \ |
|
-e "s,^\(#define LUA_CDIR[ \t]\+\)[^ \t].*,\1$LUA_CDIR," \ |
|
src/luaconf.h |
|
} |
|
|
|
hook_add premake 3 lua_conf |
|
|
|
# create missing directories and copy documentation |
|
lua_postmake() { |
|
mkdir -p "$root$lualibdir" |
|
mkdir -p "$root$luadatadir" |
|
|
|
cp -v doc/* "$root$docdir" |
|
} |
|
|
|
hook_add postmake 3 lua_postmake
|
|
|