cairomm-1.16: Fix cairo linking in static library
This commit is contained in:
@@ -4,22 +4,21 @@ _realname=cairomm
|
||||
pkgbase=mingw-w64-${_realname}-1.16
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-1.16"
|
||||
pkgver=1.18.0
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
provides=("${MINGW_PACKAGE_PREFIX}-${_realname}16")
|
||||
conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}16")
|
||||
replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}16")
|
||||
pkgdesc="C++ bindings to Cairo vector graphics library (V1.16) (mingw-w64)"
|
||||
url="https://www.cairographics.org/cairomm/"
|
||||
url="https://cairographics.org/cairomm/"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
|
||||
license=("LGPL" "MPL")
|
||||
license=('spdx:GPL-2.0-or-later')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-cairo"
|
||||
"${MINGW_PACKAGE_PREFIX}-libsigc++-3.0")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-boost"
|
||||
"${MINGW_PACKAGE_PREFIX}-meson"
|
||||
"${MINGW_PACKAGE_PREFIX}-cc"
|
||||
"${MINGW_PACKAGE_PREFIX}-pkgconf")
|
||||
options=('strip' '!debug' 'staticlibs')
|
||||
source=("https://www.cairographics.org/releases/${_realname}-${pkgver}.tar.xz")
|
||||
sha256sums=('b81255394e3ea8e8aa887276d22afa8985fc8daef60692eb2407d23049f03cfb')
|
||||
|
||||
@@ -29,43 +28,49 @@ prepare() {
|
||||
}
|
||||
|
||||
build() {
|
||||
[[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}"
|
||||
mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}"
|
||||
local -a _static_flags=(
|
||||
-DCAIRO_WIN32_STATIC_BUILD
|
||||
)
|
||||
|
||||
declare -a _extra_config
|
||||
if check_option "debug" "n"; then
|
||||
_extra_config+=("--buildtype=release")
|
||||
else
|
||||
_extra_config+=("--buildtype=debug")
|
||||
fi
|
||||
local -a _meson_options=(
|
||||
--prefix="${MINGW_PREFIX}"
|
||||
--wrap-mode=nodownload
|
||||
--auto-features=enabled
|
||||
-Dmaintainer-mode=false
|
||||
-Dbuild-documentation=false
|
||||
-Dbuild-examples=true
|
||||
-Dbuild-tests=true
|
||||
)
|
||||
|
||||
CFLAGS+=" -Wno-attributes" \
|
||||
CXXFLAGS+=" -Wno-attributes" \
|
||||
CFLAGS+=" ${_static_flags[@]}" \
|
||||
CXXFLAGS+=" ${_static_flags[@]}" \
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
||||
${MINGW_PREFIX}/bin/meson.exe \
|
||||
--prefix="${MINGW_PREFIX}" \
|
||||
"${_extra_config[@]}" \
|
||||
--wrap-mode=nodownload \
|
||||
--default-library=both \
|
||||
--auto-features=enabled \
|
||||
-Dmaintainer-mode=false \
|
||||
-Dbuild-documentation=false \
|
||||
-Dbuild-examples=true \
|
||||
-Dbuild-tests=true \
|
||||
"../${_realname}-${pkgver}"
|
||||
${MINGW_PREFIX}/bin/meson.exe setup \
|
||||
"${_meson_options[@]}" \
|
||||
--default-library=static \
|
||||
"${_realname}-${pkgver}" \
|
||||
"build-${MSYSTEM}-static"
|
||||
|
||||
${MINGW_PREFIX}/bin/meson.exe compile
|
||||
${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 \
|
||||
"${_realname}-${pkgver}" \
|
||||
"build-${MSYSTEM}-shared"
|
||||
|
||||
${MINGW_PREFIX}/bin/meson.exe compile -C "build-${MSYSTEM}-shared"
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "${srcdir}/build-${MINGW_CHOST}"
|
||||
${MINGW_PREFIX}/bin/meson.exe test || true
|
||||
${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() {
|
||||
cd "${srcdir}/build-${MINGW_CHOST}"
|
||||
${MINGW_PREFIX}/bin/meson.exe install -C "build-${MSYSTEM}-static" --destdir "${pkgdir}"
|
||||
${MINGW_PREFIX}/bin/meson.exe install -C "build-${MSYSTEM}-shared" --destdir "${pkgdir}"
|
||||
|
||||
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/meson.exe install
|
||||
|
||||
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}-1.16/COPYING"
|
||||
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user