system/pixma: Fix 32bit build

Signed-off-by: Christoph Willing <chris.willing@linux.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Christoph Willing 2022-03-25 08:49:18 +10:00 committed by Willy Sudiarto Raharjo
parent 9296d4a87d
commit 70d91ee566
No known key found for this signature in database
GPG key ID: 3F617144D7238786

View file

@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=pixma
VERSION=${VERSION:-4.00.1}
BUILD=${BUILD:-2}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -41,9 +41,6 @@ if [ -z "$ARCH" ]; then
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 "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@ -56,15 +53,20 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
BUILD_LIBDIRSUFFIX=32
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
BUILD_LIBDIRSUFFIX=32
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
BUILD_LIBDIRSUFFIX=64
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
echo "$ARCH not supported"
exit 1
fi
PRINTER_PKG_PROGRAM="ppd cnijfilter"
@ -116,10 +118,10 @@ find -L . \
(cd ./cngpijmnt; CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin )
(cd ./pstocanonij; CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" ./autogen.sh --libdir=/usr/lib$LIBDIRSUFFIX --enable-progpath=/usr/bin )
(cd ./backend; CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin )
(cd ./backendnet; CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin LDFLAGS="-L../../com/libs_bin$LIBDIRSUFFIX" )
(cd ./backendnet; CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin LDFLAGS="-L../../com/libs_bin$BUILD_LIBDIRSUFFIX" )
(cd ./cmdtocanonij; CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" ./autogen.sh --prefix=/usr --libdir=/usr/lib$LIBDIRSUFFIX )
(cd ./cnijbe; CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin )
(cd ./lgmon2; CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin LDFLAGS="-L../../com/libs_bin$LIBDIRSUFFIX" )
(cd ./lgmon2; CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin LDFLAGS="-L../../com/libs_bin$BUILD_LIBDIRSUFFIX" )
(cd ./ppd; CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" ./autogen.sh --prefix=/usr --enable-ppdpath=/usr/share/ppd --program-suffix=CN_IJ_MODEL )
(cd ./cnijfilter; CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" ./autogen.sh --prefix=/usr --enable-libpath=/usr/lib$LIBDIRSUFFIX/bjlib --enable-binpath=/usr/bin --program-suffix=CN_IJ_MODEL )
@ -143,12 +145,12 @@ for pkg in $PRINTER_DEPEND_PKG ; do
popd
done
mkdir -p ${PKG}/usr/lib${LIBDIRSUFFIX}
install -m 755 ${model_num}/libs_bin${LIBDIRSUFFIX}/libcnbpcmcm${model_num}.so.* ${PKG}/usr/lib${LIBDIRSUFFIX}/
install -m 755 ${model_num}/libs_bin${LIBDIRSUFFIX}/libcnbpcnclapi${model_num}.so.* ${PKG}/usr/lib${LIBDIRSUFFIX}/
install -m 755 ${model_num}/libs_bin${LIBDIRSUFFIX}/libcnbpcnclbjcmd${model_num}.so.* ${PKG}/usr/lib${LIBDIRSUFFIX}/
install -m 755 ${model_num}/libs_bin${LIBDIRSUFFIX}/libcnbpcnclui${model_num}.so.* ${PKG}/usr/lib${LIBDIRSUFFIX}/
install -m 755 ${model_num}/libs_bin${LIBDIRSUFFIX}/libcnbpess${model_num}.so.* ${PKG}/usr/lib${LIBDIRSUFFIX}/
install -m 755 ${model_num}/libs_bin${LIBDIRSUFFIX}/libcnbpo${model_num}.so.* ${PKG}/usr/lib${LIBDIRSUFFIX}/
install -m 755 ${model_num}/libs_bin${BUILD_LIBDIRSUFFIX}/libcnbpcmcm${model_num}.so.* ${PKG}/usr/lib${LIBDIRSUFFIX}/
install -m 755 ${model_num}/libs_bin${BUILD_LIBDIRSUFFIX}/libcnbpcnclapi${model_num}.so.* ${PKG}/usr/lib${LIBDIRSUFFIX}/
install -m 755 ${model_num}/libs_bin${BUILD_LIBDIRSUFFIX}/libcnbpcnclbjcmd${model_num}.so.* ${PKG}/usr/lib${LIBDIRSUFFIX}/
install -m 755 ${model_num}/libs_bin${BUILD_LIBDIRSUFFIX}/libcnbpcnclui${model_num}.so.* ${PKG}/usr/lib${LIBDIRSUFFIX}/
install -m 755 ${model_num}/libs_bin${BUILD_LIBDIRSUFFIX}/libcnbpess${model_num}.so.* ${PKG}/usr/lib${LIBDIRSUFFIX}/
install -m 755 ${model_num}/libs_bin${BUILD_LIBDIRSUFFIX}/libcnbpo${model_num}.so.* ${PKG}/usr/lib${LIBDIRSUFFIX}/
mkdir -p ${PKG}/usr/lib${LIBDIRSUFFIX}/bjlib
install -m 644 ${model_num}/database/cif${model_name}.conf ${PKG}/usr/lib${LIBDIRSUFFIX}/bjlib
install -m 644 ${model_num}/database/cnb_${model_num}0.tbl ${PKG}/usr/lib${LIBDIRSUFFIX}/bjlib
@ -170,8 +172,8 @@ done
( cd ./cnijbe; make clean; make; make install DESTDIR=$PKG )
( cd ./lgmon2; make clean; make; make install DESTDIR=$PKG )
install -m 755 com/libs_bin${LIBDIRSUFFIX}/libcnnet.so.* ${PKG}/usr/lib${LIBDIRSUFFIX}/
install -m 755 com/libs_bin${LIBDIRSUFFIX}/libcnbpcnclapicom.so.* ${PKG}/usr/lib${LIBDIRSUFFIX}/
install -m 755 com/libs_bin${BUILD_LIBDIRSUFFIX}/libcnnet.so.* ${PKG}/usr/lib${LIBDIRSUFFIX}/
install -m 755 com/libs_bin${BUILD_LIBDIRSUFFIX}/libcnbpcnclapicom.so.* ${PKG}/usr/lib${LIBDIRSUFFIX}/
install -m 644 -o lp -g lp com/ini/cnnet.ini ${PKG}/usr/lib${LIBDIRSUFFIX}/bjlib/ || true
mkdir -p $PKG/etc/udev/rules.d