cairo: Build static library separately
This remove DllMain from static libraries and fixes static linking with others.
This commit is contained in:
@@ -6,7 +6,7 @@ pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
_commit='b43e7c6f3cf7855e16170a06d3a9c7234c60ca94'
|
||||
pkgver=1.17.8
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Cairo vector graphics library (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
|
||||
@@ -65,33 +65,44 @@ prepare() {
|
||||
}
|
||||
|
||||
build() {
|
||||
rm -rf build-${MINGW_CHOST}
|
||||
mkdir -p build-${MINGW_CHOST}
|
||||
cd build-${MINGW_CHOST}
|
||||
local -a _meson_options
|
||||
_meson_options=(
|
||||
--prefix=${MINGW_PREFIX}
|
||||
--buildtype=plain
|
||||
--wrap-mode=nofallback
|
||||
-Dauto_features=enabled
|
||||
-Dxlib=disabled
|
||||
-Dxcb=disabled
|
||||
-Dtests=disabled
|
||||
-Dspectre=disabled
|
||||
-Dtee=enabled
|
||||
-Dxml=enabled
|
||||
-Dsymbol-lookup=disabled
|
||||
)
|
||||
|
||||
# Enables CAIRO_WIN32_STATIC_BUILD, keeps DllMain far away (#17643)
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
||||
${MINGW_PREFIX}/bin/meson setup \
|
||||
"${_meson_options[@]}" \
|
||||
--default-library=static \
|
||||
"${_realname}-${pkgver}" \
|
||||
"build-${MSYSTEM}-static"
|
||||
|
||||
meson compile -C build-${MSYSTEM}-static
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
||||
${MINGW_PREFIX}/bin/meson setup \
|
||||
--prefix=${MINGW_PREFIX} \
|
||||
--buildtype=plain \
|
||||
--wrap-mode=nofallback \
|
||||
--default-library=both \
|
||||
-Dauto_features=enabled \
|
||||
-Dxlib=disabled \
|
||||
-Dxcb=disabled \
|
||||
-Dtests=disabled \
|
||||
-Dspectre=disabled \
|
||||
-Dtee=enabled \
|
||||
-Dxml=enabled \
|
||||
-Dsymbol-lookup=disabled \
|
||||
../${_realname}-${pkgver}
|
||||
"${_meson_options[@]}" \
|
||||
--default-library=shared \
|
||||
"${_realname}-${pkgver}" \
|
||||
"build-${MSYSTEM}-shared"
|
||||
|
||||
meson compile
|
||||
meson compile -C "build-${MSYSTEM}-shared"
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/build-${MINGW_CHOST}"
|
||||
|
||||
DESTDIR="${pkgdir}" meson install
|
||||
meson install -C "build-${MSYSTEM}-static" --destdir "${pkgdir}"
|
||||
meson install -C "build-${MSYSTEM}-shared" --destdir "${pkgdir}"
|
||||
|
||||
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
|
||||
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING-LGPL-2.1" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING-LGPL-2.1"
|
||||
|
||||
Reference in New Issue
Block a user