diff options
author | Bernard Cafarelli <voyageur@gentoo.org> | 2009-11-17 21:26:32 +0000 |
---|---|---|
committer | Bernard Cafarelli <voyageur@gentoo.org> | 2009-11-17 21:26:32 +0000 |
commit | 05f9f9ad91b306f42ea822ec4b824b87ba325c6a (patch) | |
tree | 6044c5e9fdcf8b342246b80f8ed766781eb57a2b /net-print | |
parent | Marking gst-plugins-neon-0.10.14 ppc64 for bug 290343 (diff) | |
download | gentoo-2-05f9f9ad91b306f42ea822ec4b824b87ba325c6a.tar.gz gentoo-2-05f9f9ad91b306f42ea822ec4b824b87ba325c6a.tar.bz2 gentoo-2-05f9f9ad91b306f42ea822ec4b824b87ba325c6a.zip |
Version bump, add myself to maintainers, fixes bug #258574
(Portage version: 2.2_rc50/cvs/Linux x86_64)
Diffstat (limited to 'net-print')
-rw-r--r-- | net-print/splix/ChangeLog | 8 | ||||
-rw-r--r-- | net-print/splix/files/splix-2.0.0-algo0x0d_one_scanline_over_fix.patch | 289 | ||||
-rw-r--r-- | net-print/splix/metadata.xml | 6 | ||||
-rw-r--r-- | net-print/splix/splix-2.0.0.ebuild | 63 |
4 files changed, 364 insertions, 2 deletions
diff --git a/net-print/splix/ChangeLog b/net-print/splix/ChangeLog index a2e82e8a894d..c4bf9fed61d7 100644 --- a/net-print/splix/ChangeLog +++ b/net-print/splix/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-print/splix # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-print/splix/ChangeLog,v 1.14 2009/09/13 10:35:07 tgurr Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-print/splix/ChangeLog,v 1.15 2009/11/17 21:26:32 voyageur Exp $ + +*splix-2.0.0 (17 Nov 2009) + + 17 Nov 2009; Bernard Cafarelli <voyageur@gentoo.org> +splix-2.0.0.ebuild, + +files/splix-2.0.0-algo0x0d_one_scanline_over_fix.patch, metadata.xml: + Version bump, add myself to maintainers, fixes bug #258574 13 Sep 2009; Timo Gurr <tgurr@gentoo.org> splix-1.1.0.ebuild, splix-1.1.1.ebuild: diff --git a/net-print/splix/files/splix-2.0.0-algo0x0d_one_scanline_over_fix.patch b/net-print/splix/files/splix-2.0.0-algo0x0d_one_scanline_over_fix.patch new file mode 100644 index 000000000000..d5c90a5a7c7a --- /dev/null +++ b/net-print/splix/files/splix-2.0.0-algo0x0d_one_scanline_over_fix.patch @@ -0,0 +1,289 @@ +Index: src/algo0x0d.cpp +=================================================================== +--- src/algo0x0d.cpp (revisão 266) ++++ src/algo0x0d.cpp (cópia de trabalho) +@@ -50,16 +50,17 @@ + inline void Algo0x0D::writeTwoBytesPacket( unsigned char * output, + unsigned long & outputSize, + long int accumulatedHorizontalOffsetValue, +- long int displacement, ++ long int accumulatedVerticalOffsetValue, + unsigned long accumulatedRunCount ) + { + /* Encodes the run count and vertical displacement in the first byte. */ + output[ outputSize++ ] = +- ( unsigned char )( ( displacement << 6 ) | accumulatedRunCount ); ++ ( unsigned char )( ( accumulatedVerticalOffsetValue << 6 ) | ++ accumulatedRunCount ); + + /* Encodes the offset value in the second byte. This is signed. */ + output[ outputSize++ ] = +- ( unsigned char )( 0xFF & accumulatedHorizontalOffsetValue ); ++ ( unsigned char )( 0xFF & accumulatedHorizontalOffsetValue ); + } + + +@@ -71,7 +72,7 @@ + inline void Algo0x0D::writeFourBytesPacket( unsigned char * output, + unsigned long & outputSize, + long int accumulatedHorizontalOffsetValue, +- long int displacement, ++ long int accumulatedVerticalOffsetValue, + unsigned long accumulatedRunCount ) + { + /* Encodes the upper 6-bit value of the offset value. */ +@@ -84,8 +85,8 @@ + + /* Encode the run count as a unsigned 12-bit value in the third byte. */ + output[ outputSize++ ] = 0x80 | +- ( unsigned char )( ( displacement << 4 ) | +- ( accumulatedRunCount >> 8 ) ); ++ ( unsigned char )( ( accumulatedVerticalOffsetValue << 4 ) | ++ ( accumulatedRunCount >> 8 ) ); + /* Encode the last byte of run count. */ + output[ outputSize++ ] = + ( unsigned char )( 0x000000FF & accumulatedRunCount ); +@@ -100,7 +101,7 @@ + */ + inline void Algo0x0D::writeSixBytesPacket( unsigned char * output, + unsigned long & outputSize, +- long int displacement, ++ long int accumulatedCombinedOffsetValue, + unsigned long accumulatedRunCount ) + { + /* Write the packet header constant in the first byte. */ +@@ -108,18 +109,21 @@ + + /* Encodes the upper 8-bit value of the 24-bit offset value. */ + output[ outputSize++ ] = +- ( unsigned char )( ( 0x00FF0000 & displacement ) >> 16 ); ++ ( unsigned char )( ( 0x00FF0000 & ++ accumulatedCombinedOffsetValue ) >> 16 ); + + /* Encodes the middle 8-bit value of the 24-bit offset value. */ + output[ outputSize++ ] = +- ( unsigned char )( ( 0x0000FF00 & displacement ) >> 8 ); ++ ( unsigned char )( ( 0x0000FF00 & ++ accumulatedCombinedOffsetValue ) >> 8 ); + + /* Encodes the remaining 8-bit value of the 24-bit offset value. */ + output[ outputSize++ ] = +- ( unsigned char )( 0x000000FF & displacement ); ++ ( unsigned char )( 0x000000FF & ++ accumulatedCombinedOffsetValue ); + + /* Encodes the run counts as unsigned 14-bit value in the fifth and +- sixth byte. */ ++ sixth byte. */ + + /* Encodes the run counts in upper 6-bits. */ + output[ outputSize++ ] = 0xC0 | +@@ -133,7 +137,7 @@ + + + /* +- * Modifications: 29/06/2008, 08/07/2008. ++ * Modifications: Jun-29-2008, Jul-08-2008, Oct-03-2009, Oct-04-2009. + */ + inline void Algo0x0D::selectPacketSize( + unsigned char * output, +@@ -141,96 +145,82 @@ + unsigned long preAccumulatedHorizontalOffsetValue, + unsigned long accumulatedHorizontalOffsetValue, + unsigned long currentHorizontalPenPosition, +- unsigned long pixelsLeftInScanline, + unsigned long accumulatedRunCount, + unsigned long consecutiveBlankScanLines, + unsigned long currentVerticalPenPosition, + const unsigned long wrapWidth ) + { +- /* Verify that this is the first offset value on the scanline, but not the +- first scanline. */ ++ /* Set the initial vertical offset value. */ ++ long int verticalOffsetValue = consecutiveBlankScanLines; + +- /* On every new scanline start, the pre-accumulated offset value is zero. */ ++ /* Set the initial horizontal offset value. */ ++ long int horizontalOffsetValue = accumulatedHorizontalOffsetValue; ++ ++ /* Verify if this is the first formed packet of the scan-line ++ and that it is not the first top-most scan-line of the given band. ++ Can be verified because on every beginning of a scan-line work, the ++ pre-accumulated horizontal offset value is zero. */ + if ( ( 0 == preAccumulatedHorizontalOffsetValue ) && +- ( 0 < currentVerticalPenPosition ) ) { +- /* Evaluate distance between previous and current pen position +- to output correct packet format. */ +- long int delta = +- currentHorizontalPenPosition - accumulatedHorizontalOffsetValue; ++ ( 0 < currentVerticalPenPosition ) ) { ++ /* Evaluate pixel distance between previous and current pen position ++ to find the relative horizontal offset value. */ ++ horizontalOffsetValue -= currentHorizontalPenPosition; + +- /* Calculate necessary displacement position in correct place. */ +- long int displacement = 0; ++ /* Adjust by +1, when any of the previous scan-lines is not blank. ++ Must account for three cases: ++ A - When the band begins with any number of blank scan-lines. ++ B - When the current non-blank scan-line follow a blank scan-line, ++ but there are non-blank scan-lines previously. ++ C - When the previous scan-line was not blank. ++ Notice that when any of the previous scan-lines is non-blank, ++ the blank scan-line counter is always less than and not equal to ++ the value of the vertical pen position. */ ++ if ( consecutiveBlankScanLines < currentVerticalPenPosition ) { ++ verticalOffsetValue++; ++ } + +- if ( 0 >= delta ) { ++ } else { + +- /* Turn the displacement value into a positive integer value. */ +- delta = - delta; ++ /* Process a sequential packet for current scan-line. ++ The pre-accumulated offset value must be added, this was the ++ previous packet's run count value. */ ++ horizontalOffsetValue += preAccumulatedHorizontalOffsetValue; + +- if ( ( 127 >= delta ) && ( 63 >= accumulatedRunCount ) +- && ( 0 == consecutiveBlankScanLines ) ) { +- displacement = 1; +- writeTwoBytesPacket( output, outputSize, delta, +- displacement, accumulatedRunCount ); +- } else if ( ( 8191 >= delta ) +- && ( 4095 >= accumulatedRunCount ) +- && ( 2 >= consecutiveBlankScanLines ) ) { +- displacement = 1 + consecutiveBlankScanLines; +- writeFourBytesPacket( output, outputSize, delta, +- displacement, accumulatedRunCount ); +- } else { +- displacement = wrapWidth * +- ( 1 + consecutiveBlankScanLines ) + delta; +- writeSixBytesPacket( output, outputSize, displacement, +- accumulatedRunCount ); +- } ++ } + +- } else { ++ /* Choosing the packet size. */ ++ if ( ( 127 >= horizontalOffsetValue ) ++ && ( -128 <= horizontalOffsetValue ) ++ && ( 63 >= accumulatedRunCount ) ++ && ( 1 >= verticalOffsetValue ) ) { + +- if ( ( 128 >= delta ) && ( 63 >= accumulatedRunCount ) +- && ( 0 == consecutiveBlankScanLines ) ) { +- displacement = 1; +- writeTwoBytesPacket( output, outputSize, +- -delta, +- displacement, accumulatedRunCount ); ++ /* Issue an encoded 2-byte packet. */ ++ writeTwoBytesPacket( output, outputSize, ++ horizontalOffsetValue, ++ verticalOffsetValue, ++ accumulatedRunCount ); + +- } else if ( ( 8192 >= delta ) +- && ( 4095 >= accumulatedRunCount ) +- && ( 2 >= consecutiveBlankScanLines ) ) { +- displacement = 1 + consecutiveBlankScanLines; +- writeFourBytesPacket( output, outputSize, -delta, +- displacement, accumulatedRunCount ); ++ } else if ( ( 8191 >= horizontalOffsetValue ) ++ && ( -8192 <= horizontalOffsetValue ) ++ && ( 4095 >= accumulatedRunCount ) ++ && ( 3 >= verticalOffsetValue ) ) { + +- } else { +- displacement = wrapWidth * +- ( 1 + consecutiveBlankScanLines ) - delta; +- writeSixBytesPacket( output, outputSize, displacement, +- accumulatedRunCount ); ++ /* Issue an encoded 4-byte packet. */ ++ writeFourBytesPacket( output, outputSize, ++ horizontalOffsetValue, ++ verticalOffsetValue, ++ accumulatedRunCount ); + +- } +- } +- + } else { + +- /* Add the pre-accumulated offset value. */ +- unsigned long recalculatedOffset = accumulatedHorizontalOffsetValue + +- preAccumulatedHorizontalOffsetValue; ++ /* Issue an encoded 6-byte packet. */ ++ writeSixBytesPacket( output, outputSize, ++ wrapWidth * verticalOffsetValue ++ + horizontalOffsetValue, ++ accumulatedRunCount ); + +- /* Process the rest of packets in the scanline. */ +- if ( ( 127 >= recalculatedOffset ) && ( 63 >= accumulatedRunCount ) ) { +- writeTwoBytesPacket( output, outputSize, recalculatedOffset, 0, +- accumulatedRunCount ); +- +- } else if ( ( 8191 >= recalculatedOffset ) && +- ( 4095 >= accumulatedRunCount ) ) { +- writeFourBytesPacket( output, outputSize, recalculatedOffset, 0, +- accumulatedRunCount ); +- +- } else { +- writeSixBytesPacket( output, outputSize, recalculatedOffset, +- accumulatedRunCount ); +- } +- + } ++ + /* Finished one packet encoding. */ + } + +@@ -397,7 +387,7 @@ + selectPacketSize( output, outputSize, + preAccumulatedHorizontalOffsetValue, + accumulatedHorizontalOffsetValue, +- currentHorizontalPenPosition, pixelsLeftInScanline, ++ currentHorizontalPenPosition, + accumulatedRunCount, consecutiveBlankScanLines, + currentVerticalPenPosition, wrapWidth ); + } else { +Index: include/algo0x0d.h +=================================================================== +--- include/algo0x0d.h (revisão 266) ++++ include/algo0x0d.h (cópia de trabalho) +@@ -37,20 +37,20 @@ + unsigned char * output, + unsigned long & outputSize, + long int accumulatedHorizontalOffsetValue, +- long int displacementValue, ++ long int accumulatedVerticalOffsetValue, + unsigned long accumulatedRunCount ); + + inline void writeFourBytesPacket( + unsigned char * output, + unsigned long & outputSize, + long int accumulatedHorizontalOffsetValue, +- long int displacementValue, ++ long int accumulatedVerticalOffsetValue, + unsigned long accumulatedRunCount ); + + inline void writeSixBytesPacket( + unsigned char * output, + unsigned long & outputSize, +- long int displacementValue, ++ long int accumulatedCombinedOffsetValue, + unsigned long accumulatedRunCount ); + + inline void selectPacketSize( +@@ -59,7 +59,6 @@ + unsigned long preAccumulatedHorizontalOffsetValue, + unsigned long accumulatedHorizontalOffsetValue, + unsigned long currentHorizontalPenPosition, +- unsigned long pixelsLeftInScanline, + unsigned long accumulatedRunCount, + unsigned long consecutiveBlankScanLines, + unsigned long currentVerticalPenPosition, + + diff --git a/net-print/splix/metadata.xml b/net-print/splix/metadata.xml index a7162e9b7104..06ac4fb6e275 100644 --- a/net-print/splix/metadata.xml +++ b/net-print/splix/metadata.xml @@ -1,10 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<herd>no-herd</herd> +<herd>printing</herd> <maintainer> <email>wschlich@gentoo.org</email> <name>Wolfram Schlich</name> <description>Primary maintainer</description> </maintainer> +<maintainer> + <email>voyageur@gentoo.org</email> + <name>Bernard Cafarelli</name> +</maintainer> </pkgmetadata> diff --git a/net-print/splix/splix-2.0.0.ebuild b/net-print/splix/splix-2.0.0.ebuild new file mode 100644 index 000000000000..35d7db2ac3b9 --- /dev/null +++ b/net-print/splix/splix-2.0.0.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-print/splix/splix-2.0.0.ebuild,v 1.1 2009/11/17 21:26:32 voyageur Exp $ + +EAPI=2 +inherit eutils toolchain-funcs + +MY_P=${PN}-${PV/_p/-} +S=${WORKDIR}/${MY_P} +DESCRIPTION="A set of CUPS printer drivers for SPL (Samsung Printer Language) printers" +HOMEPAGE="http://splix.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2 + http://splix.ap2c.org/samsung_cms.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+jbig" + +DEPEND="|| ( >=net-print/cups-1.4.0 net-print/cupsddk ) + jbig? ( media-libs/jbigkit )" +RDEPEND="${DEPEND}" + +src_prepare() { + # http://sourceforge.net/tracker/?func=detail&aid=2880411&group_id=175815&atid=874748 + epatch "${FILESDIR}"/${P}-algo0x0d_one_scanline_over_fix.patch + # Honor LDFLAGS + sed -e "/[a-z]_LDFLAGS/s/:=.*/:= $\{LDFLAGS\}/" -i module.mk \ + || die "module.mk sed failed" + # Correct link comand, do not strip on install + sed -e "s/g++/$\{LINKER\}/" -e "/install/s/-s //" -i rules.mk \ + || die "rules.mk sed failed" +} + +src_compile() { + local options="MODE=optimized" + use jbig || options="${options} DISABLE_JBIG=1" + emake ${options} CXX="$(tc-getCXX)" \ + OPTIM_CFLAGS="${CFLAGS}" OPTIM_CXXFLAGS="${CXXFLAGS}" \ + || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + gzip "${D}"/$(cups-config --datadir)/model/*/*.ppd || die "ppd gzip failed" + + insinto $(cups-config --datadir)/model/samsung + doins -r "${WORKDIR}"/cms +} + +pkg_postinst() { + ewarn "You *MUST* make sure that the PPD files that CUPS is using" + ewarn "for actually installed printers are updated if you upgraded" + ewarn "from a previous version of splix!" + ewarn "Otherwise you will be unable to print (your printer might" + ewarn "spit out blank pages etc.)." + ewarn "To do that, simply delete the corresponding PPD file in" + ewarn "/etc/cups/ppd/, click on 'Modify Printer' belonging to the" + ewarn "corresponding printer in the CUPS webinterface (usually" + ewarn "reachable via http://localhost:631/) and choose the correct" + ewarn "printer make and model, for example:" + ewarn "'Samsung' -> 'Samsung ML-1610, 1.0 (en)'" +} |