diff options
-rw-r--r-- | main/cgit/APKBUILD | 34 | ||||
-rw-r--r-- | main/cgit/lua.patch | 48 |
2 files changed, 71 insertions, 11 deletions
diff --git a/main/cgit/APKBUILD b/main/cgit/APKBUILD index 83ac410409..2eb096aedc 100644 --- a/main/cgit/APKBUILD +++ b/main/cgit/APKBUILD @@ -1,23 +1,26 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=cgit -pkgver=0.9.2 -pkgrel=1 -_gitver=1.8.3 +pkgver=0.10 +pkgrel=0 +_gitver=1.8.5 pkgdesc="A fast webinterface for git" url="http://git.zx2c4.com/cgit/" arch="all" license="GPL2" -makedepends="openssl-dev zlib-dev" +makedepends="openssl-dev zlib-dev lua5.2-dev" depends="" source=" http://git.zx2c4.com/cgit/snapshot/cgit-$pkgver.tar.xz http://git-core.googlecode.com/files/git-$_gitver.tar.gz + lua.patch " _makeopts="NO_ICONV=YesPlease NO_GETTEXT=YesPlease NO_TCLTK=YesPlease - NO_SVN_TESTS=YesPlease" + NO_SVN_TESTS=YesPlease + LUA_PKGCONFIG=lua5.2 + prefix=/usr" prepare() { cd "$srcdir/$pkgname-$pkgver" @@ -29,6 +32,12 @@ prepare() { fi rm -rf git mv ../git-$_gitver git + + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done } build() { @@ -44,9 +53,12 @@ package() { ln -s cgit.cgi "$pkgdir"/usr/share/webapps/cgit/cgit } -md5sums="fe11018eff8d79caad112f4fac64b90f cgit-0.9.2.tar.xz -d91b6099fb6763cf92c696977a247060 git-1.8.3.tar.gz" -sha256sums="08c042004a7d91b1a4b0ff88dda6f94a916b7a231498c3c45056eb93033e2760 cgit-0.9.2.tar.xz -f1d3c6d683f8f15035a8d0f3eb30ed160ff6607111dfc6026d8836307aebc53a git-1.8.3.tar.gz" -sha512sums="05a755ea1ccf5b10dae8223a25b93166b854b4522c02e05c79d6c6dbc10a181e4fab282b9c918a56732a5d0a026aaedf197e37af1636bba79ade221598c4477e cgit-0.9.2.tar.xz -070a2e4563d11f441c075f3a1c785f5b99195f3183a7dcd4de947ce67be29137704836290589f61f10390865f3c19e5626ad1876cf9eecd987ea11740eedfba3 git-1.8.3.tar.gz" +md5sums="19944c17ecea1b1d1944718ce8ce6b61 cgit-0.10.tar.xz +16448b1cfd62fcbe738729edc6279e14 git-1.8.5.tar.gz +6f9e6e41671ccfaa2814912ac828ed1d lua.patch" +sha256sums="90c4227b7889bb268825b36e8a53cb7695895a6d63523b6ad34a670ad4e6de7a cgit-0.10.tar.xz +870f52e19bb599b2835455e62db10e4c693fdbcc154f7802512d74393cc26b23 git-1.8.5.tar.gz +2d0defeea43644e560a1f0fc4713b528b10f8b929dda81fdf9fafb9068f7f921 lua.patch" +sha512sums="c00c5a9443774a58a64b0133ab1a7d9771ddf9cee53e09492ff87e79a113593ec918bdb41e60b5e12e2c455575c031d83d056fb805bbdc2c2b158178ab4f3b57 cgit-0.10.tar.xz +3ecb2ab82ed6b98e4b1400c057a837947e36900b25f7758fd4cbca7814d6d882ecbc7502b2e3cb3b1808536f333706151129f331406e1806351125e53a7d13bc git-1.8.5.tar.gz +2e1ea885787984a886c29f9702f0d94924918932f1fa4f98084943bee8f8a94f36bd5f911b2a45c4997ddb7f242de5260fc4180ec8c293d2bc21b5e00d21fad0 lua.patch" diff --git a/main/cgit/lua.patch b/main/cgit/lua.patch new file mode 100644 index 0000000000..1bcb7ea2c3 --- /dev/null +++ b/main/cgit/lua.patch @@ -0,0 +1,48 @@ +diff --git a/cgit.mk b/cgit.mk +index 3b8b79a..2e2992f 100644 +--- a/cgit.mk ++++ b/cgit.mk +@@ -29,30 +29,18 @@ ifdef NO_LUA + LUA_MESSAGE := linking without specified Lua support + CGIT_CFLAGS += -DNO_LUA + else +-LUAJIT_CFLAGS := $(shell pkg-config --cflags luajit 2>/dev/null) +-LUAJIT_LIBS := $(shell pkg-config --libs luajit 2>/dev/null) +-LUA_LIBS := $(shell pkg-config --libs lua 2>/dev/null) +-LUA_CFLAGS := $(shell pkg-config --cflags lua 2>/dev/null) +-ifeq (JIT,$(LUA_IMPLEMENTATION)) +- ifeq ($(strip $(LUAJIT_LIBS)),) +- $(error LuaJIT specified via LUA_IMPLEMENTATION=JIT, but library could not be found.) +- endif +- LUA_MESSAGE := linking with selected LuaJIT +- CGIT_LIBS += $(LUAJIT_LIBS) +- CGIT_CFLAGS += $(LUAJIT_CFLAGS) +-else ifeq (VANILLA,$(LUA_IMPLEMENTATION)) +- ifeq ($(strip $(LUA_LIBS)),) +- $(error Lua specified via LUA_IMPLEMENTATION=VANILLA, but library could not be found.) +- endif +- LUA_MESSAGE := linking with selected Lua +- CGIT_LIBS += $(LUA_LIBS) +- CGIT_LIBS += $(LUA_CFLAGS) +-else ifneq ($(strip $(LUAJIT_LIBS)),) +- LUA_MESSAGE := linking with autodetected LuaJIT +- CGIT_LIBS += $(LUAJIT_LIBS) +- CGIT_CFLAGS += $(LUAJIT_CFLAGS) +-else ifneq ($(strip $(LUA_LIBS)),) +- LUA_MESSAGE := linking with autodetected Lua ++ifeq ($(LUA_PKGCONFIG),) ++ LUA_PKGCONFIG := $(shell for pc in luajit lua lua5.2 lua5.1; do \ ++ pkg-config --exists $$pc && echo $$pc && break; \ ++ done) ++ LUA_MODE := autodetected ++else ++ LUA_MODE := specified ++endif ++ifneq ($(LUA_PKGCONFIG),) ++ LUA_MESSAGE := linking with $(LUA_MODE) $(LUA_PKGCONFIG) ++ LUA_LIBS := $(shell pkg-config --libs $(LUA_PKGCONFIG) 2>/dev/null) ++ LUA_CFLAGS := $(shell pkg-config --cflags $(LUA_PKGCONFIG) 2>/dev/null) + CGIT_LIBS += $(LUA_LIBS) + CGIT_CFLAGS += $(LUA_CFLAGS) + else + |