macos patch
Matt <[email protected]> Mon, 28 Oct 2024 14:51:02 -0500
| Newsgroups | gmane.linux.printing.gimp-print.devel |
|---|---|
| Message-ID | <[email protected]> |
I looked at the files in ./macosx and am attaching a patch to take care of the most important issues. These issues are where the version numbers are hard coded into scripts (5.2 vs 5.3). The patch also adds provisions for the commandtodyesub filter. The two files that have changes are: /macosx/makegutenpkg.sh /macosx/scripts/uninstall-gutenprint.command I don't know the exact build procedure used previously, but there looks like there is stuff that could be discarded. There are references to both CVS and git. I also did not find any instructions on building libusb statically to avoid the need to have libusb on the end user's machine for those with dyesub printers. Matt _______________________________________________ Gimp-print-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gimp-print-devel
guten_macosx.patch
(application/octet-stream, 8.7 KB)
git diff /GutenGit/gimp-print-source/macosx /GutenGit/staging--git/macosx
diff --git a/GutenGit/gimp-print-source/macosx/makegutenpkg.sh b/GutenGit/staging--git/macosx/makegutenpkg.sh
index 0768efd..7eadf41 100755
--- a/Users/matt/GutenGit/gimp-print-source/macosx/makegutenpkg.sh
+++ b/Users/matt/GutenGit/staging--git/macosx/makegutenpkg.sh
@@ -44,7 +44,7 @@ if test "x$2" != xfast; then
# Clean build the software...
test -f Makefile && make distclean
- PACKAGE_VERSION=$pkgversion PACKAGE_STRING="gutenprint $pkgversion" LIBS="-framework IOKit -framework CoreFoundation" ./configure --prefix=/Library/Printers/Gutenprint.printerDriver/Contents/MacOS --datadir=/Library/Printers/Gutenprint.printerDriver/Contents/Resources --datarootdir=/Library/Printers/Gutenprint.printerDriver/Contents/Resources --localedir=/Library/Printers/Gutenprint.printerDriver/Contents/Resources --docdir=/Library/Printers/Gutenprint.printerDriver/Contents/Resources/doc --mandir=/Library/Printers/Gutenprint.printerDriver/Contents/Resources --disable-samples --disable-test --enable-nls-macosx --with-archflags='-mmacosx-version-min=10.6 -Os -arch x86_64 -D_PPD_DEPRECATED=""'
+ PACKAGE_VERSION=$pkgversion PACKAGE_STRING="gutenprint $pkgversion" LIBS="-framework IOKit -framework CoreFoundation" ./configure --prefix=/Library/Printers/Gutenprint.printerDriver/Contents/MacOS --datadir=/Library/Printers/Gutenprint.printerDriver/Contents/Resources --datarootdir=/Library/Printers/Gutenprint.printerDriver/Contents/Resources --localedir=/Library/Printers/Gutenprint.printerDriver/Contents/Resources --docdir=/Library/Printers/Gutenprint.printerDriver/Contents/Resources/doc --mandir=/Library/Printers/Gutenprint.printerDriver/Contents/Resources --disable-samples --disable-test --enable-nls-macosx --with-archflags='-mmacosx-version-min=11.0 -Os -arch x86_64 -arch arm64""'
make
fi
@@ -73,7 +73,7 @@ mv "$pkgroot/usr/libexec/cups/backend/gutenprint53+usb" "$pkgroot/Library/Printe
mv "$pkgroot/usr/libexec/cups/driver/gutenprint.5.3" "$pkgroot/Library/Printers/Gutenprint.printerDriver/Contents/MacOS"
-for file in commandtocanon commandtoepson rastertogutenprint.5.3; do
+for file in commandtocanon commandtodyesub commandtoepson rastertogutenprint.5.3; do
mv "$pkgroot/usr/libexec/cups/filter/$file" "$pkgroot/Library/Printers/Gutenprint.printerDriver/Contents/MacOS"
done
@@ -107,7 +107,7 @@ cat >"$pkgroot/Library/Printers/Gutenprint.printerDriver/Contents/Info.plist" <<
<key>CFBundleVersion</key>
<string>$pkgnumversion</string>
<key>LSMinimumSystemVersion</key>
- <string>10.6</string>
+ <string>11.0</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright 1999-2015 by The Gutenprint Team. See http://gutenprint.sf.net for details.</string>
</dict>
@@ -115,7 +115,7 @@ cat >"$pkgroot/Library/Printers/Gutenprint.printerDriver/Contents/Info.plist" <<
EOF
# Sign the driver bundle...
-for file in commandtocanon commandtoepson cups-genppd.5.3 cups-genppdupdate escputil gutenprint.5.3 gutenprint53+usb lib/libgutenprint.2.dylib rastertogutenprint.5.3; do
+for file in commandtocanon commandtodyesub commandtoepson cups-genppd.5.3 cups-genppdupdate escputil gutenprint.5.3 gutenprint53+usb lib/libgutenprint.9.dylib rastertogutenprint.5.3; do
codesign -s "$CODESIGN_IDENTITY" -fv "$pkgroot/Library/Printers/Gutenprint.printerDriver/Contents/MacOS/$file"
done
@@ -126,10 +126,10 @@ mkdir -p "${pkgroot}-scripts"
cat >"${pkgroot}-scripts/preinstall" <<EOF
#!/bin/sh
-# Only run on 10.6 and later
+# Only run on 11.0 and later
osvers=\`sw_vers -productVersion | awk -F. '{printf "%d\n", \$1 * 100 + \$2}'\`
-if test \$osvers -lt 1006; then
- osascript -e 'tell application "System Events" to display alert "This version of Gutenprint requires OS X 10.6 or later." as critical'
+if test \$osvers -lt 1100; then
+ osascript -e 'tell application "System Events" to display alert "This version of Gutenprint requires OS X 11.0 or later." as critical'
exit 1
fi
@@ -177,7 +177,7 @@ for file in \`ls -1 /Library/Printers/PPDs/Contents/Resources | grep '^stp-'\`;
test -e /Library/Printers/PPDs/Contents/Resources/\$file && /bin/rm -f /Library/Printers/PPDs/Contents/Resources/\$file
done
-for file in /usr/bin/cups-calibrate /usr/bin/escputil /usr/libexec/cups/filter/commandtocanon /usr/libexec/cups/filter/commandtoepson /usr/local/bin/escputil; do
+for file in /usr/bin/cups-calibrate /usr/bin/escputil /usr/libexec/cups/filter/commandtocanon /usr/libexec/cups/filter/commandtoepson /usr/libexec/cups/filter/commandtodyesub /usr/local/bin/escputil; do
test -e \$file && /bin/rm -f \$file
done
@@ -204,6 +204,7 @@ ln -sf /Library/Printers/Gutenprint.printerDriver/Contents/MacOS/gutenprint53+us
ln -sf /Library/Printers/Gutenprint.printerDriver/Contents/MacOS/gutenprint.5.3 /usr/libexec/cups/driver
ln -sf /Library/Printers/Gutenprint.printerDriver/Contents/MacOS/commandtocanon /usr/libexec/cups/filter
+ln -sf /Library/Printers/Gutenprint.printerDriver/Contents/MacOS/commandtodyesub /usr/libexec/cups/filter
ln -sf /Library/Printers/Gutenprint.printerDriver/Contents/MacOS/commandtoepson /usr/libexec/cups/filter
ln -sf /Library/Printers/Gutenprint.printerDriver/Contents/MacOS/rastertogutenprint.5.3 /usr/libexec/cups/filter
@@ -253,12 +254,12 @@ chmod 755 ~/Desktop/gutenprint-$pkgversion/uninstall-gutenprint.command
cp -f macosx/scripts/Gutenprint\ Utility\ for\ EPSON\ Inkjet\ Printers.command ~/Desktop/gutenprint-$pkgversion/
chmod 755 ~/Desktop/gutenprint-$pkgversion/Gutenprint\ Utility\ for\ EPSON\ Inkjet\ Printers.command
-cp -f ~/Library/Caches/Homebrew/libusb* ~/Desktop/gutenprint-$pkgversion/
+# cp -f ~/Library/Caches/Homebrew/libusb* ~/Desktop/gutenprint-$pkgversion/
chmod 755 ~/Desktop/gutenprint-$pkgversion/libusb*
codesign -s "$CODESIGN_IDENTITY" -fv ~/Desktop/gutenprint-$pkgversion/uninstall-gutenprint.command
codesign -s "$CODESIGN_IDENTITY" -fv ~/Desktop/gutenprint-$pkgversion/Gutenprint\ Utility\ for\ EPSON\ Inkjet\ Printers.command
-codesign -s "$CODESIGN_IDENTITY" -fv ~/Desktop/gutenprint-$pkgversion/libusb*
+# codesign -s "$CODESIGN_IDENTITY" -fv ~/Desktop/gutenprint-$pkgversion/libusb*
test -f ~/Desktop/gutenprint-$pkgversion.dmg && rm -f ~/Desktop/gutenprint-$pkgversion.dmg
hdiutil create -fs HFS+ -srcfolder ~/Desktop/gutenprint-$pkgversion ~/Desktop/gutenprint-$pkgversion.dmg
diff --git a/Users/matt/GutenGit/gimp-print-source/macosx/scripts/uninstall-gutenprint.command b/Users/matt/GutenGit/staging--git/macosx/scripts/uninstall-gutenprint.command
old mode 100644
new mode 100755
index 5f5bf98..a4b80b2
--- a/GutenGit/gimp-print-source/macosx/scripts/uninstall-gutenprint.command
+++ b/GutenGit/staging--git/macosx/scripts/uninstall-gutenprint.command
@@ -117,7 +117,7 @@ if [ ! -z "${pkgutil_pkg[0]}" ] ; then
sudo pkgutil --forget "$newerpkg"
# Remove symlinks...
- for file in /usr/libexec/cups/backend/gutenprint52+usb /usr/libexec/cups/driver/gutenprint.5.2 /usr/libexec/cups/filter/commandtocanon /usr/libexec/cups/filter/commandtoepson /usr/libexec/cups/filter/rastertogutenprint.5.2 /usr/local/bin/escputil; do
+ for file in /usr/libexec/cups/backend/gutenprint52+usb /usr/libexec/cups/backend/gutenprint53+usb /usr/libexec/cups/driver/gutenprint.5.2 /usr/libexec/cups/driver/gutenprint.5.3 /usr/libexec/cups/filter/commandtocanon /usr/libexec/cups/filter/commandtodyesub /usr/libexec/cups/filter/commandtoepson /usr/libexec/cups/filter/rastertogutenprint.5.2 /usr/libexec/cups/filter/rastertogutenprint.5.3 /usr/local/bin/escputil; do
test -L $file && sudo /bin/rm -f $file
done
done
@@ -130,7 +130,7 @@ MODEL_PPD_DIR="/Library/Printers/PPDs/Contents/Resources"
##############################################################
## Remove any PPDs that might be lying around from a previous
## install of some sort.
-LAST_PPD=($(find ${MODEL_PPD_DIR} -name 'stp-*\.5\.[0-2]\.ppd\.gz' | sort))
+LAST_PPD=($(find ${MODEL_PPD_DIR} -name 'stp-*\.5\.[0-3]\.ppd\.gz' | sort))
if [ ${#LAST_PPD[@]} -gt 0 ]; then
echo Removing the PPDs...
for ((jj=0;$jj < ${#LAST_PPD[@]} ; jj++)) ; do
@@ -146,8 +146,8 @@ CUPS_PPD_DIR="/etc/cups/ppd/"
## awk cannot handle an escaped \+ (plus sign) so use . (any character)
## in the regexp if you are going to use the + sign in the key.
-QUEUE_KEY_1=.*[Gg][Uu][Tt][Ee][Nn][Pp][Rr][Ii][Nn][Tt].*5\.[012]
-QUEUE_KEY_2=.*[Gg][Ii][Mm][Pp]-[Pp][Rr][Ii][Nn][Tt].*[45]\.[012]
+QUEUE_KEY_1=.*[Gg][Uu][Tt][Ee][Nn][Pp][Rr][Ii][Nn][Tt].*5\.[0123]
+QUEUE_KEY_2=.*[Gg][Ii][Mm][Pp]-[Pp][Rr][Ii][Nn][Tt].*[45]\.[0123]
# scan for existing Gutenprint queues...
#
# we want only the queue name so strip the leading directories and the .ppd suffix...