From e5442d99ffa0fcce75455281c41eed13202de1e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Sat, 22 Aug 2015 14:05:30 +0200 Subject: [PATCH] New package: icu4lua-0.2B --- common/shlibs | 1 + srcpkgs/icu4lua-devel | 1 + srcpkgs/icu4lua/files/Makefile | 47 +++++++++++++++++++++++++++++ srcpkgs/icu4lua/files/icu4lua.pc.in | 11 +++++++ srcpkgs/icu4lua/template | 42 ++++++++++++++++++++++++++ 5 files changed, 102 insertions(+) create mode 120000 srcpkgs/icu4lua-devel create mode 100644 srcpkgs/icu4lua/files/Makefile create mode 100644 srcpkgs/icu4lua/files/icu4lua.pc.in create mode 100644 srcpkgs/icu4lua/template diff --git a/common/shlibs b/common/shlibs index a4282fc81d0..c02073c6286 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2138,3 +2138,4 @@ libmlt.so.6 mlt-0.9.6_1 libmlt++.so.3 mlt-0.9.6_1 libunibilium.so.0 unibilium-1.1.6_1 libtermkey.so.1 libtermkey-0.17_1 +libicu4lua.so.0 icu4lua-0.2B_1 diff --git a/srcpkgs/icu4lua-devel b/srcpkgs/icu4lua-devel new file mode 120000 index 00000000000..ae3bc8de3e7 --- /dev/null +++ b/srcpkgs/icu4lua-devel @@ -0,0 +1 @@ +icu4lua \ No newline at end of file diff --git a/srcpkgs/icu4lua/files/Makefile b/srcpkgs/icu4lua/files/Makefile new file mode 100644 index 00000000000..2b0b2788e98 --- /dev/null +++ b/srcpkgs/icu4lua/files/Makefile @@ -0,0 +1,47 @@ +VERSION?= 0.2B +DESTDIR?= / +PREFIX= $(DESTDIR)/usr +LIBDIR= $(PREFIX)/lib +INCDIR= $(PREFIX)/include + +SILENT?= +SOURCES= icu.c icu.collator.c icu.idna.c icu.normalizer.c icu.regex.c \ + icu.stringprep.c icu.ufile.c icu.ustring.c icu.utf8.c matchengine.c +OBJS= icu.o icu.collator.o icu.idna.o icu.normalizer.o icu.regex.o \ + icu.stringprep.o icu.ufile.o icu.ustring.o icu.utf8.o matchengine.o +HEADERS= formatting.h icu4lua.h matchengine.h +TARGET= libicu4lua.so +SO_MAJOR= 0 +SO_MINOR= 1 +SO_BUILD= 1 +SO_VER= $(SO_MAJOR).$(SO_MINOR).$(SO_BUILD) +ICU_CFLAGS= `pkg-config --cflags icu-i18n icu-io` +ICU_LIBS= `pkg-config --libs icu-i18n icu-io` +LUA_CFLAGS= `pkg-config --cflags lua5.1` +LUA_LIBS= `pkg-config --libs lua5.1` + +all: $(TARGET) + +$(TARGET): $(OBJS) + @echo "Linking $@ ..." + $(SILENT)$(CC) -shared -Wl,-soname,$(TARGET).$(SO_MAJOR) \ + -o $(TARGET).$(SO_VER) $(LDFLAGS) \ + $(OBJS) $(LIBS) $(LUA_LIBS) -L/usr/lib/icu $(ICU_LIBS) + +.c.o: + @echo "Compling $< ..." + $(SILENT)$(CC) $(CFLAGS) $(ICU_CFLAGS) $(LUA_CFLAGS) -o $@ -c $< + +install: $(TARGET) + @echo "Installing..." + install -d $(LIBDIR)/ + install -m 0755 $(TARGET).$(SO_VER) $(LIBDIR) + ln -s $(TARGET).$(SO_VER) $(LIBDIR)/$(TARGET).$(SO_MAJOR).$(SO_MINOR) + ln -s $(TARGET).$(SO_MAJOR).$(SO_MINOR) $(LIBDIR)/$(TARGET).$(SO_MAJOR) + ln -s $(TARGET).$(SO_MAJOR) $(LIBDIR)/$(TARGET) + install -d $(INCDIR)/icu4lua + install -m 0644 *.h $(INCDIR)/icu4lua + install -d $(LIBDIR)/pkgconfig + sed < icu4lua.pc.in -e "s;@VERSION@;$(VERSION);" \ + > $(LIBDIR)/pkgconfig/icu4lua.pc + diff --git a/srcpkgs/icu4lua/files/icu4lua.pc.in b/srcpkgs/icu4lua/files/icu4lua.pc.in new file mode 100644 index 00000000000..ea050ddbce3 --- /dev/null +++ b/srcpkgs/icu4lua/files/icu4lua.pc.in @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${exec_prefix}/incude + +Name: icu4lua +Description: Unicode support for Lua 5.1 +Version: @VERSION@ +Requires: icu-i18n icu-io +Libs: -L${libdir} -licu4lua +CFlags: -I${includedir}/icu4lua diff --git a/srcpkgs/icu4lua/template b/srcpkgs/icu4lua/template new file mode 100644 index 00000000000..02a379b5c34 --- /dev/null +++ b/srcpkgs/icu4lua/template @@ -0,0 +1,42 @@ +# Template file for 'icu4lua' +pkgname=icu4lua +version=0.2B +revision=1 +create_wrksrc=yes +build_style=gnu-makefile +hostmakedepends="pkg-config unzip" +makedepends="icu55-devel lua51-devel" +short_desc="Binary module for providing Unicode support to Lua" +maintainer="Jürgen Buchmüller " +license="MIT,X" +homepage="http://luaforge.net/projects/${pkgname}/" +distfiles=" + http://files.luaforge.net/releases/icu-lua/icu-lua/${version}/ICU4Lua-${version}-src.zip + http://files.luaforge.net/releases/icu-lua/icu-lua/${version}/ICU4Lua-${version}-docs.zip" +checksum=" + 04368e7f7573f7e0d9ca4d9f06d760234ae51199e6e7682701a0fc0cfb5cd677 + d46449d77bc403e3258fd77e37de664148b0051fbd92a5d1c51b167370a26d02" + +CFLAGS="-fPIC" + +do_build() { + cp ${FILESDIR}/Makefile src + cp ${FILESDIR}/icu4lua.pc.in src + make -C src ${make_build_args} ${make_build_target} +} + +do_install() { + make -C src VERSION=${version} DESTDIR=${DESTDIR} install + vdoc doc/index.html +} + +icu4lua-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/share/doc + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.so" + } +}