#Maintainer: Dimitris Tzemos #Former Maintainer: Christian Dersch pkgname=wine pkgver=1.4.1 pkgrel=1dj _pkgbasever=${pkgver/rc/-rc} source=(http://prdownloads.sourceforge.net/$pkgname/$pkgname-$_pkgbasever.tar.bz2 "wine.desktop" "winecfg.desktop" "winecfg.png") url=http://www.winehq.org/ docs=('ANNOUNCE' 'AUTHORS' 'COPYING.LIB' 'LICENSE' 'LICENSE.OLD' 'README' 'VERSION') slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "wine (Wine Is Not an Emulator)" "Wine is an Open Source implementation of the Windows API on top of" "X and Linux/Unix. It allows you to run many software for Microsoft" "Windows (but not all)." "" "http://www.winehq.com/" ) build() { # If your video card does not support hardware accelerated OpenGL, # then set the variable to "NO" OPENGL=${OPENGL:-"YES"} # If you set REQUIRE_FONTFORGE to "NO" then the script won't refuse to # build wine in case you don't have fontforge installed (it is needed # to generate the required base fonts). REQUIRE_FONTFORGE=${REQUIRE_FONTFORGE:-"YES"} if ! which fontforge >/dev/null 2>&1 ; then echo "##" echo "## The 'fontforge' program does not seem to be installed." echo "## Wine uses fontforge to generate several TTF fonts (tahoma,tahomabd,marlett)" echo "## that your Windows programs may want to use!" if [ "YES" != "${REQUIRE_FONTFORGE}" ]; then echo "##" echo "## Continuing the build anyway, but you were warned..." echo "## Sleeping for 5 seconds, press -C if you want to abort now." echo "##" sleep 5 else echo "##" echo "## Aborting the build - set the internal script variable:" echo "##" echo "## 'REQUIRE_FONTFORGE' to a value of 'NO'" echo "##" echo "## if you don't want to use fontforge to generate TTF fonts." echo "##" exit 1 fi fi # Enable or disable opengl in accord to OPENGL variable value. if [ "$OPENGL" = "YES" ]; then OPENGL_WITH="with" else OPENGL_WITH="without" fi if [[ $arch == x86_64 ]]; then ENABLE_64=" --enable-win64" fi cd $SRC mkdir $pkgname-build || return 1 cd $pkgname-build || return 1 ../${pkgname}-${pkgver}/configure ${ENABLE_64} \ --prefix=/usr \ --localstatedir=/var \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --mandir=/usr/man \ --with-x \ --${OPENGL_WITH}-opengl \ --program-prefix= \ --program-suffix= \ --build=${arch}-slackware-linux || return 1 make depend || return 1 make || return 1 make install DESTDIR=${PKG} || return 1 # WoW (32 bit libraries) build instructions for 64 bit Wine. if [[ $arch == x86_64 ]]; then echo "Building (32 bit libraries) build instructions for 64 bit Wine." mkdir -p $SRC/wow64 || return 1 cd $SRC/wow64 || return 1 ../${pkgname}-${pkgver}/configure \ --with-wine64=../$pkgname-build \ --prefix=/usr \ --localstatedir=/var \ --libdir=/usr/lib \ --sysconfdir=/etc \ --mandir=/usr/man \ --with-x \ --${OPENGL_WITH}-opengl \ --program-prefix= \ --program-suffix= || return 1 make depend || return 1 make || return 1 make install DESTDIR=${PKG} || return 1 fi make depend || return 1 # These additional CFLAGS solve FS#27560 and FS#23277 make CFLAGS+="-mstackrealign -mincoming-stack-boundary=2" CXXFLAGS+="-mstackrealign -mincoming-stack-boundary=2" || return 1 make install DESTDIR=${PKG} || return 1 mkdir -p $PKG/usr/share/applications mkdir -p $PKG/usr/share/icons/hicolor/32x32/apps cp -a $SRC/wine.desktop $PKG/usr/share/applications cp -a $SRC/winecfg.desktop $PKG/usr/share/applications cp -a $SRC/winecfg.png $PKG/usr/share/icons/hicolor/32x32/apps } # Doinst doinst() { if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 #echo "This wine package is wow64 enabled. This means it can run 32bit/64bit Windows apps on x86_64." #echo "If you are on x86_64, the default WINEARCH will be win64." #echo "This will cause a lot of Windows applications to malfunction even if they usually work in wine." #echo "Please create your ~/.wine with 'WINEARCH=win32 winecfg' if you are unsure and on x86_64." fi }