aisha <openbsd.po...@aisha.cc> writes:
> Hi, > I've attached an update for databases/lualdap to 1.3.0 and additionally have > changed it to use the FLAVORS for all three lua5.{1,2,3}. > Added a @pkgpath marker because it wasn't flavored previously. > I wanted this update because I'm using LDAP authentication with > Jitsi+Prosody, which I managed to get working using this. > > There's no tests that I'm able to run (it wants to setup openldap and then > run buster and other stuff) but its been able to verify my users in Jitsi, so > its something. Builds and some example code from their site runs! OK abieber@ > > Best, > Aisha > > diff --git a/databases/lualdap/Makefile b/databases/lualdap/Makefile > index b7bea6cd4be..fc1f65fab44 100644 > --- a/databases/lualdap/Makefile > +++ b/databases/lualdap/Makefile > @@ -1,16 +1,21 @@ > COMMENT = interface LDAP from lua > -DISTNAME= lualdap-1.1.0 > + > CATEGORIES = databases > > -MASTER_SITES = > http://files.luaforge.net/releases/lualdap/lualdap/LuaLDAP1.1.0/ > HOMEPAGE = http://www.keplerproject.org/lualdap/ > > +GH_ACCOUNT = lualdap > +GH_PROJECT = lualdap > +GH_TAGNAME = v1.3.0 > + > # MIT > PERMIT_PACKAGE= Yes > > MODULES= lang/lua > > -MODLUA_VERSION = 5.1 > +FLAVORS = lua51 lua52 lua53 > +FLAVOR ?= lua51 > + > USE_GMAKE = Yes > NO_TEST = Yes > CFLAGS += -DLDAP_DEPRECATED > @@ -19,7 +24,11 @@ ALL_TARGET = > LIB_DEPENDS = databases/openldap > WANTLIB = ldap > > -do-configure: > +MAKE_ARGS = CC="${CC}" > + > +SUBST_VARS = MODLUA_INCL_DIR MODLUA_LIB > + > +pre-build: > ${SUBST_CMD} ${WRKSRC}/config > > do-install: > diff --git a/databases/lualdap/distinfo b/databases/lualdap/distinfo > index eb9f62d3b5c..80ca450c85e 100644 > --- a/databases/lualdap/distinfo > +++ b/databases/lualdap/distinfo > @@ -1,2 +1,2 @@ > -SHA256 (lualdap-1.1.0.tar.gz) = wodXBLjNxjmMLxzyUZmhbSF97SxpbRNK5ZGTWrPJjTM= > -SIZE (lualdap-1.1.0.tar.gz) = 30087 > +SHA256 (lualdap-1.3.0.tar.gz) = kwCAVGtq/9ZjX+9slQpWLwtuLLmhrwbyREYy4BlteNA= > +SIZE (lualdap-1.3.0.tar.gz) = 81987 > diff --git a/databases/lualdap/patches/patch-Makefile > b/databases/lualdap/patches/patch-Makefile > deleted file mode 100644 > index 65b2fd7dcd9..00000000000 > --- a/databases/lualdap/patches/patch-Makefile > +++ /dev/null > @@ -1,10 +0,0 @@ > ---- Makefile.orig Tue Nov 25 16:01:17 2014 > -+++ Makefile Tue Nov 25 16:02:03 2014 > -@@ -22,7 +22,6 @@ $(COMPAT_DIR)/compat-5.1.o: $(COMPAT_DIR)/compat-5.1.c > - install: src/$(LIBNAME) > - mkdir -p $(LUA_LIBDIR) > - cp src/$(LIBNAME) $(LUA_LIBDIR) > -- cd $(LUA_LIBDIR); ln -f -s $(LIBNAME) $T.so > - > - clean: > - rm -f $(OBJS) src/$(LIBNAME) > diff --git a/databases/lualdap/patches/patch-config > b/databases/lualdap/patches/patch-config > index 3b98d0347a0..330e621bda9 100644 > --- a/databases/lualdap/patches/patch-config > +++ b/databases/lualdap/patches/patch-config > @@ -1,37 +1,48 @@ > ---- config.orig Mon Jul 24 03:42:06 2006 > -+++ config Tue Nov 25 16:02:14 2014 > -@@ -1,26 +1,26 @@ > - # Installation directories > +Index: config > +--- config.orig > ++++ config > +@@ -1,14 +1,13 @@ > + # Lua binary > +-LUA := lua > ++LUA := ${LUA} > + # Lua version number (first and second digits of target version) > +-LUA_VERSION := $(shell $(LUA) -e 'print(_VERSION:match("%S+%s+(%S+)"))') > + > + # Lua library (set LUA_LIB explicitly, if required) > +-LUA_LIB = # -llua$(LUA_VERSION) > ++LUA_LIB = ${MODLUA_LIB} # -llua$(LUA_VERSION) > + # Lua library directory > +-LUA_LIBDIR = /usr/lib > ++LUA_LIBDIR = ${LOCALBASE}/lib > + # Lua include directory > +-LUA_INCDIR = /usr/include/lua$(LUA_VERSION) > ++LUA_INCDIR = ${MODLUA_INCL_DIR} > + > + # Installation prefix > + INST_PREFIX = /usr > +@@ -22,20 +22,20 @@ INST_LUADIR = /usr/share/lua/$(LUA_VERSION) > + # OpenLDAP library (an optional directory can be specified with -L<dir>) > + LDAP_LIB = -lldap > # System's libraries directory (where binary libraries are installed) > --LUA_LIBDIR= /usr/local/lib/lua/5.0 > -+LUA_LIBDIR= ${LOCALBASE}/lib/lua/${MODLUA_VERSION} > - # Lua includes directory > --LUA_INC= /usr/local/include > -+LUA_INC= ${LOCALBASE}/include/lua-${MODLUA_VERSION} > +-LDAP_LIBDIR = /usr/lib > ++LDAP_LIBDIR = ${LOCALBASE}/lib > # OpenLDAP includes directory > --OPENLDAP_INC= /usr/local/include > -+OPENLDAP_INC= ${LOCALBASE}/include > - # OpenLDAP library (an optional directory can be specified with -L<dir>) > --OPENLDAP_LIB= -lldap > -+OPENLDAP_LIB= -L${LOCALBASE}/lib -lldap > +-LDAP_INCDIR = /usr/include > ++LDAP_INCDIR = ${LOCALBASE}/include > > - # OS dependent > - LIB_OPTION= -shared #for Linux > - #LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X > + LBER_LIB = -llber > +-LBER_LIBDIR = /usr/lib > +-LBER_INCDIR = /usr/include > ++LBER_LIBDIR = ${LOCALBASE}/lib > ++LBER_INCDIR = ${LOCALBASE}/include > > - # Lua version number (first and second digits of target version) > --LUA_VERSION_NUM= 500 > --LIBNAME= $T.so.$V > -+LUA_VERSION_NUM= 501 > -+LIBNAME= $T.so > - COMPAT_DIR= ../compat/src > + # OS dependent > + LIBFLAG = -shared # for Linux > + #LIBFLAG = -bundle -undefined dynamic_lookup # for MacOS X > > # Compilation parameters > - WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align > -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -ansi > - INCS= -I$(LUA_INC) -I$(OPENLDAP_INC) -I$(COMPAT_DIR) > --CFLAGS= $(WARN) $(INCS) > -CC= gcc > -+CFLAGS+= $(WARN) $(INCS) > +CC?= gcc > + INSTALL= install > > - # $Id: patch-config,v 1.2 2022/03/11 18:31:22 naddy Exp $ > + MACOSX_DEPLOYMENT_TARGET="10.3" > diff --git a/databases/lualdap/pkg/PLIST b/databases/lualdap/pkg/PLIST > index 13c769d2568..6a78c55b15b 100644 > --- a/databases/lualdap/pkg/PLIST > +++ b/databases/lualdap/pkg/PLIST > @@ -1 +1,2 @@ > -lib/lua/${MODLUA_VERSION}/lualdap.so > +@pkgpath databases/lualdap > +@so lib/lua/${MODLUA_VERSION}/lualdap.so