--- /dev/null
+# Maintainer: Andrea Zagli <andrea.zagli.free@gmail.com>
+
+_realname=libphonenumber
+pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
+pkgver=7.0.4
+pkgrel=1
+arch=('any')
+pkgdesc="GWeather shared library (mingw-w64)"
+depends=("${MINGW_PACKAGE_PREFIX}-protobuf"
+ "${MINGW_PACKAGE_PREFIX}-icu"
+ "${MINGW_PACKAGE_PREFIX}-boost")
+makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
+ "${MINGW_PACKAGE_PREFIX}-clang")
+options=('strip' 'staticlibs')
+license=("Apache License, Version 2.0")
+url="https://github.com/googlei18n/libphonenumber"
+source=(https://github.com/googlei18n/${_realname}/archive/${_realname}-${pkgver}.tar.gz
+ 001-win.patch)
+sha256sums=('660696d9c9edaa5ccb580ba9b3ee9111f674e14c28e5da083df34834f7eed7a9'
+ 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855')
+
+prepare() {
+ cd ${_realname}-${_realname}-${pkgver}
+
+ #patch -b -V simple -p1 -i ${srcdir}/001-win.patch
+}
+
+build() {
+ mkdir -p build-${MINGW_CHOST}
+ cd build-${MINGW_CHOST}
+
+ ${MINGW_PREFIX}/bin/cmake \
+ -DCMAKE_C_COMPILER=${MINGW_PREFIX}/bin/clang.exe \
+ -DCMAKE_CXX_COMPILER=${MINGW_PREFIX}/bin/clang.exe \
+ -DCMAKE_RC_COMPILER=${MINGW_PREFIX}/bin/windres.exe \
+ -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
+ -DCMAKE_C_FLAGS="${CFLAGS}" \
+ ../${_realname}-${_realname}-${pkgver}/cpp
+ make
+}
+
+package() {
+ cd "$srcdir/build-${MINGW_CHOST}"
+ make DESTDIR=$pkgdir install
+
+ install -Dm644 "${srcdir}/${_realname}-${pkgver}/cpp/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
+}