summaryrefslogtreecommitdiffstats
path: root/main/lua-socket
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-12-16 12:52:26 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-12-16 12:52:50 +0000
commit0c762268fc526343e34d47c98f15b59773df1301 (patch)
treeac4ca5743f64d654b6ee4a39795f7bf505c2d827 /main/lua-socket
parent6afc551aa3e4c4a17137c370a4d148217f9548f4 (diff)
downloadaports-0c762268fc526343e34d47c98f15b59773df1301.tar.bz2
aports-0c762268fc526343e34d47c98f15b59773df1301.tar.xz
main/lua-socket: enable unix domain sockets
Diffstat (limited to 'main/lua-socket')
-rw-r--r--main/lua-socket/APKBUILD29
-rw-r--r--main/lua-socket/unix.patch25
2 files changed, 48 insertions, 6 deletions
diff --git a/main/lua-socket/APKBUILD b/main/lua-socket/APKBUILD
index 5939dd425..b53d8a7e8 100644
--- a/main/lua-socket/APKBUILD
+++ b/main/lua-socket/APKBUILD
@@ -3,7 +3,7 @@
pkgname=lua-socket
_name=luasocket
pkgver=2.0.2
-pkgrel=2
+pkgrel=3
pkgdesc="Luasocket is the most comprehensive networking support library for the Lua language."
url="http://luaforge.net/projects/luasocket/"
arch="all"
@@ -11,18 +11,35 @@ license="MIT"
depends="lua"
makedepends="lua-dev"
install=
-source="http://luaforge.net/frs/download.php/2664/luasocket-$pkgver.tar.gz"
+source="http://luaforge.net/frs/download.php/2664/luasocket-$pkgver.tar.gz
+ unix.patch"
replaces=luasocket
+_builddir="$srcdir/$_name-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
build() {
- cd "$srcdir/$_name-$pkgver"
+ cd "$_builddir"
make || return 1
}
package() {
- cd "$srcdir/$_name-$pkgver"
- make INSTALL_TOP_SHARE="$pkgdir/usr/share/lua/5.1" INSTALL_TOP_LIB="$pkgdir/usr/lib/lua/5.1" install
+ cd "$_builddir"
+ local cmod=$(pkg-config --variable INSTALL_CMOD lua)
+ local lmod=$(pkg-config --variable INSTALL_LMOD lua)
+ make INSTALL_TOP_SHARE="$pkgdir/$lmod" \
+ INSTALL_TOP_LIB="$pkgdir/$cmod" \
+ install
}
-md5sums="41445b138deb7bcfe97bff957503da8e luasocket-2.0.2.tar.gz"
+md5sums="41445b138deb7bcfe97bff957503da8e luasocket-2.0.2.tar.gz
+51c600494106ca39f9816f6574868628 unix.patch"
diff --git a/main/lua-socket/unix.patch b/main/lua-socket/unix.patch
new file mode 100644
index 000000000..3de123846
--- /dev/null
+++ b/main/lua-socket/unix.patch
@@ -0,0 +1,25 @@
+diff --git a/makefile b/makefile
+index 6d70039..a46617a 100644
+--- a/makefile
++++ b/makefile
+@@ -41,6 +41,7 @@ install: all
+ cd src; $(INSTALL_DATA) $(TO_SOCKET_SHARE) $(INSTALL_SOCKET_SHARE)
+ cd src; mkdir -p $(INSTALL_SOCKET_LIB)
+ cd src; $(INSTALL_EXEC) $(SOCKET_SO) $(INSTALL_SOCKET_LIB)/core.$(EXT)
++ cd src; $(INSTALL_EXEC) $(UNIX_SO) $(INSTALL_SOCKET_LIB)/unix.$(EXT)
+ #cd src; mkdir -p $(INSTALL_MIME_SHARE)
+ #cd src; $(INSTALL_DATA) $(TO_MIME_SHARE) $(INSTALL_MIME_SHARE)
+ cd src; mkdir -p $(INSTALL_MIME_LIB)
+diff --git a/src/makefile b/src/makefile
+index b614f77..9a61fb6 100644
+--- a/src/makefile
++++ b/src/makefile
+@@ -47,7 +47,7 @@ UNIX_OBJS:=\
+ usocket.o \
+ unix.o
+
+-all: $(SOCKET_SO) $(MIME_SO)
++all: $(SOCKET_SO) $(MIME_SO) $(UNIX_SO)
+
+ $(SOCKET_SO): $(SOCKET_OBJS)
+ $(LD) $(LDFLAGS) -o $@ $(SOCKET_OBJS)