LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-01-2022, 01:28 PM   #826
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,531

Rep: Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371

Quote:
Originally Posted by ZhaoLin1457 View Post
I understand. I have only one another curiosity: with this drirc workaround will work also the Wayland sessions of Plasma5?

I ask because I've heard that OpenGL 2.1 is enough for having functional Wayland sessions on Plasma5.
Yes, the OpenGL 2.1 is enough for the proper work of Wayland/Plasma5 as I tested with my mini-PC Fujitsu-Siemens Q5030 with Intel GMA4500HD graphics and with my old laptop, a Dell Inspiron n5030 with Intel GMA4500 graphics.

But, apparently they are the lower limit of hardware working with Wayland/Plasma5 and still supported by Crocus, then capable to work with Mesa superior of 21.3.x.

However, even with this drirc workaround which ends with emulating OpenGL 2.1 in Intel GMA3150 graphics, the Wayland/Plasma5 will NOT work at all, because the KMS framebuffer still has support of OpenGL 1.4 and nothing more. At least this says the error given by startkwayland, as I tested this way.

Last edited by LuckyCyborg; 07-01-2022 at 01:30 PM.
 
1 members found this post helpful.
Old 07-03-2022, 02:35 PM   #827
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 239Reputation: 239Reputation: 239
Maybe, if not requested already, an update to python setuptools?

We ran into a problem concerning SBo packages, like kiwi-solver, that require setuptools >= 61.2. Without keeping in line it won't make sense to update python packages (who will all adapt to setup-tools) even if these just work fine.

Thanks.

Rob
 
Old 07-03-2022, 06:06 PM   #828
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,338

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
Quote:
Originally Posted by brobr View Post
Maybe, if not requested already, an update to python setuptools?

We ran into a problem concerning SBo packages, like kiwi-solver, that require setuptools >= 61.2. Without keeping in line it won't make sense to update python packages (who will all adapt to setup-tools) even if these just work fine.

Thanks.

Rob
and where is the problem ?

SBo provides slackbuilds for stable branches , update setuptools on current dont solve npthing under SBo.
 
Old 07-05-2022, 08:23 AM   #829
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,531

Rep: Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371
Here is my latest mesa.SlackBuild for Mesa 22.1.3 (and Mesa-demos 8.5.0) which adds also the i915g driver for graphics like Intel GMA3150 .

Those Intel graphics are OpenGL 1.4 capable with the classic i915 driver, and I've seen being raised as a point of "missing feature" on modern Mesa, which requires the Mesa Amber as alternative, or... God Forbid! to stay stuck with Mesa 21.3.x till 2026.

However, the i915g driver gives an OpenGL 2.1 compatibility with my HP Compaq dc7800 having Intel GMA3150, and it's visible faster than the classic i915 driver.

Testing with XFCE, the i915g driver gives a fine and responsive desktop as seen also in the attached screenshot - anyway on this aging hardware probably XFCE is the better DE to use.

Testing with Plasma5, the i915g driver is visible faster, the desktop is quite fluid with all KWin effects enabled as default (not sure if also Blur works) and even the taskbar thumbnails works acceptable.

However, there are some artifacts on the Plasma5 configuration applications and some panel (and screen) flickering. BUT, this panel and screen flickering exists also with the classic i915 driver which also is considerable more sluggish.

At least for me, the i915g driver works quite decent with Intel GMA3150 graphics, which is the oldest hardware where I managed to still run decently the modern Plasma5. And I believe that's the way to go.

Anyway, we have support for Intel i915 graphics with the modern Mesa and if there are really Plasma5 users using it, they always can go reporting to Mesa bugtracker to fix the i915g driver. I see no advantage with staying glued to Mesa 21.3.x ...

What we wait? The distributions (which already started to go x86_64 v2) to fix this i915g driver or for Mesa Amber to go EOL in AD 2026, while IF we are lucky we will get Slackware 15.1 in the AD 2027?

Code:
#!/bin/bash

# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021  Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

cd $(dirname $0) ; CWD=$(pwd)

PKGNAM=mesa
VERSION=${VERSION:-$(echo $PKGNAM-[0-9]*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
DEMOVERS=${DEMOVERS:-8.5.0}
BUILD=${BUILD:-1}
BUILD_DEMOS=${BUILD_DEMOS:-YES}

NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}

# Be sure this list is up-to-date:
GALLIUM_DRIVERS="nouveau,r300,r600,svga,radeonsi,swrast,virgl,iris,crocus,i915,zink"

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) export ARCH=i586 ;;
    arm*) export ARCH=arm ;;
       *) export ARCH=$( uname -m ) ;;
  esac
fi

# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
  exit 0
fi

## COMMENTED OUT as swr seems to be broken with llvm13:
## Build swr for the following architectures (not for i?x6, as this will cause
## an Illegal Instruction startup failure on many otherwise supported CPUs):
#for swr_arch in x86_64 ; do
#  if [ "$ARCH" = "x86_64" ]; then
#    GALLIUM_DRIVERS="$GALLIUM_DRIVERS,swr"
#  fi
#done

TMP=${TMP:-/tmp}
PKG=$TMP/package-mesa

if [ "$ARCH" = "i586" ]; then
  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf ${PKGNAM}-${VERSION}

tar xvf $CWD/${PKGNAM}-${VERSION}.tar.?z || exit 1
cd ${PKGNAM}-$VERSION || exit 1

# Let's kill the warning about operating on a dangling symlink:
rm -f src/gallium/state_trackers/d3d1x/w32api

# Make sure ownerships and permissions are sane:
chown -R root:root .
find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  -exec chmod 755 {} \+ -o \
  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  -exec chmod 644 {} \+

# Apply patches from git (and maybe elsewhere):
# Patches obtained by:
#   git checkout origin/17.2
#   git format-patch 93c2beafc0a7fa2f210b006d22aba61caa71f773 # 17.2.6 release
if /bin/ls $CWD/patches/*.patch 1> /dev/null 2> /dev/null ; then
  for patch in $CWD/patches/*.patch ; do
    patch -p1 --verbose < $patch || exit 1 ;
  done
fi

# Revert these patches from git (and maybe elsewhere):
if /bin/ls $CWD/patches-revert/*.patch 1> /dev/null 2> /dev/null ; then
  for patch in $CWD/patches-revert/*.patch ; do
    patch -p1 -R --verbose < $patch || exit 1 ;
  done
fi

# Configure, build, and install:
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
mkdir meson-build
cd meson-build
meson setup \
  --prefix=/usr \
  --libdir=lib${LIBDIRSUFFIX} \
  --libexecdir=/usr/libexec \
  --bindir=/usr/bin \
  --sbindir=/usr/sbin \
  --includedir=/usr/include \
  --datadir=/usr/share \
  --mandir=/usr/man \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --buildtype=release \
  -Dplatforms=x11,wayland \
  -Dgallium-opencl=icd \
  -Dgallium-nine=true \
  -Dosmesa=true \
  -Dgallium-drivers=$GALLIUM_DRIVERS \
  -Dvulkan-drivers=amd,intel,swrast \
  -Dvulkan-layers=device-select,intel-nullhw,overlay \
  -Dglvnd=true \
  -Dllvm=enabled \
  -Dshared-llvm=enabled \
  -Dshared-glapi=enabled \
  -Degl=enabled \
  -Dgles1=enabled \
  -Dgles2=enabled \
  -Dopengl=true \
  -Dglx=dri \
  .. || exit 1
  "${NINJA:=ninja}" $NUMJOBS || exit 1
  DESTDIR=$PKG $NINJA install || exit 1
cd ..

# Install /etc/drirc as a .new file:
if [ -r $PKG/etc/drirc ]; then
  mv $PKG/etc/drirc $PKG/etc/drirc.new
fi

# Add a default provider for glvnd when the vendor cannot be determined:
( cd $PKG/usr/lib${LIBDIRSUFFIX}
  if [ ! -r libGLX_system.so.0 ]; then
    ln -sf libGLX_mesa.so.0 libGLX_system.so.0
  fi
)

if [ "$BUILD_DEMOS" = "YES" ]; then
  # Now build/install a small subset of the demos:
  export CWD SLKCFLAGS NUMJOBS PKG
  ( cd $TMP
    rm -rf mesa-demos-$DEMOVERS
    tar xvf $CWD/mesa-demos-$DEMOVERS.tar.?z* || exit 1
    cd mesa-demos-$DEMOVERS
    chown -R root:root .
    find . \
      \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
      -exec chmod 755 {} \+ -o \
    \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
      -exec chmod 644 {} \+
    CFLAGS="$SLKCFLAGS" \
    ./configure \
      --prefix=/usr \
      --enable-autotools \
      --build=$ARCH-slackware-linux || exit 1
    make $NUMJOBS || exit 1
    # Install all the demos (including the pointless ones) at first, in a
    # temporary location:
    make install DESTDIR=$PKG/cruft || exit 1
    # Install gears and glinfo, as well as a few other demos:
    mkdir -p $PKG/usr/bin
    for demo in eglinfo gears glinfo glthreads glxcontexts glxdemo glxgears \
      glxgears_fbconfig glxheads glxinfo glxpbdemo glxpixmap ; do
      mv --verbose $PKG/cruft/usr/bin/$demo $PKG/usr/bin
  done
    # Remove cruft:
    rm -rf $PKG/cruft
  ) || exit 1
fi

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

find $PKG/usr/man -type f -exec gzip -9 {} \+
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done

# Compress info files, if any:
if [ -d $PKG/usr/info ]; then
  rm -f $PKG/usr/info/dir
  gzip -9 $PKG/usr/info/*
fi

mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/html
cp -a \
  docs/COPYING* docs/relnotes/${VERSION}.html docs/README* docs/GL* \
  $PKG/usr/doc/$PKGNAM-$VERSION
cp -a docs/*.html $PKG/usr/doc/$PKGNAM-$VERSION/html
rm -f $PKG/usr/doc/$PKGNAM-$VERSION/html/relnotes*.html

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2022-07-05_15-19-46.png
Views:	56
Size:	226.7 KB
ID:	39220   Click image for larger version

Name:	Screenshot_20220705_152633.jpg
Views:	62
Size:	184.4 KB
ID:	39221  

Last edited by LuckyCyborg; 07-05-2022 at 10:02 AM.
 
7 members found this post helpful.
Old 07-05-2022, 12:17 PM   #830
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,393

Rep: Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119
Quote:
Originally Posted by eming View Post
Hi franzen,

here is the list of the removed packages:
...

The removal of some of those packages (e.g. mdframed, comment, ...) broke many
latex documents compilation on my machine.

I don't think that all of those packages are deprecated and I think that the the removal
should be motivated/reported somewhere (I don't find it on Slackware-current changelog)
or at least they should be moved in texlive-extra IMHO.

Thank you, best regards.
Can you put it in a txt attachment ?
 
Old 07-05-2022, 12:19 PM   #831
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,393

Rep: Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119
Firefox 102.0.1

Release notes:
https://www.mozilla.org/en-US/firefo.../releasenotes/
 
Old 07-05-2022, 04:34 PM   #832
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 239Reputation: 239Reputation: 239
Quote:
Originally Posted by USUARIONUEVO View Post
and where is the problem ?

SBo provides slackbuilds for stable branches , update setuptools on current dont solve npthing under SBo.
You are correct, it would need to end up in the patches for 15.0 as well.
 
Old 07-05-2022, 04:53 PM   #833
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,338

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
I read changelog from todays and see we back to old shared libs way for llvm.

When test to enable the new way , we need enable 2 parameters.

-DBUILD_SHARED_LIBS=ON: if used instead of -DLLVM_BUILD_LLVM_DYLIB=ON and -DLLVM_LINK_LLVM_DYLIB=ON, builds all the LLVM libraries (about 60) as shared libraries instead of static.

Quote:
-DLLVM_BUILD_LLVM_DYLIB=ON
-DLLVM_LINK_LLVM_DYLIB=ON
the last test enables one or the two options ?

cause its strange to see arch or lfs go in the new way and build firefox without issues.
 
Old 07-06-2022, 02:21 AM   #834
ppr:kut
Slackware Contributor
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 631

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
Code:
  cmake -GNinja \
    -DCMAKE_C_COMPILER="clang" \
    -DCMAKE_CXX_COMPILER="clang++" \
    -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DLLVM_LIBDIR_SUFFIX=${LIBDIRSUFFIX} \
    -DCMAKE_BUILD_TYPE=Release \
    -DLLVM_BUILD_LLVM_DYLIB=ON \
    -DLLVM_LINK_LLVM_DYLIB=ON \
    -DCLANG_LINK_CLANG_DYLIB=ON \
    -DLLVM_USE_LINKER=gold \
    -DLLVM_ENABLE_RTTI=ON \
    -DLLVM_ENABLE_FFI=ON \
    -DLLVM_ENABLE_ASSERTIONS=OFF \
    -DLLVM_INSTALL_UTILS=ON \
    -DLLVM_BINUTILS_INCDIR=/usr/include \
    -DCLANG_RESOURCE_DIR="../lib${LIBDIRSUFFIX}/clang/${VERSION}" \
    -DLLVM_TARGETS_TO_BUILD="host;AMDGPU;BPF" \
    -DLLDB_USE_SYSTEM_SIX=1 \
    -DLLVM_INCLUDE_BENCHMARKS=OFF \
    -DCOMPILER_RT_BUILD_LIBFUZZER=OFF \
    $CLANGD \
    ..  || exit 1
This is what the build used.
 
Old 07-06-2022, 11:53 AM   #835
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,393

Rep: Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119
Thunderbird 102.0.1

Release notes:
https://www.thunderbird.net/en-US/th.../releasenotes/
 
Old 07-06-2022, 12:46 PM   #836
gmgf
Senior Member
 
Registered: Jun 2012
Location: Bergerac, France
Distribution: Slackware
Posts: 2,227

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
sorry bad post.

Last edited by gmgf; 07-06-2022 at 12:59 PM.
 
Old 07-07-2022, 12:14 AM   #837
franzen
Member
 
Registered: Nov 2012
Distribution: slackware
Posts: 535

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
CVE-2022-30550: Privilege escalation possible in dovecot when similar master and non-master passdbs are used
CVSS: 6.8, impacted versions: from 2.2 to 2.3.19.1
 
Old 07-07-2022, 04:55 AM   #838
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,393

Rep: Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119
Quote:
Originally Posted by franzen View Post
Just a suggestion ==>

https://www.linuxquestions.org/quest...ch-4175708118/

;-)

Last edited by marav; 07-07-2022 at 06:20 AM.
 
1 members found this post helpful.
Old 07-07-2022, 06:05 AM   #839
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,393

Rep: Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119Reputation: 4119
KDE Gear 22.04.3

Code:
Today they all get new bugfix source releases with updated translations, including:
    elisa: Fix the seek slider with newer versions of qqc2-desktop-style Commit, #455339
    konsole: Better recognition for URIs, e.g. Commit, #455166
    korganizer: Fix a crash when completing a to-do in the summary view Commit #454536
Announcements:
https://kde.org/announcements/gear/22.04.3/
 
1 members found this post helpful.
Old 07-10-2022, 04:16 PM   #840
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,531

Rep: Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371Reputation: 3371
And here are the results of my latest experiments with modern Mesa and Mesa Amber...

Practically, some time ago, I've found the Gentoo's Mesa Amber build, where they install it in parallel with the main Mesa, which is on latest version.

https://gitweb.gentoo.org/repo/gento...-21.3.9.ebuild

Well, I've managed to make a build like them, with only the classic DRI drivers, along with libEGL_amber and libGLX_amber shipped, BUT I've hit a strange issue, by having a freeze/lock in starting X11 session, BUT only on -current. With Slackware 15.0 everything worked fine.

BTW, IF someone is interested regarding this particular mesa-amber.SlackBuild, I can show it any time, just ask.

Trying to investigate this issue present on -current with my Mesa and Mesa Amber duet, I've managed to contact someone who in the past worked with Mesa - a former Mesa programmer.

After my explanation about what I try do do, this guy told me that in fact, I need to care only regarding building and packaging the classic DRI drivers living in /usr/lib{,64}/dri , because they should work well on top of stock Mesa, as the base infrastructure of it is unchanged as logic since long years.

Following this suggestion, I've prepared a build of latest Mesa 22.1.3 and along another package shipping only those classic DRI drivers from Mesa 21.3.9 in an Amber type build.

Guess what? Everything works fine both in Slackware-current and Slackware 15.0, and I tested by using the i965 driver with Intel SandyBridge graphics and i915 driver with Intel GMA3150 graphics. The conclusion is that Mesa 22.1.3 can use quite well the classic DRI drivers, if they are present, just like this former Mesa programmer said.

So, there is my mesa.SlackBuild, where I tried to emulate at best the Slackware "way" and this means that I've not built i915g driver, despite I consider it visible superior as performances to the classic one.
Code:
#!/bin/bash

# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021  Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

cd $(dirname $0) ; CWD=$(pwd)

PKGNAM=mesa
VERSION=${VERSION:-$(echo $PKGNAM-[0-9]*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
DEMOVERS=${DEMOVERS:-8.5.0}
BUILD=${BUILD:-1}
BUILD_DEMOS=${BUILD_DEMOS:-YES}

NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}

# Be sure this list is up-to-date:
GALLIUM_DRIVERS="nouveau,r300,r600,svga,radeonsi,swrast,virgl,iris,crocus,zink"

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) export ARCH=i586 ;;
    arm*) export ARCH=arm ;;
       *) export ARCH=$( uname -m ) ;;
  esac
fi

# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
  exit 0
fi

## COMMENTED OUT as swr seems to be broken with llvm13:
## Build swr for the following architectures (not for i?x6, as this will cause
## an Illegal Instruction startup failure on many otherwise supported CPUs):
#for swr_arch in x86_64 ; do
#  if [ "$ARCH" = "x86_64" ]; then
#    GALLIUM_DRIVERS="$GALLIUM_DRIVERS,swr"
#  fi
#done

TMP=${TMP:-/tmp}
PKG=$TMP/package-mesa

if [ "$ARCH" = "i586" ]; then
  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf ${PKGNAM}-${VERSION}

tar xvf $CWD/${PKGNAM}-${VERSION}.tar.?z || exit 1
cd ${PKGNAM}-$VERSION || exit 1

# Let's kill the warning about operating on a dangling symlink:
rm -f src/gallium/state_trackers/d3d1x/w32api

# Make sure ownerships and permissions are sane:
chown -R root:root .
find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  -exec chmod 755 {} \+ -o \
  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  -exec chmod 644 {} \+

# Apply patches from git (and maybe elsewhere):
# Patches obtained by:
#   git checkout origin/17.2
#   git format-patch 93c2beafc0a7fa2f210b006d22aba61caa71f773 # 17.2.6 release
if /bin/ls $CWD/patches/*.patch 1> /dev/null 2> /dev/null ; then
  for patch in $CWD/patches/*.patch ; do
    patch -p1 --verbose < $patch || exit 1 ;
  done
fi

# Revert these patches from git (and maybe elsewhere):
if /bin/ls $CWD/patches-revert/*.patch 1> /dev/null 2> /dev/null ; then
  for patch in $CWD/patches-revert/*.patch ; do
    patch -p1 -R --verbose < $patch || exit 1 ;
  done
fi

# Configure, build, and install:
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
mkdir meson-build
cd meson-build
meson setup \
  --prefix=/usr \
  --libdir=lib${LIBDIRSUFFIX} \
  --libexecdir=/usr/libexec \
  --bindir=/usr/bin \
  --sbindir=/usr/sbin \
  --includedir=/usr/include \
  --datadir=/usr/share \
  --mandir=/usr/man \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --buildtype=release \
  -Dplatforms=x11,wayland \
  -Dgallium-opencl=icd \
  -Dgallium-nine=true \
  -Dosmesa=true \
  -Dgallium-drivers=$GALLIUM_DRIVERS \
  -Dvulkan-drivers=amd,intel,swrast \
  -Dvulkan-layers=device-select,intel-nullhw,overlay \
  -Dglvnd=true \
  -Dllvm=enabled \
  -Dshared-llvm=enabled \
  -Dshared-glapi=enabled \
  -Degl=enabled \
  -Dgles1=enabled \
  -Dgles2=enabled \
  -Dopengl=true \
  -Dglx=dri \
  .. || exit 1
  "${NINJA:=ninja}" $NUMJOBS || exit 1
  DESTDIR=$PKG $NINJA install || exit 1
cd ..

# Install /etc/drirc as a .new file:
if [ -r $PKG/etc/drirc ]; then
  mv $PKG/etc/drirc $PKG/etc/drirc.new
fi

# Add a default provider for glvnd when the vendor cannot be determined:
( cd $PKG/usr/lib${LIBDIRSUFFIX}
  if [ ! -r libGLX_system.so.0 ]; then
    ln -sf libGLX_mesa.so.0 libGLX_system.so.0
  fi
)

if [ "$BUILD_DEMOS" = "YES" ]; then
  # Now build/install a small subset of the demos:
  export CWD SLKCFLAGS NUMJOBS PKG
  ( cd $TMP
    rm -rf mesa-demos-$DEMOVERS
    tar xvf $CWD/mesa-demos-$DEMOVERS.tar.?z* || exit 1
    cd mesa-demos-$DEMOVERS
    chown -R root:root .
    find . \
      \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
      -exec chmod 755 {} \+ -o \
    \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
      -exec chmod 644 {} \+
    CFLAGS="$SLKCFLAGS" \
    ./configure \
      --prefix=/usr \
      --enable-autotools \
      --build=$ARCH-slackware-linux || exit 1
    make $NUMJOBS || exit 1
    # Install all the demos (including the pointless ones) at first, in a
    # temporary location:
    make install DESTDIR=$PKG/cruft || exit 1
    # Install gears and glinfo, as well as a few other demos:
    mkdir -p $PKG/usr/bin
    for demo in eglinfo gears glinfo glthreads glxcontexts glxdemo glxgears \
      glxgears_fbconfig glxheads glxinfo glxpbdemo glxpixmap ; do
      mv --verbose $PKG/cruft/usr/bin/$demo $PKG/usr/bin
  done
    # Remove cruft:
    rm -rf $PKG/cruft
  ) || exit 1
fi

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

find $PKG/usr/man -type f -exec gzip -9 {} \+
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done

# Compress info files, if any:
if [ -d $PKG/usr/info ]; then
  rm -f $PKG/usr/info/dir
  gzip -9 $PKG/usr/info/*
fi

mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/html
cp -a \
  docs/COPYING* docs/relnotes/${VERSION}.html docs/README* docs/GL* \
  $PKG/usr/doc/$PKGNAM-$VERSION
cp -a docs/*.html $PKG/usr/doc/$PKGNAM-$VERSION/html
rm -f $PKG/usr/doc/$PKGNAM-$VERSION/html/relnotes*.html

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
And there is my mesa-amber.SlackBuild, which generates a package containing only the classic DRI drivers, and it's supposed to be an add-on to the main Mesa package.
Code:
#!/bin/bash

# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021  Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

cd $(dirname $0) ; CWD=$(pwd)

PKGNAM=mesa
VERSION=${VERSION:-$(echo $PKGNAM-[0-9]*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}

NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}

# Be sure this list is up-to-date:
DRI_DRIVERS="i915,i965,r100,r200,nouveau"

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) export ARCH=i586 ;;
    arm*) export ARCH=arm ;;
       *) export ARCH=$( uname -m ) ;;
  esac
fi

# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
  exit 0
fi

TMP=${TMP:-/tmp}
PKG=$TMP/package-mesa-amber

if [ "$ARCH" = "i586" ]; then
  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf ${PKGNAM}-${VERSION}

tar xvf $CWD/${PKGNAM}-${VERSION}.tar.?z || exit 1
cd ${PKGNAM}-$VERSION || exit 1

# Let's kill the warning about operating on a dangling symlink:
rm -f src/gallium/state_trackers/d3d1x/w32api

# Make sure ownerships and permissions are sane:
chown -R root:root .
find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  -exec chmod 755 {} \+ -o \
  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  -exec chmod 644 {} \+

# Apply patches from git (and maybe elsewhere):
# Patches obtained by:
#   git checkout origin/17.2
#   git format-patch 93c2beafc0a7fa2f210b006d22aba61caa71f773 # 17.2.6 release
if /bin/ls $CWD/patches/*.patch 1> /dev/null 2> /dev/null ; then
  for patch in $CWD/patches/*.patch ; do
    patch -p1 --verbose < $patch || exit 1 ;
  done
fi

# Revert these patches from git (and maybe elsewhere):
if /bin/ls $CWD/patches-revert/*.patch 1> /dev/null 2> /dev/null ; then
  for patch in $CWD/patches-revert/*.patch ; do
    patch -p1 -R --verbose < $patch || exit 1 ;
  done
fi

# Configure, build, and install:
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
mkdir meson-build
cd meson-build
meson setup \
  --prefix=/usr \
  --libdir=lib${LIBDIRSUFFIX} \
  --libexecdir=/usr/libexec \
  --bindir=/usr/bin \
  --sbindir=/usr/sbin \
  --includedir=/usr/include \
  --datadir=/usr/share \
  --mandir=/usr/man \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --buildtype=release \
  -Dplatforms=x11,wayland \
  -Damber=true \
  -Ddri-drivers=$DRI_DRIVERS \
  -Dgallium-drivers='' \
  -Dvulkan-drivers='' \
  -Dosmesa=false \
  -Dglvnd=true \
  -Dllvm=enabled \
  -Dshared-llvm=enabled \
  -Dshared-glapi=enabled \
  -Degl=enabled \
  -Dgles1=enabled \
  -Dgles2=enabled \
  -Dopengl=true \
  -Dglx=dri \
  .. || exit 1
  "${NINJA:=ninja}" $NUMJOBS || exit 1
  DESTDIR=$PKG/cruft $NINJA install || exit 1
cd ..

# We will install the DRI drivers only:
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
mv --verbose $PKG/cruft/usr/lib${LIBDIRSUFFIX}/dri $PKG/usr/lib${LIBDIRSUFFIX}
rm -rf $PKG/cruft

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

find $PKG/usr/man -type f -exec gzip -9 {} \+
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done

# Compress info files, if any:
if [ -d $PKG/usr/info ]; then
  rm -f $PKG/usr/info/dir
  gzip -9 $PKG/usr/info/*
fi

mkdir -p $PKG/usr/doc/$PKGNAM-amber-$VERSION/html
cp -a \
  docs/COPYING* docs/relnotes/${VERSION}.html docs/README* docs/GL* \
  $PKG/usr/doc/$PKGNAM-amber-$VERSION
cp -a docs/*.html $PKG/usr/doc/$PKGNAM-amber-$VERSION/html
rm -f $PKG/usr/doc/$PKGNAM-amber-$VERSION/html/relnotes*.html

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $TMP/${PKGNAM}-amber-$VERSION-$ARCH-$BUILD.txz
The result is a set of two packages: mesa-22.1.3-x86_64-1.txz and mesa-amber-21.3.9-x86_64-1.txz, where the second one is required ONLY when we want support for the really old graphics hardware or to use the i965 driver. Together they acts just like the today -current's Mesa package, with the single difference being the preference of Gallim's Crocus, in defavor of classic i965 driver.

I for one, also I would prefer the Gallium's i915 driver instead of the classic one given by Mesa Amber, because the i915g driver is visible faster and has better OpenGL support: 2.1, which is enough to drive Plasma5. BUT, like I said, at least with Plasma5 it shows some artifacts and flickering - in a bigger number compared with the classic i915 driver.

However, if we think in the long term, the i915g driver is maintained within the modern Mesa, then its life span will be longer than of classic i915 driver, which will go EOL in AD 2026 together with Mesa Amber. And the Mesa developers probably can fix the i915g quite fast, if they see interest for it.

After all, they written from scratch the Crocus quite fast, to replace the more complicated i965 classic driver.

That said, I hope that the Mesa package(s) will be updated quite soon in the -current.

Last edited by LuckyCyborg; 07-10-2022 at 04:44 PM.
 
10 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 2.4 requests to non-SSL site with "Upgrade-Insecure-Requests: 1" and no trailing / get redirected to default site owendelong Linux - Server 2 06-22-2021 02:08 PM
[SOLVED] Requests for -current (20151216) rworkman Slackware 3441 12-28-2017 03:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration