Last active
May 18, 2017 16:37
-
-
Save PedroHLC/c50da3c9425eb22055e9c917a2da8ece to your computer and use it in GitHub Desktop.
mingw-w64-gc for ArchLinux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original author: Alexey Pavlov <[email protected]> | |
MINGW_PACKAGE_PREFIX="mingw-w64" | |
_realname=gc | |
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" | |
pkgver=7.4.2 | |
pkgrel=1 | |
pkgdesc="A garbage collector for C and C++ (mingw-w64)" | |
arch=('any') | |
url="http://www.hboehm.info/gc" | |
license=("GPL") | |
makedepends=(${MINGW_PACKAGE_PREFIX}-configure ${MINGW_PACKAGE_PREFIX}-pkg-config) | |
depends=(${MINGW_PACKAGE_PREFIX}-crt ${MINGW_PACKAGE_PREFIX}-libatomic_ops) | |
options=('!buildflags' 'staticlibs' '!strip') | |
source=("$url/gc_source/${_realname}-${pkgver}.tar.gz" | |
0001-winpthreads.mingw.patch | |
0003-move-docs.all.patch) | |
sha256sums=('63320ad7c45460e4a40e03f5aa4c6893783f21a16416c3282b994f933312afa2' | |
'e956bb9e5778570f7ebca78e91e1e6a23374cd0d67b32f8f224ff9070707835e' | |
'0e65543cc83ddb2de86875635339eb9d0946fa7ad6d7492a544b2bf2075b8983') | |
_architectures="i686-w64-mingw32 x86_64-w64-mingw32" | |
prepare() { | |
cd "${srcdir}/${_realname}-${pkgver}" | |
patch -p1 -i ${srcdir}/0001-winpthreads.mingw.patch | |
patch -p1 -i ${srcdir}/0003-move-docs.all.patch | |
./autogen.sh | |
} | |
build() { | |
cd "${srcdir}/${_realname}-${pkgver}" | |
for _arch in ${_architectures}; do | |
mkdir -p build-${_arch} && pushd build-${_arch} | |
export lt_cv_deplibs_check_method='pass_all' | |
${_arch}-configure .. \ | |
--enable-threads=posix \ | |
--disable-dependency-tracking \ | |
--enable-large-config \ | |
--enable-cplusplus | |
make | |
popd | |
done | |
} | |
package() { | |
for _arch in ${_architectures}; do | |
cd "${srcdir}/${_realname}-${pkgver}/build-${_arch}" | |
make DESTDIR="${pkgdir}" install | |
${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll | |
${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment