diff options
author | Ivan Puntiy | 2021-07-04 21:34:27 +0300 |
---|---|---|
committer | Ivan Puntiy | 2021-07-04 21:37:52 +0300 |
commit | 0ff9f6c405b15260cab6c7f35a704c39b0845713 (patch) | |
tree | 9ee57520712f21250c8a734e7b0c6d481a63bd06 /PKGBUILD | |
parent | 6768405356b8d3236efb07870e38181bb155c348 (diff) | |
download | aur-0ff9f6c405b15260cab6c7f35a704c39b0845713.tar.gz |
option to disable 64-bit shared libraries
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 26 |
1 files changed, 18 insertions, 8 deletions
@@ -23,6 +23,10 @@ sha1sums=('406ac736f61d88a3a866aa501e01e408a642c6e7' _architectures="i686-w64-mingw32 x86_64-w64-mingw32" +# linking 64-bit shared libraries fails for me for an unknown reason, and I'm not sure if the problem is with compiler or my environment +# uncomment the following line to skip building it, if needed +# _skip_shared_64bit=aye + prepare() { cd "${srcdir}/wxWidgets-${pkgver}" patch --forward --strip=1 --input="${srcdir}/fix-narrowing.patch" @@ -53,10 +57,12 @@ build() { cd "${srcdir}/wxWidgets-${pkgver}" for _arch in ${_architectures}; do # shared build - mkdir -p build-shared-${_arch} && pushd build-shared-${_arch} - ${_arch}-configure ${_build_flags} --enable-monolithic .. - make - popd + if [[ -z "$_skip_shared_64bit" || ! ( $_arch =~ "x86_64" ) ]]; then + mkdir -p build-shared-${_arch} && pushd build-shared-${_arch} + ${_arch}-configure ${_build_flags} --enable-monolithic .. + make + popd + fi # static build mkdir -p build-static-${_arch} && pushd build-static-${_arch} @@ -70,12 +76,16 @@ package() { mkdir -p "${pkgdir}/usr/bin" for _arch in ${_architectures}; do for _build in shared static; do - cd "${srcdir}/wxWidgets-${pkgver}/build-${_build}-${_arch}" - make DESTDIR="${pkgdir}" install + if [[ -z "$_skip_shared_64bit" || $_build == "static" || ! ( $_arch =~ "x86_64" ) ]]; then + cd "${srcdir}/wxWidgets-${pkgver}/build-${_build}-${_arch}" + make DESTDIR="${pkgdir}" install + fi done - mv "${pkgdir}/usr/${_arch}/lib/"*.dll "${pkgdir}/usr/${_arch}/bin/" - ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll + if [[ -z "$_skip_shared_64bit" || ! ( $_arch =~ "x86_64" ) ]]; then + mv "${pkgdir}/usr/${_arch}/lib/"*.dll "${pkgdir}/usr/${_arch}/bin/" + ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll + fi ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a ln -s "/usr/${_arch}/lib/wx/config/${_arch}-msw-unicode-${pkgver%.*}" \ |