diff options
author | Denis Dupeyron <calchan@gentoo.org> | 2008-06-03 08:35:02 +0000 |
---|---|---|
committer | Denis Dupeyron <calchan@gentoo.org> | 2008-06-03 08:35:02 +0000 |
commit | 42057935f941608102c4653a99d89f5ef3f56809 (patch) | |
tree | d7c4474c88ef13dd9899c2ef2e6348ac212570aa /dev-embedded | |
parent | keyword ~sparc-fbsd (diff) | |
download | historical-42057935f941608102c4653a99d89f5ef3f56809.tar.gz historical-42057935f941608102c4653a99d89f5ef3f56809.tar.bz2 historical-42057935f941608102c4653a99d89f5ef3f56809.zip |
Fixed bad files when using CODE_PACK, thanks to David Barnett (bug #224719).
Package-Manager: portage-2.1.5.3
Diffstat (limited to 'dev-embedded')
-rw-r--r-- | dev-embedded/gputils/ChangeLog | 9 | ||||
-rw-r--r-- | dev-embedded/gputils/Manifest | 4 | ||||
-rw-r--r-- | dev-embedded/gputils/files/gputils-0.13.6-code_pack.patch | 182 | ||||
-rw-r--r-- | dev-embedded/gputils/gputils-0.13.6-r1.ebuild | 30 |
4 files changed, 223 insertions, 2 deletions
diff --git a/dev-embedded/gputils/ChangeLog b/dev-embedded/gputils/ChangeLog index 6ed3aa469e4d..4c4377f60303 100644 --- a/dev-embedded/gputils/ChangeLog +++ b/dev-embedded/gputils/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-embedded/gputils # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-embedded/gputils/ChangeLog,v 1.35 2008/05/18 19:15:55 calchan Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-embedded/gputils/ChangeLog,v 1.36 2008/06/03 08:35:02 calchan Exp $ + +*gputils-0.13.6-r1 (03 Jun 2008) + + 03 Jun 2008; Denis Dupeyron <calchan@gentoo.org> + +files/gputils-0.13.6-code_pack.patch, +gputils-0.13.6-r1.ebuild: + Fixed bad files when using CODE_PACK, thanks to David Barnett (bug + #224719). *gputils-0.13.6 (18 May 2008) diff --git a/dev-embedded/gputils/Manifest b/dev-embedded/gputils/Manifest index 8a088053df1c..6d85b2c178c7 100644 --- a/dev-embedded/gputils/Manifest +++ b/dev-embedded/gputils/Manifest @@ -1,5 +1,6 @@ AUX gputils-0.13.4-duplicate-label.patch 3098 RMD160 435a30502e23a2a514a194e861e694dec4631214 SHA1 b6379321edc1881bf256b820cfdb4c50d9803ceb SHA256 9db4f07a450c53e8fb72d924aad8b9e2789423887f339b99af0f09343810e4cc AUX gputils-0.13.4-mapping.patch 965 RMD160 a2d8d919a61db02fe1fe696aef6c633abf0a06cb SHA1 b0c315b85e360f7623835798443d8f743c10bdbf SHA256 28e4a859f79e2896549d0897f5f565772c9843a36c194d6adb6a2cabce8f28a2 +AUX gputils-0.13.6-code_pack.patch 6399 RMD160 23e88141d8b870e91645e2b462a1b16abd7965cd SHA1 1f16aef6ee5338e22df3ca9ca737ff3af70ac303 SHA256 252b19aabc279a70267484a20b07ecdb3dd8ad9cf06987a66b35a085eff9d1a6 DIST gputils-0.12.4.tar.gz 1434006 RMD160 74da5f9a1729f329949ba22cb3e77c6fe9191514 SHA1 8a995875be0eaf53af064e104771a03cd4d39f87 SHA256 e86084f925f0216d6a7660b879c68b45db49d0799e25537a74af844ee83f61c7 DIST gputils-0.13.3.tar.gz 1604376 RMD160 bca98077f8e7c137b7b10750d129eb8886fc5719 SHA1 50c4750d8c139e5f20438e3bd512ccba74e77b8c SHA256 e633a6db182f7deb8b4f218efc234b13a27230c1141f73af54416033f1930db4 DIST gputils-0.13.4.tar.gz 2052436 RMD160 2e63238d30bbaf0792455c4e3e78af6775b0f6f0 SHA1 eb9a6553bc9814f94d3b8e5af4b0d41565d9a788 SHA256 62a194dce099f35fb03f0aa83aea067fba17ebf5b2aa03dfacb9ae5d3d494c1f @@ -12,6 +13,7 @@ EBUILD gputils-0.13.3.ebuild 746 RMD160 39a4d92c0069f38479ca9ba3b6d8c4c37e87a1fb EBUILD gputils-0.13.4-r1.ebuild 901 RMD160 fd42611f75ac2821218c09d0227f293736c96ea7 SHA1 8153b1ca9c8b9aa27f3a4621cc3181898d0543fa SHA256 f2f72e013d518443c2d9f79e3dc038e568cbc3e5e4be3da746b58674a5bb32c9 EBUILD gputils-0.13.4.ebuild 702 RMD160 a7c74d4cc0fa13225237e8dd868de0369166ac53 SHA1 87523cf1b3d863463f1b42827e6dade446303749 SHA256 dea051751f1f5866562ef5212d246cd1214e950c7822305aa760aa52a3d12929 EBUILD gputils-0.13.5.ebuild 953 RMD160 b69776eeb004e73cff915bf781c81e3ee33e3670 SHA1 dfc04a2938d76e163ccb5b62627627bc943724b5 SHA256 76c96d89e925cfd9d937aa758eeb48d85203a64f1aeb5115c720c1ddcbba6f7d +EBUILD gputils-0.13.6-r1.ebuild 819 RMD160 20fadcee4d5c0148fff23e7a74acd7a62e2832e0 SHA1 4544e9914e888e5537d7c7eeadfd5fbe93e96253 SHA256 71bfb3d2e964731f7e9f51d12e2f62a3a4bd19178b5329d940a1594b7b828ea5 EBUILD gputils-0.13.6.ebuild 731 RMD160 467d4e77d8016b3e772e46cfc44b0c71794a5782 SHA1 2d29c550a8c6d33da3d65a6c1ba87e7453f582f9 SHA256 24b099776f7af2ca9224148bc37f2b43126266e954443bfda3fe5e3d14bb74be -MISC ChangeLog 5368 RMD160 4ad8047ee93d21c488d4c4a9824cb25367acc35b SHA1 6ac8b43bfa791bdc2a95ce33ca8371d30bb7044e SHA256 186387340f51ded1fa1962567f8c40974cfba7ea68f70d3ae353e38b5398a331 +MISC ChangeLog 5603 RMD160 ffe5c564686841137d5c80f31e910b4a65e40e16 SHA1 ae9a5576b33ff28582de9648efd1791916bf5989 SHA256 571bc61d001f6e9dd31a9e16bbefdeff0dc369a40ecf10317b0a8148eead0208 MISC metadata.xml 165 RMD160 3965c22a153ed350bcbd52de07c08ad47dd03cd7 SHA1 54b9da7fdc6d8376c990288c72938be9855ef8b6 SHA256 fb7ede94a0633f77d601e3e81580eac1624a3bca14401a49d94082579507ba0a diff --git a/dev-embedded/gputils/files/gputils-0.13.6-code_pack.patch b/dev-embedded/gputils/files/gputils-0.13.6-code_pack.patch new file mode 100644 index 000000000000..f743ec343f62 --- /dev/null +++ b/dev-embedded/gputils/files/gputils-0.13.6-code_pack.patch @@ -0,0 +1,182 @@ +Index: gpasm/lst.c +=================================================================== +--- gpasm/lst.c (revision 541) ++++ gpasm/lst.c (revision 542) +@@ -212,11 +212,75 @@ + } + } + ++unsigned int lst_data(char *m, unsigned int byte_org, ++ unsigned int bytes_emitted, size_t sizeof_m) ++{ ++ char buf[BUFSIZ]; ++ unsigned int i; ++ unsigned int lst_bytes = 0; ++ ++ if ((byte_org & 1) != 0) { ++ /* not word-aligned */ ++ /* list first byte */ ++ unsigned char emit_byte = (unsigned char)(i_memory_get(state.i_memory, ++ (byte_org >> 1)) >> 8); ++ snprintf(buf, sizeof(buf), "%02X", emit_byte); ++ strncat(m, buf, sizeof_m); ++ ++lst_bytes; ++ /* list whole words */ ++ for (i = 0; (i < ((bytes_emitted-1) >> 1)) && (i < 1); ++i) { ++ unsigned int emit_word = i_memory_get(state.i_memory, ++ ((byte_org+1) >> 1) + i) & 0xffff; ++ snprintf(buf, sizeof(buf), "%02X %02X", emit_word & 0x00ff, ++ emit_word >> 8); ++ strncat(m, buf, sizeof_m); ++ lst_bytes += 2; ++ } ++ /* list extra byte if odd */ ++ if (((byte_org+bytes_emitted) & 1) != 0) { ++ snprintf(buf, sizeof(buf), "%02X ", i_memory_get(state.i_memory, ++ ((byte_org + bytes_emitted - 2) >> 1)) & 0x00ff); ++ strncat(m, buf, sizeof_m); ++ ++lst_bytes; ++ } ++ else { ++ strncat(m, " ", sizeof_m); ++ } ++ } ++ else { /* word-aligned */ ++ /* list full words as bytes */ ++ for (i = 0; (i < (bytes_emitted >> 1)) && (i < 2); ++i) { ++ unsigned int emit_word = i_memory_get(state.i_memory, ++ (byte_org>>1) + i) & 0xffff; ++ snprintf(buf, sizeof(buf), "%04X ", emit_word); ++ strncat(m, buf, sizeof_m); ++ lst_bytes += 2; ++ } ++ if (bytes_emitted < 4) { ++ /* list extra byte if odd */ ++ if (((byte_org+bytes_emitted) & 1) != 0) { ++ snprintf(buf, sizeof(buf), "%02X ", i_memory_get(state.i_memory, ++ (byte_org+bytes_emitted)>>1) & 0x00ff); ++ strncat(m, buf, sizeof_m); ++ ++lst_bytes; ++ } ++ else { ++ strncat(m, " ", sizeof_m); ++ } ++ } ++ } ++ ++ return lst_bytes; ++} ++ + void lst_format_line(char *src_line, int value) + { + char m[BUFSIZ]; + char buf[BUFSIZ]; + unsigned int emitted = 0; ++ unsigned int byte_org = 0; ++ unsigned int bytes_emitted = 0; ++ unsigned int lst_bytes; + + assert(src_line != NULL); + +@@ -239,41 +303,21 @@ + state.device.id_location + 1) & 0xffff); + break; + case insn: +- emitted = state.org - state.lst.line.was_org +- + (state.obj.section && +- state.obj.section->emitted_pack_byte ? 1 : 0); +- snprintf(m, sizeof(m), "%04X ", (state.lst.line.was_org << _16bit_core) +- - (state.obj.section && +- ((emitted == 0 && +- state.obj.section->have_pack_byte) || +- state.obj.section->emitted_pack_byte) ? 1 : 0)); ++ byte_org = (state.lst.line.was_org << 1); ++ if (state.obj.section) ++ byte_org -= (state.obj.section->emitted_pack_byte ? 1 : 0); ++ bytes_emitted = (state.org << 1) - byte_org; ++ if (state.obj.section) ++ bytes_emitted -= (state.obj.section->have_pack_byte ? 1 : 0); ++ emitted = (bytes_emitted >> 1); ++ if (((byte_org & 1) == 0) && ((bytes_emitted & 1) != 0)) ++ emitted += 1; ++ snprintf(m, sizeof(m), "%04X ", byte_org >> (1 - _16bit_core)); + +- if (emitted >= 1) { +- if(state.obj.section && state.obj.section->have_pack_byte && emitted == 1) +- snprintf(buf, sizeof(buf), "%02X ", i_memory_get(state.i_memory, state.lst.line.was_org) & 0xff); +- else if(state.obj.section && state.obj.section->emitted_pack_byte) +- snprintf(buf, sizeof(buf), " %02X ", (i_memory_get(state.i_memory, state.lst.line.was_org - 1) & 0xff00) >> 8); +- else +- snprintf(buf, sizeof(buf), "%04X ", i_memory_get(state.i_memory, +- state.lst.line.was_org) & 0xffff); ++ lst_bytes = lst_data(m, byte_org, bytes_emitted, sizeof(m)); ++ byte_org += lst_bytes; ++ bytes_emitted -= lst_bytes; + +- strncat(m, buf, sizeof(m)); +- } else +- strncat(m, " ", sizeof(m)); +- +- if (emitted >= 2) { +- if(state.obj.section && state.obj.section->have_pack_byte && emitted == 2) +- snprintf(buf, sizeof(buf), "%02X ", i_memory_get(state.i_memory, +- state.lst.line.was_org +- + (state.obj.section->emitted_pack_byte ? 0 : 1)) & 0xffff); +- else +- snprintf(buf, sizeof(buf), "%04X ", i_memory_get(state.i_memory, +- state.lst.line.was_org +- + (state.obj.section && +- state.obj.section->emitted_pack_byte ? 0 : 1)) & 0xffff); +- strncat(m, buf, sizeof(buf)); +- } else +- strncat(m, " ", sizeof(m)); + break; + case config: + if(_16bit_core) { +@@ -376,39 +420,16 @@ + lst_line(m); + } + +- if (emitted > 2) { +- int i; ++ if (bytes_emitted > 0) { ++ while (bytes_emitted > 0) { ++ /* data left to print on separate lines */ + +- for (i = 2; i < emitted; i += 2) { +- unsigned int org = state.lst.line.was_org + i - +- (state.obj.section && state.obj.section->emitted_pack_byte ? 1 : 0); +- +- if ((i + 1) < emitted) +- if(state.obj.section && state.obj.section->have_pack_byte) +- snprintf(m, sizeof(m), "%04X %04X %02X ", +- org << _16bit_core, +- i_memory_get(state.i_memory, org) & 0xffff, +- i_memory_get(state.i_memory, org + 1) & 0xff); +- else +- snprintf(m, sizeof(m), "%04X %04X %04X", +- org << _16bit_core, +- i_memory_get(state.i_memory, org) & 0xffff, +- i_memory_get(state.i_memory, org + 1) & 0xffff); +- else { +- if(state.obj.section && state.obj.section->have_pack_byte) +- snprintf(m, sizeof(m), "%04X %02X ", +- ((state.lst.line.was_org + i) << _16bit_core), +- i_memory_get(state.i_memory, +- state.lst.line.was_org + i) & 0xff); +- else +- snprintf(m, sizeof(m), "%04X %04X", +- ((state.lst.line.was_org + i) << _16bit_core), +- i_memory_get(state.i_memory, +- state.lst.line.was_org + i) & 0xffff); +- } ++ strncpy(m, " ", sizeof(m)); ++ lst_bytes = lst_data(m, byte_org, bytes_emitted, sizeof(m)); ++ byte_org += lst_bytes; ++ bytes_emitted -= lst_bytes; + lst_line(m); + } +- + state.cod.emitting = 0; + } + diff --git a/dev-embedded/gputils/gputils-0.13.6-r1.ebuild b/dev-embedded/gputils/gputils-0.13.6-r1.ebuild new file mode 100644 index 000000000000..064942d9089e --- /dev/null +++ b/dev-embedded/gputils/gputils-0.13.6-r1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-embedded/gputils/gputils-0.13.6-r1.ebuild,v 1.1 2008/06/03 08:35:02 calchan Exp $ + +inherit eutils + +DESCRIPTION="Collection of tools including assembler, linker and librarian for PIC microcontrollers." +HOMEPAGE="http://gputils.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-code_pack.patch +} + +src_install() { + emake DESTDIR="${D}" install || die "Installation failed" + dodoc AUTHORS ChangeLog INSTALL NEWS README TODO doc/gputils.ps + insinto /usr/share/doc/${PF}/ + doins doc/gputils.pdf +} |