106 lines
3.1 KiB
Bash
106 lines
3.1 KiB
Bash
# Maintainer: Biswapriyo Nath <nathbappai@gmail.com>
|
|
|
|
_realname=libgedit-gfls
|
|
pkgbase=mingw-w64-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
|
|
"${MINGW_PACKAGE_PREFIX}-${_realname}-docs")
|
|
pkgver=0.3.0
|
|
pkgrel=2
|
|
pkgdesc='A module dedicated to file loading and saving. (mingw-w64)'
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
url='https://gitlab.gnome.org/World/gedit/libgedit-gfls'
|
|
license=('spdx:LGPL-3.0-or-later')
|
|
depends=(
|
|
"${MINGW_PACKAGE_PREFIX}-gettext-runtime"
|
|
"${MINGW_PACKAGE_PREFIX}-glib2"
|
|
)
|
|
makedepends=(
|
|
"${MINGW_PACKAGE_PREFIX}-cc"
|
|
"${MINGW_PACKAGE_PREFIX}-gettext-tools"
|
|
"${MINGW_PACKAGE_PREFIX}-gobject-introspection"
|
|
"${MINGW_PACKAGE_PREFIX}-gtk-doc"
|
|
"${MINGW_PACKAGE_PREFIX}-gtk3"
|
|
"${MINGW_PACKAGE_PREFIX}-meson"
|
|
"${MINGW_PACKAGE_PREFIX}-ninja"
|
|
"${MINGW_PACKAGE_PREFIX}-pkgconf"
|
|
)
|
|
source=("https://gitlab.gnome.org/World/gedit/libgedit-gfls/-/archive/${pkgver}/${_realname}-${pkgver}.tar.gz")
|
|
sha256sums=('fe408efc98d3ff86bcaa36d7c10d5859bf3cd4e868700d08796cfcb4d5389017')
|
|
|
|
build() {
|
|
local -a _static_flags=(
|
|
-DGIO_STATIC_COMPILATION
|
|
-DGLIB_STATIC_COMPILATION
|
|
-DGMODULE_STATIC_COMPILATION
|
|
-DGOBJECT_STATIC_COMPILATION
|
|
)
|
|
|
|
local -a _meson_options=(
|
|
--prefix="${MINGW_PREFIX}"
|
|
--wrap-mode=nodownload
|
|
--auto-features=enabled
|
|
--buildtype=plain
|
|
)
|
|
|
|
CFLAGS+=" ${_static_flags[@]}" \
|
|
CXXFLAGS+=" ${_static_flags[@]}" \
|
|
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
|
${MINGW_PREFIX}/bin/meson.exe setup \
|
|
"${_meson_options[@]}" \
|
|
--default-library=static \
|
|
-Dgtk_doc=false \
|
|
-Dgobject_introspection=false \
|
|
"${_realname}-${pkgver}" \
|
|
"build-${MSYSTEM}-static"
|
|
|
|
${MINGW_PREFIX}/bin/meson.exe compile -C "build-${MSYSTEM}-static"
|
|
|
|
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
|
${MINGW_PREFIX}/bin/meson.exe setup \
|
|
"${_meson_options[@]}" \
|
|
--default-library=shared \
|
|
-Dgtk_doc=true \
|
|
-Dgobject_introspection=true \
|
|
"${_realname}-${pkgver}" \
|
|
"build-${MSYSTEM}-shared"
|
|
|
|
${MINGW_PREFIX}/bin/meson.exe compile -C "build-${MSYSTEM}-shared"
|
|
}
|
|
|
|
check() {
|
|
${MINGW_PREFIX}/bin/meson.exe test -C "build-${MSYSTEM}-static" || warning "Tests failed"
|
|
${MINGW_PREFIX}/bin/meson.exe test -C "build-${MSYSTEM}-shared" || warning "Tests failed"
|
|
}
|
|
|
|
package_libgedit-gfls() {
|
|
${MINGW_PREFIX}/bin/meson.exe install -C "build-${MSYSTEM}-static" --destdir "${pkgdir}"
|
|
${MINGW_PREFIX}/bin/meson.exe install -C "build-${MSYSTEM}-shared" --destdir "${pkgdir}"
|
|
|
|
install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSES/LGPL-3.0-or-later.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
|
|
|
|
# split docs
|
|
mkdir -p dest${MINGW_PREFIX}/share
|
|
mv "${pkgdir}${MINGW_PREFIX}"/share/gtk-doc dest${MINGW_PREFIX}/share/gtk-doc
|
|
}
|
|
|
|
package_libgedit-gfls-docs() {
|
|
pkgdesc+=" (documentation)"
|
|
depends=()
|
|
conflicts=()
|
|
replaces=()
|
|
|
|
mv dest/* "${pkgdir}"
|
|
}
|
|
|
|
# template start; name=mingw-w64-splitpkg-wrappers; version=1.0;
|
|
# vim: set ft=bash :
|
|
|
|
# generate wrappers
|
|
for _name in "${pkgname[@]}"; do
|
|
_short="package_${_name#${MINGW_PACKAGE_PREFIX}-}"
|
|
_func="$(declare -f "${_short}")"
|
|
eval "${_func/#${_short}/package_${_name}}"
|
|
done
|
|
# template end;
|