summaryrefslogtreecommitdiffstats
path: root/mingw-w64-gtk2/PKGBUILD
diff options
context:
space:
mode:
authorLAN-TW <lantw44@gmail.com>2013-05-18 11:42:12 +0800
committerLAN-TW <lantw44@gmail.com>2013-05-18 11:42:12 +0800
commitcb9228fbd8c5143e6fb2835369d8e61c69011da1 (patch)
tree25c8a28bf88d773dc83e73a93c6d7764fd396221 /mingw-w64-gtk2/PKGBUILD
downloadAUR-PKGBUILD-cb9228fbd8c5143e6fb2835369d8e61c69011da1.tar
AUR-PKGBUILD-cb9228fbd8c5143e6fb2835369d8e61c69011da1.tar.gz
AUR-PKGBUILD-cb9228fbd8c5143e6fb2835369d8e61c69011da1.tar.bz2
AUR-PKGBUILD-cb9228fbd8c5143e6fb2835369d8e61c69011da1.tar.lz
AUR-PKGBUILD-cb9228fbd8c5143e6fb2835369d8e61c69011da1.tar.xz
AUR-PKGBUILD-cb9228fbd8c5143e6fb2835369d8e61c69011da1.tar.zst
AUR-PKGBUILD-cb9228fbd8c5143e6fb2835369d8e61c69011da1.zip
Initial commit - Import old files
Diffstat (limited to 'mingw-w64-gtk2/PKGBUILD')
-rw-r--r--mingw-w64-gtk2/PKGBUILD67
1 files changed, 67 insertions, 0 deletions
diff --git a/mingw-w64-gtk2/PKGBUILD b/mingw-w64-gtk2/PKGBUILD
new file mode 100644
index 0000000..9fbb48c
--- /dev/null
+++ b/mingw-w64-gtk2/PKGBUILD
@@ -0,0 +1,67 @@
+# Patches are downloaded from http://pkgs.fedoraproject.org/cgit/mingw-gtk2.git
+
+pkgname=mingw-w64-gtk2
+pkgver=2.24.17
+pkgrel=3
+pkgdesc="GTK+ is a multi-platform toolkit (v2) (mingw-w64)"
+arch=(any)
+url="http://www.gtk.org"
+license=("LGPL")
+makedepends=(mingw-w64-gcc mingw-w64-pkg-config)
+depends=(mingw-w64-crt
+mingw-w64-atk
+mingw-w64-pango
+mingw-w64-glib2
+mingw-w64-cairo
+mingw-w64-gdk-pixbuf2)
+options=(!libtool !strip !buildflags)
+source=(
+"http://ftp.gnome.org/pub/gnome/sources/gtk+/${pkgver%.*}/gtk+-${pkgver}.tar.xz"
+"gtk-dont-define-initguid.patch"
+"gtk-fix-out-of-source-build.patch")
+md5sums=('a10cc43fad8d64f8893d779b1f8322ff'
+ "4038939df90f80ea6923d67afff28e03"
+ "39196c2cd31fc252f41966ef30003a31")
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+build() {
+ cd "${srcdir}/gtk+-${pkgver}"
+ patch -Np0 < '../gtk-dont-define-initguid.patch'
+ patch -Np0 < '../gtk-fix-out-of-source-build.patch'
+ autoreconf -if
+ for _arch in ${_architectures}; do
+ export CFLAGS="-O2 -mms-bitfields"
+ export CXXFLAGS="${CFLAGS}"
+ unset LDFLAGS
+ mkdir -p "${srcdir}/${pkgname}-${pkgver}-build-${_arch}"
+ cp -r "$srcdir/gtk+-$pkgver/"* "${srcdir}/${pkgname}-${pkgver}-build-${_arch}"
+ cd "${srcdir}/${pkgname}-${pkgver}-build-${_arch}"
+ if [ $_arch = "x86_64-w64-mingw32" ]; then
+ rm "gtk/gtk.def"
+ fi
+ ${srcdir}/gtk+-${pkgver}/configure \
+ --prefix=/usr/${_arch} \
+ --build=$CHOST \
+ --host=${_arch} \
+ --with-gdktarget=win32 \
+ --disable-modules \
+ --disable-cups \
+ --with-included-loaders=png,bmp,ico,pnm,xpm \
+ --enable-static \
+ --enable-shared \
+ --disable-glibtest
+ make
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd "${srcdir}/${pkgname}-${pkgver}-build-${_arch}"
+ make -j1 DESTDIR="$pkgdir" install
+ find "$pkgdir/usr/${_arch}" -name '*.exe' -o -name '*.bat' -o -name '*.def' -o -name '*.exp' -o -name '*.manifest' | xargs -rtl1 rm
+ find "$pkgdir/usr/${_arch}" -name '*.dll' | xargs -rtl1 ${_arch}-strip -x
+ find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs -rtl1 ${_arch}-strip -g
+ rm -r "$pkgdir/usr/${_arch}/"{etc,share}
+ done
+}