diff options
author | 2011-05-03 21:04:56 +0000 | |
---|---|---|
committer | 2011-05-03 21:04:56 +0000 | |
commit | fc11b20cadcd16e18354d40a31563604f9328681 (patch) | |
tree | 32b04e3f272ca9159bb30a1043843ef096e6f521 | |
parent | Add brother drivers (diff) | |
download | pauldv-fc11b20cadcd16e18354d40a31563604f9328681.tar.gz pauldv-fc11b20cadcd16e18354d40a31563604f9328681.tar.bz2 pauldv-fc11b20cadcd16e18354d40a31563604f9328681.zip |
Add a patch that uses cups environment variables for file type determination
svn path=/trunk/overlay/; revision=130
-rw-r--r-- | net-print/hl4040cnlpr/Manifest | 3 | ||||
-rw-r--r-- | net-print/hl4040cnlpr/files/useCupsFileType.patch | 17 | ||||
-rw-r--r-- | net-print/hl4040cnlpr/hl4040cnlpr-1.0.3.ebuild | 9 |
3 files changed, 26 insertions, 3 deletions
diff --git a/net-print/hl4040cnlpr/Manifest b/net-print/hl4040cnlpr/Manifest index 554d2bb..a11fb84 100644 --- a/net-print/hl4040cnlpr/Manifest +++ b/net-print/hl4040cnlpr/Manifest @@ -1,2 +1,3 @@ +AUX useCupsFileType.patch 688 RMD160 ea9e73d85941da57e6661ddc1acbdf15c74c2785 SHA1 6508b47121da917538f40bd203d9c0b728e0b30e SHA256 4acd790706b51153a06d5c2f16d8c7cb898cd60095a583f22b437226e96fa9c0 DIST hl4040cnlpr-1.0.3-1.i386.rpm 341331 RMD160 9c42f3c6d8cbe517f4d7bf45452508a5b51f02e7 SHA1 e91e67e4b1691f2663c7513dc336d967a7f064ac SHA256 f39350eb1002e2c65e7302adaf627af99c644fd58b8a8daa70aaf28f9672d67a -EBUILD hl4040cnlpr-1.0.3.ebuild 2124 RMD160 6b2c4ae63e3768a272fb3b6f4dec90b67457ec3e SHA1 fe224f2e3da16495a6038ca8d642d4927b70f3ee SHA256 1fe63ea2c6cdafdd07e2852f1808aa284ca0db93050437722cdee495fb826275 +EBUILD hl4040cnlpr-1.0.3.ebuild 2244 RMD160 0ea8613724ef70dcf98b01a7c9541d95f7983a79 SHA1 7ee7d4e00b547d671aed6e124aa9bbbba1f0e06f SHA256 0cf25112bf53e15a17b003a457d559856c68e06c46baaea3615bf341def849d6 diff --git a/net-print/hl4040cnlpr/files/useCupsFileType.patch b/net-print/hl4040cnlpr/files/useCupsFileType.patch new file mode 100644 index 0000000..e478f90 --- /dev/null +++ b/net-print/hl4040cnlpr/files/useCupsFileType.patch @@ -0,0 +1,17 @@ +--- usr/local/Brother/Printer/hl4040cn/lpd/filterhl4040cn.orig 2011-05-03 21:47:38.000000000 +0100 ++++ usr/local/Brother/Printer/hl4040cn/lpd/filterhl4040cn 2011-05-03 21:50:27.000000000 +0100 +@@ -33,7 +33,13 @@ + INPUT_TEMP=`mktemp /tmp/br_input.XXXXXX` + cat > $INPUT_TEMP + +-FILE_TYPE=`file $INPUT_TEMP | sed -e 's/^.*:[ ]*//' -e 's/[ ].*//'` ++if [ "$CONTENT_TYPE" = "application/pdf" ]; then ++ FILE_TYPE="PDF" ++elif [ "$CONTENT_TYPE" = "application/postscript" ]; then ++ FILE_TYPE="PostScript" ++else ++ FILE_TYPE=`file $INPUT_TEMP | sed -e 's/^.*:[ ]*//' -e 's/[ ].*//'` ++fi + + #if [ "$FILE_TYPE" = "PostScript" -o "$FILE_TYPE" = "PDF" ] ; then + PSCONV_OP="$PAPER_INF $RCFILE" diff --git a/net-print/hl4040cnlpr/hl4040cnlpr-1.0.3.ebuild b/net-print/hl4040cnlpr/hl4040cnlpr-1.0.3.ebuild index 6c152f0..dfdcb09 100644 --- a/net-print/hl4040cnlpr/hl4040cnlpr-1.0.3.ebuild +++ b/net-print/hl4040cnlpr/hl4040cnlpr-1.0.3.ebuild @@ -4,7 +4,7 @@ EAPI=3 -inherit rpm +inherit base rpm DESCRIPTION="Cupswrapper driver for Brother HL4040CN" @@ -29,7 +29,10 @@ IUSE="" # Run-time dependencies. Must be defined to whatever this depends on to run. # The below is valid if the same run-time depends are required to compile. -RDEPEND="net-print/cups" +RDEPEND="net-print/cups + >=sys-apps/file-5.06 + app-text/ghostscript-gpl + app-text/a2ps" # Source directory; the dir where the sources can be found (automatically # unpacked) inside ${WORKDIR}. The default value for S is ${WORKDIR}/${P} @@ -40,6 +43,8 @@ S="${WORKDIR}/${P}-1" #AVAILABLE_MODELS="dcp9040cn dcp9042cdn dcp9045cdn hl4040cdn hl4040cn hl4040cnj #hl4050cdn hl4070cdw mfc9440cn mfc9450cdn mfc9640cw mfc9840cdw" +PATCHES=( "${FILESDIR}/useCupsFileType.patch" ) + src_configure() { # Don't do anything sed -i -b -e "s,/usr/local/\(Brother[^\x00]*\),/usr/lib/\1\x00\x00,g" \ |