Page MenuHomeFreeBSD

D14709.id45300.diff
No OneTemporary

D14709.id45300.diff

Index: Makefile
===================================================================
--- /dev/null
+++ Makefile
@@ -0,0 +1,131 @@
+# Created by: Russell Haley <russ.haley@gmail.com>, Andrew Gierth <andrew@tao11.riddles.org.uk>
+# Original port by: GreenDog <fiziologus@gmail.com>
+# Date: 2018-03-14
+# $FreeBSD$
+
+PORTNAME= lua
+PORTVERSION= 5.4.0
+PORTREVISION= 2
+CATEGORIES= lang
+MASTER_SITES= https://www.lua.org/work/
+DISTVERSIONSUFFIX=-work2
+PKGNAMESUFFIX= 54
+
+MAINTAINER= russ.haley@gmail.com
+COMMENT= Small, embeddable scripting language providing easy access to C code
+
+LICENSE= MIT
+
+LUA_VER= 5.4
+USE_LDCONFIG= yes
+
+# Overriding __MAKE_CONF makes sure that we don't re-parse
+# /etc/make.conf during do-build, which would jeopardize the build
+# if, for instance, the user set CFLAGS=mumble
+# NOTE: /etc/make.conf is read BEFORE Makefile, so we already
+# have its settings when we get here.
+# See http://wiki.freebsd.org/MatthiasAndree/LuaLessonsLearnt
+MAKE_ARGS= __MAKE_CONF=${NONEXISTENT}
+
+BUILD_WRKSRC= ${WRKSRC}/src
+
+# Source, destination, and filenames to copy for the DOCS option
+# (automatically added to pkg-plist if DOCS is set)
+# We override DOCSDIR to get a per-version subdir.
+DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
+PORTDOCS= *.html *.css *.gif *.png
+BUILD_WRKDOC= ${WRKSRC}/doc
+
+LUA_PREFIX?= ${PREFIX}
+
+# 2018-03-17: AG - These should match lua.mk, but we can't include that here
+LUA_CMD?= ${PORTNAME}${PKGNAMESUFFIX}
+LUAC_CMD?= ${PORTNAME}c${PKGNAMESUFFIX}
+LUA_INCDIR?= ${LUA_PREFIX}/include/${PORTNAME}${PKGNAMESUFFIX}
+LUA_LIBDIR?= ${LUA_PREFIX}/lib
+
+LUA_LIB_STATIC=lib${PORTNAME}-${LUA_VER}.a
+LUA_LIB_SHARED=lib${PORTNAME}-${LUA_VER}.so
+LUA_PC_FILE=${PORTNAME}-${LUA_VER}.pc
+# using the "bsd" target rather than "freebsd" saves patching out the
+# assumption of using base libedit in order to make it configurable. "bsd"
+# is "generic" plus the POSIX and DLOPEN options, plus -Wl,-E at link time;
+# it doesn't set CC either, which makes it easier for us to control that too.
+ALL_TARGET=bsd
+
+OPTIONS_DEFAULT+= LIBEDIT DOCS
+
+OPTIONS_GROUP= DOCSGROUP
+OPTIONS_GROUP_DOCSGROUP= DOCS
+DOCSGROUP_DESC= Documentation options
+DOCS_DESC= Install language and API reference (HTML, ~400kB)
+
+OPTIONS_SINGLE= EDIT
+EDIT_DESC= Interactive command-line editing
+OPTIONS_SINGLE_EDIT=EDITNONE LIBEDIT LIBEDIT_PORT READLINE
+
+EDITNONE_DESC= No command-line editing
+LIBEDIT_DESC= Use base system libedit (recommended)
+LIBEDIT_PORT_DESC=Use libedit from ports
+READLINE_DESC= Use GNU Readline from ports
+
+LIBEDIT_CPPFLAGS=-DLUA_USE_READLINE -I/usr/include/edit
+LIBEDIT_LIBS=-ledit
+
+LIBEDIT_PORT_USES=libedit
+# USES=libedit adds -I/usr/local/include -L/usr/local/lib itself
+LIBEDIT_PORT_CPPFLAGS=-DLUA_USE_READLINE
+LIBEDIT_PORT_LIBS=-ledit
+
+READLINE_USES=readline
+# USES=readline adds -I/usr/local/include -L/usr/local/lib itself
+READLINE_CPPFLAGS=-DLUA_USE_READLINE
+READLINE_LIBS=-lreadline
+
+CFLAGS+= -fPIC
+
+WITHOUT_NO_STRICT_ALIASING=yes
+
+MAKE_ARGS += CC="${CC}" \
+ MYCFLAGS="${CPPFLAGS} ${CFLAGS}" \
+ MYLDFLAGS="${LDFLAGS}" \
+ MYLIBS="${LIBS}" \
+ LUA_T=${LUA_CMD} \
+ LUAC_T=${LUAC_CMD} \
+ LUA_A=${LUA_LIB_STATIC} \
+ LUA_SO=${LUA_LIB_SHARED} \
+ LUA_SONAME=${LUA_LIB_SHARED} \
+ TO_BIN="${LUA_CMD} ${LUAC_CMD}" \
+ TO_LIB="${LUA_LIB_SHARED} ${LUA_LIB_STATIC}" \
+ INSTALL_TOP=${STAGEDIR}${PREFIX} \
+ INSTALL_INC=${STAGEDIR}${LUA_INCDIR} \
+ INSTALL_EXEC="${INSTALL_PROGRAM}"
+
+SUB_FILES= ${LUA_PC_FILE}
+SUB_LIST= version=${PORTVERSION} \
+ includedir=${LUA_INCDIR} \
+ libdir=${LUA_LIBDIR} \
+ soname=${PORTNAME}-${LUA_VER}
+
+post-patch:
+ @${REINPLACE_CMD} -e "/LUA_ROOT/s,/usr/local,${LUA_PREFIX}," \
+ ${WRKSRC}/src/luaconf.h
+
+post-patch-LIBEDIT_PORT-on:
+ @${REINPLACE_CMD} -e "s,readline/,editline/,g ; \
+ /history\.h/d" ${WRKSRC}/src/lua.c
+
+post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${LUA_LIB_SHARED}
+ ${MV} ${STAGEDIR}${PREFIX}/man/man1/lua.1 \
+ ${STAGEDIR}${PREFIX}/man/man1/${LUA_CMD}.1
+ ${MV} ${STAGEDIR}${PREFIX}/man/man1/luac.1 \
+ ${STAGEDIR}${PREFIX}/man/man1/${LUAC_CMD}.1
+ ${INSTALL_DATA} ${WRKDIR}/${LUA_PC_FILE} \
+ ${STAGEDIR}${PREFIX}/libdata/pkgconfig
+
+post-install-DOCS-on:
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_MAN} ${BUILD_WRKDOC}/* ${STAGEDIR}${DOCSDIR}/.
+
+.include <bsd.port.mk>
Index: distinfo
===================================================================
--- /dev/null
+++ distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1529352704
+SHA256 (lua-5.4.0-work2.tar.gz) = 68b7e8f1ff561b9a7e1c29de26ff99ac2a704773c0965a4fe1800b7657d5a057
+SIZE (lua-5.4.0-work2.tar.gz) = 325297
Index: files/lua-5.4.pc.in
===================================================================
--- /dev/null
+++ files/lua-5.4.pc.in
@@ -0,0 +1,10 @@
+version=%%version%%
+libdir=%%libdir%%
+includedir=%%includedir%%
+soname=%%soname%%
+
+Name: Lua
+Description: A small embeddable language
+Version: ${version}
+Libs: -L${libdir} -l${soname} -lm
+Cflags: -I${includedir}
Index: files/patch-src_Makefile
===================================================================
--- /dev/null
+++ files/patch-src_Makefile
@@ -0,0 +1,27 @@
+--- src/Makefile.orig 2018-04-07 20:16:26.000000000 +0000
++++ src/Makefile
+@@ -35,12 +35,13 @@
+
+ LUA_T= lua
+ LUA_O= lua.o
++LUA_SO= liblua.so
+
+ LUAC_T= luac
+ LUAC_O= luac.o
+
+ ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
+-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
++ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
+ ALL_A= $(LUA_A)
+
+ # Targets start here.
+@@ -52,6 +53,9 @@
+
+ a: $(ALL_A)
+
++$(LUA_SO): $(CORE_O) $(LIB_O)
++ $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(MYLDFLAGS) -shared -Wl,-soname=$(LUA_SONAME) $?
++
+ $(LUA_A): $(BASE_O)
+ $(AR) $@ $(BASE_O)
+ $(RANLIB) $@
Index: pkg-descr
===================================================================
--- /dev/null
+++ pkg-descr
@@ -0,0 +1,21 @@
+Lua is a programming language originally designed for extending applications,
+but also frequently used as a general-purpose, stand-alone language. Lua
+combines simple procedural syntax (similar to Pascal) with powerful data
+description constructs based on associative arrays and extensible semantics.
+Lua is dynamically typed, interpreted from bytecodes, and has automatic memory
+management with garbage collection, making it ideal for configuration,
+scripting, and rapid prototyping.
+
+A fundamental concept in the design of Lua is to provide meta-mechanisms for
+implementing features, instead of providing a host of features directly in
+the language. For example, although Lua is not a pure object-oriented
+language, it does provide meta-mechanisms for implementing classes and
+inheritance. Lua's meta-mechanisms bring an economy of concepts and keep the
+language small, while allowing the semantics to be extended in unconventional
+ways. Extensible semantics is a distinguishing feature of Lua.
+
+Lua is implemented as a small library of C functions, written in ANSI C, and
+compiles unmodified in all known platforms. The implementation goals are
+simplicity, efficiency, portability, and low embedding cost.
+
+WWW: http://www.lua.org/
Index: pkg-plist
===================================================================
--- /dev/null
+++ pkg-plist
@@ -0,0 +1,14 @@
+bin/lua54
+bin/luac54
+include/lua54/lauxlib.h
+include/lua54/lua.h
+include/lua54/lua.hpp
+include/lua54/luaconf.h
+include/lua54/lualib.h
+lib/liblua-5.4.a
+lib/liblua-5.4.so
+libdata/pkgconfig/lua-5.4.pc
+man/man1/lua54.1.gz
+man/man1/luac54.1.gz
+@dir lib/lua/5.4
+@dir %%DATADIR%%/5.4

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 2, 3:07 AM (15 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27450085
Default Alt Text
D14709.id45300.diff (7 KB)

Event Timeline