aboutsummaryrefslogtreecommitdiffstats
path: root/main/wine
diff options
context:
space:
mode:
Diffstat (limited to 'main/wine')
-rw-r--r--main/wine/APKBUILD52
-rw-r--r--main/wine/dn_skipname.patch38
-rw-r--r--main/wine/uclibc-fmaxf-fminf.patch21
3 files changed, 111 insertions, 0 deletions
diff --git a/main/wine/APKBUILD b/main/wine/APKBUILD
new file mode 100644
index 0000000000..2e7e3304ec
--- /dev/null
+++ b/main/wine/APKBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=wine
+pkgver=1.3.22
+pkgrel=0
+pkgdesc="A compatibility layer for running Windows programs"
+url="http://www.winehq.com"
+arch="x86"
+license="LGPL"
+subpackages="$pkgname-dev $pkgname-doc"
+makedepends="fontconfig-dev openldap-dev libxslt-dev libxxf86dga-dev
+ libxcursor-dev libxrandr-dev libxdamage-dev mesa-dev flex bison
+ libpng-dev jpeg-dev freetype-dev ncurses-dev openssl-dev
+ libxcomposite-dev libxrender-dev libxinerama-dev zlib-dev
+ fontconfig-dev cups-dev alsa-lib-dev lcms-dev libxml2-dev
+ gstreamer-dev gst-plugins-base-dev paxctl"
+source="http://ibiblio.org/pub/linux/system/emulators/$pkgname/$pkgname-$pkgver.tar.bz2
+ dn_skipname.patch
+ uclibc-fmaxf-fminf.patch
+ "
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in \
+ || return 1
+ sed -i '/^MimeType/d' tools/wine.desktop || return 1
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/wine \
+ --with-x
+ make depend && make
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make prefix="$pkgdir"/usr install || return 1
+ mkdir -p "$pkgdir"/etc/wine
+ paxctl -c -psmre "$pkgdir"/usr/bin/wine-preloader \
+ "$pkgdir"/usr/bin/wine
+}
+
+md5sums="46f313013644d31ad37b8fc5c2c16467 wine-1.3.22.tar.bz2
+6ebeaa64eddf97be3267db236ce84b71 dn_skipname.patch
+1127b41caf4de8f567b9a3d0aff5277f uclibc-fmaxf-fminf.patch"
diff --git a/main/wine/dn_skipname.patch b/main/wine/dn_skipname.patch
new file mode 100644
index 0000000000..99ecf83158
--- /dev/null
+++ b/main/wine/dn_skipname.patch
@@ -0,0 +1,38 @@
+--- ./dlls/dnsapi/ns_parse.c.orig
++++ ./dlls/dnsapi/ns_parse.c
+@@ -69,6 +69,35 @@
+ } while (0)
+
+ /* Public. */
++#ifdef __UCLIBC__
++int
++dn_skipname(const u_char *comp_dn, const u_char *eom)
++{
++ const u_char *cp;
++ int n;
++
++ cp = comp_dn;
++ while (cp < eom && (n = *cp++)) {
++ /*
++ * check for indirection
++ */
++ switch (n & INDIR_MASK) {
++ case 0: /* normal case, n == len */
++ cp += n;
++ continue;
++ case INDIR_MASK: /* indirection */
++ cp++;
++ break;
++ default: /* illegal type */
++ return (-1);
++ }
++ break;
++ }
++ if (cp > eom)
++ return (-1);
++ return (cp - comp_dn);
++}
++#endif
+
+ static int
+ dns_ns_skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count) {
diff --git a/main/wine/uclibc-fmaxf-fminf.patch b/main/wine/uclibc-fmaxf-fminf.patch
new file mode 100644
index 0000000000..1f26cb8b96
--- /dev/null
+++ b/main/wine/uclibc-fmaxf-fminf.patch
@@ -0,0 +1,21 @@
+--- ./dlls/d3dx9_36/mesh.c.orig
++++ ./dlls/d3dx9_36/mesh.c
+@@ -40,6 +40,18 @@
+ #include "wine/list.h"
+ #include "d3dx9_36_private.h"
+
++#ifdef __UCLIBC__
++float fmaxf(float a, float b)
++{
++ return (a > b) ? a : b;
++}
++
++float fminf(float a, float b)
++{
++ return (a < b) ? a : b;
++}
++#endif
++
+ WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
+
+ typedef struct ID3DXMeshImpl