SHARE
TWEET

Add Native 64-bit Support (cnijfilter-mx920)

Maxqia Mar 6th, 2016 39 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. From 2ad3e45a04b10cc8eb46f9888f8a8309d17534b3 Mon Sep 17 00:00:00 2001
  2. From: Maxqia <contrib@maxqia.com>
  3. Date: Sat, 5 Mar 2016 19:19:14 -0800
  4. Subject: [PATCH] Add Native 64-bit Support
  5.  
  6. ---
  7. PKGBUILD                 | 25 ++++++++-----------------
  8.  buildfiles.patch         | 41 +----------------------------------------
  9.  cnijfilter-mx920.install | 10 +++++-----
  10.  3 files changed, 14 insertions(+), 62 deletions(-)
  11.  
  12. diff --git a/PKGBUILD b/PKGBUILD
  13. index f84c950..ae79e4c 100644
  14. --- a/PKGBUILD
  15. +++ b/PKGBUILD
  16. @@ -1,12 +1,13 @@
  17.  # Contributor: Johannes Dewender  arch at JonnyJD dot net
  18.  # Contributor: Behnam Momeni <sbmomeni [at the] gmail [dot] com>
  19.  # Contributor: Stefan Hackl <stef.hackl [at the] gmail [dot] com>
  20. +# Contributor: Maxqia <contrib [at the] maxqia [dot] com
  21.  
  22.  pkgname=('cnijfilter-mx920')
  23.  _pkgname=cnijfilter
  24.  
  25.  pkgver=3.90
  26. -pkgrel=1
  27. +pkgrel=2
  28.  _pkgreview=1
  29.  
  30.  pkgdesc="Canon IJ printer driver (multifunction MX920 series)"
  31. @@ -15,14 +16,8 @@ url="http://www.canon-europe.com/support/consumer_Products/products/fax__multifu
  32.  arch=('i686' 'x86_64')
  33.  license=('custom')
  34.  
  35. -makedepends_x86_64=('gcc-multilib' 'lib32-popt')
  36. -depends_x86_64=('lib32-gtk2' 'lib32-libxml2')
  37. -
  38. -makedepends_i686=('gcc' 'popt')
  39. -depends_i686=('gtk2' 'libxml2')
  40. -
  41. -makedepends=('autoconf>=2.13' 'automake>=1.6' 'tar' 'make')
  42. -depends=("${_pkgname}-common=4.00")
  43. +makedepends=('autoconf>=2.13' 'automake>=1.6' 'tar' 'make' 'gcc' 'popt')
  44. +depends=("${_pkgname}-common=4.00" 'gtk2' 'libxml2')
  45.  
  46.  install=cnijfilter-mx920.install
  47.  
  48. @@ -32,7 +27,7 @@ source=("http://gdlp01.c-wss.com/gds/1/0100005171/01/cnijfilter-source-3.90-1.ta
  49.     "mychanges.patch")
  50.  sha512sums=('9ec303dc7209f5534a20e533fc18ec810603f4515655ce67f28f0f35d521185181351fd866d2191939eb02c783b168f637e18888a4e6a1eacc9e93b1b656ebcb'
  51.              'b46027090fc03f1b6503b4532881dfb49bf69eff342d4eedca6ed8e39f896de0ff8f8c5ae3dc8e9b5645a3dd1029390668a48737ce01d58d1b01b899fad56b4c'
  52. -            'd827f8725e899cbeeae883141c55c3c1429797ceb3eaa2d11a1ab6602b4221e120f92fdee7d3ffc08cf99692332b73cb9e1da6b8d5631df3a8071dffbfde799e'
  53. +            '4532a7f3f715a8c070900d00106a6a1585e047715831ecb5ca30cf7e28917c9d307ffb9871aa7484b1aeb83357d1e8d187b2622a27a7d7055650390634ce2617'
  54.              '1cf54862db74f928a3a1ad0316b9940b843dbc4cae95bbb3d93ab317d248788cf844103bc006b4670c27b0f13952301b5907476a6c7d13ebb0cb5c0a942d6182')
  55.  
  56.  prepare() {
  57. @@ -47,9 +42,6 @@ prepare() {
  58.  
  59.  build() {
  60.    cd ${srcdir}/${_pkgname}-source-${pkgver}-${_pkgreview}
  61. -
  62. -  # TODO: it looks like the libaries can also be built for 64 bit natively
  63. -  export CC="gcc -m32"
  64.    make mx920
  65.  }
  66.  
  67. @@ -57,10 +49,9 @@ package() {
  68.    cd ${srcdir}/cnijfilter-source-${pkgver}-${_pkgreview}
  69.    make PACKAGEDIR=${pkgdir} installmx920
  70.  
  71. -  install -d ${pkgdir}/usr/lib32/bjlib
  72. -  install -m 644 417/database/* ${pkgdir}/usr/lib32/bjlib/
  73. -  install -s -m 755 417/libs_bin32/*.so.* ${pkgdir}/usr/lib32/
  74. -
  75. +  install -d ${pkgdir}/usr/lib/bjlib
  76. +  install -m 644 417/database/* ${pkgdir}/usr/lib/bjlib/
  77. +  install -s -m 755 417/libs_bin$(getconf LONG_BIT)/*.so.* ${pkgdir}/usr/lib/
  78.    install -D LICENSE-cnijfilter-${pkgver}EN.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-cnijfilter-${pkgver}EN.txt
  79.  }
  80.  
  81. diff --git a/buildfiles.patch b/buildfiles.patch
  82. index 6be4adb..b4b9664 100644
  83. --- a/buildfiles.patch
  84. +++ b/buildfiles.patch
  85. @@ -7,49 +7,10 @@ diff -aur cnijfilter-source-3.20-1/Makefile cnijfilter-source-3.20-1.new/Makefil
  86.  
  87.  +mx920 :
  88.  +  for dir in "lgmon" "ppd" "cnijfilter" "maintenance" "cngpijmon"; do \
  89. -+    (cd $$dir; ./autogen.sh --prefix=/usr --program-suffix=mx920 --enable-progpath=/usr/bin --libdir=/usr/lib32; make) || exit 1; \
  90. ++    (cd $$dir; ./autogen.sh --prefix=/usr --program-suffix=mx920 --enable-progpath=/usr/bin --libdir=/usr/lib; make) || exit 1; \
  91.  +  done
  92.  +
  93.  +installmx920 :
  94.  +  for dir in "ppd" "cnijfilter" "maintenance" "lgmon" "cngpijmon"; do \
  95.  +    (cd $$dir; make install DESTDIR=${PACKAGEDIR}) || exit 1; \
  96.  +  done
  97. -diff -ruN cnijfilter-source-4.00-1.orig/lgmon/configure.in cnijfilter-source-4.00-1/backendnet/configure.in
  98. ---- cnijfilter-source-4.00-1.orig/lgmon/configure.in   2013-07-17 06:03:45.000000000 +0430
  99. -+++ cnijfilter-source-4.00-1/lgmon/configure.in    2015-08-04 16:54:42.385652052 +0430
  100. -@@ -43,7 +43,8 @@
  101. - esac
  102. - AC_SUBST(CNCL_LIB_ID)
  103. -
  104. --ARC=`getconf LONG_BIT`
  105. -+#ARC=`getconf LONG_BIT`
  106. -+ARC=32
  107. - AC_SUBST(ARC)
  108. -
  109. - AC_PROG_CC
  110. -diff -ruN cnijfilter-source-4.00-1.orig/cnijfilter/configure.in cnijfilter-source-4.00-1/cnijfilter/configure.in
  111. ---- cnijfilter-source-4.00-1.orig/cnijfilter/configure.in  2013-07-17 06:03:45.000000000 +0430
  112. -+++ cnijfilter-source-4.00-1/cnijfilter/configure.in   2015-08-04 16:55:56.955652143 +0430
  113. -@@ -43,7 +43,8 @@
  114. - esac
  115. - AC_SUBST(CNCL_LIB_ID)
  116. -
  117. --ARC=`getconf LONG_BIT`
  118. -+#ARC=`getconf LONG_BIT`
  119. -+ARC=32
  120. - AC_SUBST(ARC)
  121. -
  122. - AC_PROG_CC
  123. -diff -ruN cnijfilter-source-4.00-1.orig/maintenance/configure.in cnijfilter-source-4.00-1/backendnet/configure.in
  124. ---- cnijfilter-source-4.00-1.orig/maintenance/configure.in 2013-07-17 06:03:45.000000000 +0430
  125. -+++ cnijfilter-source-4.00-1/maintenance/configure.in  2015-08-04 16:54:42.385652052 +0430
  126. -@@ -19,7 +19,8 @@
  127. - XML2_CFLAGS=`xml2-config --cflags`
  128. - AC_SUBST(XML2_CFLAGS)
  129. -
  130. --ARC=`getconf LONG_BIT`
  131. -+#ARC=`getconf LONG_BIT`
  132. -+ARC=32
  133. - AC_SUBST(ARC)
  134. -
  135. - AC_OUTPUT([
  136. diff --git a/cnijfilter-mx920.install b/cnijfilter-mx920.install
  137. index 180e381..9b34eff 100644
  138. --- a/cnijfilter-mx920.install
  139. +++ b/cnijfilter-mx920.install
  140. @@ -1,22 +1,22 @@
  141.  post_install() {
  142.     if [ -x /sbin/ldconfig ]; then
  143. -     /sbin/ldconfig /usr/lib32
  144. +     /sbin/ldconfig /usr/lib
  145.     fi
  146.     echo "You need to add the printer by visiting <http://localhost:631/> after starting the cups service."
  147.  }
  148.  post_upgrade() {
  149.     if [ -x /sbin/ldconfig ]; then
  150. -     /sbin/ldconfig /usr/lib32
  151. +     /sbin/ldconfig /usr/lib
  152.     fi
  153.  }
  154.  post_remove() {
  155.     if [ -x /sbin/ldconfig ]; then
  156. -     /sbin/ldconfig /usr/lib32
  157. +     /sbin/ldconfig /usr/lib
  158.     fi
  159.     MODELNUM=417
  160.     for LIBS in "libcnbpcmcm" "libcnbpcnclapi" "libcnbpcnclbjcmd" "libcnbpcnclui" "libcnbpess" "libcnbpo"; do
  161. -     if [ -h /usr/lib32/${LIBS}${MODELNUM}.so ]; then
  162. -       rm -f /usr/lib32/${LIBS}${MODELNUM}.so
  163. +     if [ -h /usr/lib/${LIBS}${MODELNUM}.so ]; then
  164. +       rm -f /usr/lib/${LIBS}${MODELNUM}.so
  165.       fi
  166.     done
  167.  }
  168. --
  169. 2.7.2
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top