diff options
author | Michel Zou | 2020-02-26 18:13:12 +0100 |
---|---|---|
committer | Michel Zou | 2020-02-26 18:13:12 +0100 |
commit | 7bd4cd236de3cda2df62a4c6e94c0a415c4ed5ca (patch) | |
tree | 65bcc4bdd3ab6cb48a110c5f65050ede3356b50a | |
parent | 58d23866f76febf6a1cf7d7fa27394f8827a1312 (diff) | |
download | aur-7bd4cd236de3cda2df62a4c6e94c0a415c4ed5ca.tar.gz |
dll
-rw-r--r-- | PKGBUILD | 24 |
1 files changed, 15 insertions, 9 deletions
@@ -31,9 +31,9 @@ prepare() { build() { for _arch in ${_architectures}; do rm -rf FreeImage-${_arch} - cp -r FreeImage FreeImage-${_arch} - pushd FreeImage-${_arch} - make \ + cp -r FreeImage FreeImage-${_arch}-static + pushd FreeImage-${_arch}-static + make libFreeImage.a \ CC=${_arch}-gcc \ CXX=${_arch}-g++ \ LD=${_arch}-g++ \ @@ -41,8 +41,12 @@ build() { AR=${_arch}-ar \ DLLTOOL=${_arch}-dlltool \ FREEIMAGE_LIBRARY_TYPE="STATIC" \ + LDFLAGS="-static" \ -f Makefile.mingw - make \ + popd + cp -r FreeImage FreeImage-${_arch} + pushd FreeImage-${_arch} + make FreeImage.dll \ CC=${_arch}-gcc \ CXX=${_arch}-g++ \ LD=${_arch}-g++ \ @@ -50,6 +54,7 @@ build() { AR=${_arch}-ar \ DLLTOOL=${_arch}-dlltool \ FREEIMAGE_LIBRARY_TYPE="SHARED" \ + LDFLAGS="-shared -Wl,--out-implib,libFreeImage.dll.a" \ -f Makefile.mingw popd done @@ -58,12 +63,13 @@ build() { package() { for _arch in ${_architectures}; do - cd ${srcdir}/FreeImage-${_arch} install -d "${pkgdir}"/usr/${_arch}/{lib,bin,include} - install -m755 Dist/FreeImage.dll "${pkgdir}"/usr/${_arch}/bin/ - install -m644 Dist/FreeImage.dll.a "${pkgdir}"/usr/${_arch}/lib/libFreeImage.dll.a - install -m644 Dist/libFreeImage.a "${pkgdir}"/usr/${_arch}/lib/ - install -m644 Dist/FreeImage.h "${pkgdir}"/usr/${_arch}/include/ + cd ${srcdir}/FreeImage-${_arch}-static + install -m644 libFreeImage.a "${pkgdir}"/usr/${_arch}/lib/ + cd ${srcdir}/FreeImage-${_arch} + install -m755 FreeImage.dll "${pkgdir}"/usr/${_arch}/bin/ + install -m644 FreeImage.dll.a "${pkgdir}"/usr/${_arch}/lib/libFreeImage.dll.a + install -m644 Source/FreeImage.h "${pkgdir}"/usr/${_arch}/include/ ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a done |