LinuxForum.Fans
Тема

Wine - сборка SlackBuild'ом

Автор: Wehrmacht_Rover 9 сообщений 5311 просмотров
#283347

Wine собрался, но не работает ]:->

text
winecfg
preloader: Warning: failed to reserve range 00010000-00110000
wine: could not exec wineserver

wine.SlackBuild:

Показать
text

...
PRGNAM=wine
SRCVER=${SRCVER:-"1.5.16"}
VERSION=$(echo $SRCVER | tr '-' '.')
BUILD=${BUILD:-1}
TAG=${TAG:-wr}

DOCS="ANNOUNCE AUTHORS COPYING.LIB ChangeLog LICENSE* README VERSION"

# Set the variable OPENGL to "NO" if you don't have a card that # supports hardware accelerated OpenGL: OPENGL=${OPENGL:-"YES"} # Use 'YES' not 'yes' : case-sensitive!

# 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"}

# Where do we look for sources? SRCDIR=$(cd $(dirname $0); pwd)

# Place to build (TMP) package (PKG) and output (OUTPUT) the program: TMP=${TMP:-/home/rover/build} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/home/rover/x86}

SOURCE="$SRCDIR/${PRGNAM}-${SRCVER}.tar.bz2" SRCURL="http://downloads.sourceforge.net/project/${PRGNAM}/Source/${PRGNAM}-${SRCVER}.tar.bz2"

## ## --- with a little luck, you won't have to edit below this point --- ## ##

# Automatically determine the architecture we're building on: MARCH=$( uname -m ) if [ -z "$ARCH" ]; then case "$MARCH" in i?86) export ARCH=pentium4 ;; armv7hl) export ARCH=$MARCH ;; arm*) export ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: *) export ARCH=$MARCH ;; esac fi

case "$ARCH" in pentium4) SLKCFLAGS="-O2 -march=native -pipe -fomit-frame-pointer -msse -msse2 -mmmx --param l1-cache-size=8 --param l1-cache-line-size=64 --param l2-cache-size=128" ;; x86_64) SLKCFLAGS="-O2 -fPIC" ;; *) SLKCFLAGS="-O2" ;; esac

case "$ARCH" in arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; *) TARGET=$ARCH-slackware-linux ;; esac

# Exit the script on errors: set -e trap 'echo "$0 FAILED on line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR # Catch unitialized variables: set -u P1=${1:-1}

# Save old umask and set to 0022: _UMASK_=$(umask) umask 0022

# Create working directories: mkdir -p $OUTPUT # place for the package to be saved mkdir -p $TMP/tmp-$PRGNAM # location to build the source mkdir -p $PKG # place for the package to be built rm -rf $PKG/* # always erase old package's contents rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log # remove old log files

# Source files availability: if ! [ -f ${SOURCE} ]; then echo "Source '$(basename ${SOURCE})' not available yet..." # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)" if [ -f ${SOURCE} ]; then echo "Ah, found it!"; continue; fi if ! [ "x${SRCURL}" == "x" ]; then echo "Will download file to $(dirname $SOURCE)" wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then echo "Downloading '$(basename ${SOURCE})' failed... aborting the build." mv -f "${SOURCE}" "${SOURCE}".FAIL exit 1 fi else echo "File '$(basename ${SOURCE})' not available... aborting the build." exit 1 fi fi

if [ "$P1" == "--download" ]; then echo "Download complete." exit 0 fi

# --- PACKAGE BUILDING ---

echo "++" echo "|| $PRGNAM-$VERSION" echo "++"

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 [ "$REQUIRE_FONTFORGE" != "YES" ]; then echo "##" echo "## Continuing the build anyway, but you were warned..." echo "## Sleeping for 5 seconds, press <Ctrl>-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

cd $TMP/tmp-$PRGNAM

echo "Extracting the source archive(s) for $PRGNAM..." tar -xvf ${SOURCE} [ "$SRCVER" != "$VERSION" ] && mv ${PRGNAM}-${SRCVER} ${PRGNAM}-${VERSION} cd ${PRGNAM}-${VERSION}

# Patches specifically for Diablo3 (should get merged into wine eventually): cat $SRCDIR/wine_d3d_reset.patch | patch -p1 --verbose \ 2>&1 | tee $OUTPUT/patch-$PRGNAM.log cat $SRCDIR/wine_acceptex.patch | patch -p1 --verbose \ 2>&1 | tee -a $OUTPUT/patch-$PRGNAM.log

# This is required if the wine_acceptex.patch was applied: ./tools/make_requests 2>&1 | tee -a $OUTPUT/patch-$PRGNAM.log

chown -R root:root . chmod -R u+w,go+r-w,a+X-s .

echo Building ...

if [ "${OPENGL}" = "YES" -o "${OPENGL}" = "yes" ]; then do_opengl="" else do_opengl="out" fi

LDFLAGS="-L/usr/lib -ldl" \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --disable-option-checking \ --prefix=/usr \ --localstatedir=/var \ --sysconfdir=/etc \ --mandir=/usr/man \ --with-x \ --with${do_opengl}-opengl \ --without-capi \ --without-cups \ --without-gphoto \ --without-sane \ --without-hal \ --without-oss \ --without-v4l \ --without-xinerama \ --disable-tests \ --disable-win16 \ --program-prefix= \ --program-suffix= \ --build=$TARGET \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log

make depend 2>&1 | tee $OUTPUT/make-${PRGNAM}.log make -j1 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log

# Add the font converter programs if they were created using fontforge: # (useful if you need to convert a Windows .fon file to UNIX .bdf) install -m 755 tools/{fnt2fon,sfnt2fnt} $PKG/usr/bin

# Add a desktop menu for the winecfg program: mkdir -p $PKG/usr/share/{icons/hicolor/scalable/apps,pixmaps} convert $SRCDIR/wine.svg -scale 64 $PKG/usr/share/pixmaps/wine.png cp -a $SRCDIR/wine.svg $PKG/usr/share/icons/hicolor/scalable/apps/ # I used karbon to extract a single picture out of the SVG: convert $SRCDIR/winecfg.png -scale 64 $PKG/usr/share/pixmaps/winecfg.png cp -a programs/winecfg/winecfg.svg $PKG/usr/share/icons/hicolor/scalable/apps/ mkdir -p $PKG/usr/share/applications cat <<_EOT_ > $PKG/usr/share/applications/winecfg.desktop [Desktop Entry] Exec=winecfg Icon=winecfg Terminal=false Name=Wine Configuration Comment=Configure Wine Type=Application Categories=Application;Settings _EOT_

# Add some documentation to the package: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION find $PKG/usr/doc -type f -exec chmod 644 {} \;

# Compress the man page(s) if [ -d $PKG/usr/man ]; then cd $PKG/usr/man find . -type f -name "*.?" -exec gzip -9f {} \; for i in $(find . -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done fi

# Strip binaries find $PKG | xargs file | grep -e "executable" -e "shared object" \ | grep ELF | cut -f1 -d: | xargs strip --strip-unneeded 2>/dev/null || true

# Add a package description: mkdir -p $PKG/install cat $SRCDIR/slack-desc > $PKG/install/slack-desc if [ -f $SRCDIR/doinst.sh ]; then cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh fi if [ -f $SRCDIR/slack-required ]; then cat $SRCDIR/slack-required > $PKG/install/slack-required fi

# Build the package: cd $PKG makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log cd $OUTPUT md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz.md5 cd - cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt if [ -f $PKG/install/slack-required ]; then cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep fi

# Restore the original umask: umask ${_UMASK_}

Как этот рак собирать-то надо? *WALL* Собрался же, гад!

#283374

А как же

text

cat /etc/*version; uname -m
which wineserver
ldd $(which wineserver)
readelf -h $(which wineserver)
#283484
bormant написал:
А как же
text

cat /etc/*version; uname -m
which wineserver
ldd $(which wineserver)
readelf -h $(which wineserver)

text
at /etc/*version; uname -m
Slackware 14.0
i686

which wineserver which: no wineserver in (/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/kde4/libexec:/usr/lib/qt/bin:/usr/share/texmf/bin:.)

ldd $(which wineserver) which: no wineserver in (/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/kde4/libexec:/usr/lib/qt/bin:/usr/share/texmf/bin:.) ldd: отсутствуют аргументы, задающие файлы Попробуйте «ldd --help» для получения более подробного описания.

readelf -h $(which wineserver) which: no wineserver in (/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/kde4/libexec:/usr/lib/qt/bin:/usr/share/texmf/bin:.) readelf: Предупреждение: Нечего выполнять.

#283619
"Wehrmacht_Rover" написал:
which wineserver
which: no wineserver in...

Если я ничего не путаю, то нужно это эт рута выполнить.

#283646
"SergMarkov" написал:

Вообще-то циферки я и так увидел :D , меня интересует что за сборка. И чем она отличается от официальной с sourceforge?
P.S.: Версия и номер версии - это разные вещи *YES*
P.S.S.: Вместе со слакбилдом были какие-то патчи... это я забыл указать :[

#283752

От Salix Смотреть слакбилд саликса
А вообще благословенные св. Патриком люди на slackbuilds.ord дело глаголят, сказано там "ставь 4.1", значит ставь именно ее :-)

Войдите или зарегистрируйтесь, чтобы ответить.