Add marisa-trie

This commit is contained in:
Feng Shu
2020-04-04 11:12:43 +08:00
parent 24d9b51610
commit 6df4dd5511
2 changed files with 60 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
--- tools/Makefile.am-orig 2020-04-04 11:18:45.119361500 +0800
+++ tools/Makefile.am 2020-04-04 11:18:11.969303300 +0800
@@ -1,5 +1,5 @@
MY_INCLUDE = -I$(top_srcdir)/include -I$(top_srcdir)/lib
-MY_LIBS = $(top_srcdir)/lib/marisa/libmarisa.la libcmdopt.la
+MY_LIBS = $(top_builddir)/lib/marisa/libmarisa.la libcmdopt.la
AM_CXXFLAGS = -Wall -Weffc++ -Wextra -Wconversion $(MY_INCLUDE)

51
mingw-w64-marisa/PKGBUILD Normal file
View File

@@ -0,0 +1,51 @@
# Maintainer: Feng Shu <tumashu@163.com>
_realname=marisa
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.2.5
pkgrel=1
pkgdesc="Static and space-efficient trie data structure library (mingw-w64)"
url="https://github.com/s-yata/marisa-trie"
arch=('any')
license=('BSD')
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
"autoconf")
source=("marisa-trie-$pkgver.tar.gz::https://github.com/s-yata/marisa-trie/archive/v${pkgver}.tar.gz"
"001-tools-makefile.patch")
sha256sums=('61d222d335db3e8138a22542b95788f307366986c464a68791d361787f3b9c01'
'd3ec2637462ac3331f0c6bcba9b8552bca4819321df265b3fd895547bbf75717')
prepare() {
cd "marisa-trie-${pkgver}"
patch -p0 -i ${srcdir}/001-tools-makefile.patch
autoreconf -fiv
}
build() {
[[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST}
mkdir build-${MINGW_CHOST} && cd build-${MINGW_CHOST}
case ${MINGW_CHOST} in
i686*)
local _conf=''
;;
x86_64*)
local _conf='--enable-native-code'
;;
esac
../marisa-trie-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
${_conf} \
--disable-shared
make
}
package() {
cd "${srcdir}/build-${MINGW_CHOST}"
make DESTDIR="${pkgdir}" install
}