summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Weiler <pylon@gentoo.org>2007-06-02 13:58:26 +0000
committerLars Weiler <pylon@gentoo.org>2007-06-02 13:58:26 +0000
commit66f36fb6811cd89bad5b0d27a8b6c9e4f8b914df (patch)
tree9ee2d3abb6af9f89ed06cd7a8ac1de7b75a33344 /app-cdr
parentAdd ~x86-fbsd keyword. (diff)
downloadhistorical-66f36fb6811cd89bad5b0d27a8b6c9e4f8b914df.tar.gz
historical-66f36fb6811cd89bad5b0d27a8b6c9e4f8b914df.tar.bz2
historical-66f36fb6811cd89bad5b0d27a8b6c9e4f8b914df.zip
Version bump. Minor fixes.
Package-Manager: portage-2.1.2.9
Diffstat (limited to 'app-cdr')
-rw-r--r--app-cdr/cdrtools/ChangeLog15
-rw-r--r--app-cdr/cdrtools/Manifest40
-rw-r--r--app-cdr/cdrtools/cdrtools-2.01.01_alpha25.ebuild4
-rw-r--r--app-cdr/cdrtools/cdrtools-2.01.01_alpha27.ebuild126
-rw-r--r--app-cdr/cdrtools/files/digest-cdrtools-2.01.01_alpha273
-rw-r--r--app-cdr/cdrtools/files/mkisofs-iconv-10.patch619
-rw-r--r--app-cdr/cdrtools/files/mkisofs-iconv-18.patch603
7 files changed, 164 insertions, 1246 deletions
diff --git a/app-cdr/cdrtools/ChangeLog b/app-cdr/cdrtools/ChangeLog
index 589385046ccc..e025845e8163 100644
--- a/app-cdr/cdrtools/ChangeLog
+++ b/app-cdr/cdrtools/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-cdr/cdrtools
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdrtools/ChangeLog,v 1.173 2007/05/20 15:09:23 josejx Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdrtools/ChangeLog,v 1.174 2007/06/02 13:58:26 pylon Exp $
+
+*cdrtools-2.01.01_alpha27 (02 Jun 2007)
+
+ 02 Jun 2007; Lars Weiler <pylon@gentoo.org> -files/mkisofs-iconv-10.patch,
+ -files/mkisofs-iconv-18.patch, cdrtools-2.01.01_alpha25.ebuild,
+ +cdrtools-2.01.01_alpha27.ebuild:
+ Version bump. Minor fixes.
20 May 2007; Joseph Jezak <josejx@gentoo.org>
cdrtools-2.01.01_alpha25.ebuild:
@@ -30,6 +37,12 @@
cdrtools-2.01.01_alpha25.ebuild:
Added ~mips to KEYWORDS.
+*cdrtools-2.01.01_alpha26 (12 May 2007)
+
+ 12 May 2007; Lars Weiler <pylon@gentoo.org>
+ +cdrtools-2.01.01_alpha26.ebuild:
+ Version bump; bug #176823.
+
12 May 2007; Lars Weiler <pylon@gentoo.org> -cdrtools-2.01-r3.ebuild:
Removing old version which was stable for m68k, but as no m68k-arch-alias
exists, I can't ask for new stabilisations.
diff --git a/app-cdr/cdrtools/Manifest b/app-cdr/cdrtools/Manifest
index b984227f2ad6..ff2711ca34d2 100644
--- a/app-cdr/cdrtools/Manifest
+++ b/app-cdr/cdrtools/Manifest
@@ -25,20 +25,13 @@ AUX cdrtools-2.01a27-writemode.patch 477 RMD160 ef5f5022987b705dc2f38a0ea9e88b3d
MD5 9c89bdd0371267dc24f8640160b9ea9e files/cdrtools-2.01a27-writemode.patch 477
RMD160 ef5f5022987b705dc2f38a0ea9e88b3d2eeb1b6b files/cdrtools-2.01a27-writemode.patch 477
SHA256 03f8148e03f774b210ac92e9532510f290ca2e9c59b309a15ebe4cc90fc0c5fb files/cdrtools-2.01a27-writemode.patch 477
-AUX mkisofs-iconv-10.patch 16986 RMD160 3a8ae83e0c5e4e04e0b55c4cd1089ea603a4b169 SHA1 ca93491e80b0dab6ef0c6956d3aedb5a462c4dc6 SHA256 608868e8d5e7d0d4fd7469a7a1f7271e63590fb645fdbdf3d6251678aad41745
-MD5 1a596f5cae257e97c559716336b30e5b files/mkisofs-iconv-10.patch 16986
-RMD160 3a8ae83e0c5e4e04e0b55c4cd1089ea603a4b169 files/mkisofs-iconv-10.patch 16986
-SHA256 608868e8d5e7d0d4fd7469a7a1f7271e63590fb645fdbdf3d6251678aad41745 files/mkisofs-iconv-10.patch 16986
AUX mkisofs-iconv-11.patch 16791 RMD160 a5f3cb9e8b03b2cda14cffe900f9a9371ec2def9 SHA1 e9348689ee7aaca850dff619656753fe05cdd28a SHA256 d1ddcbc3bf2f9bcb4949eb0bca871a104748daf8e4325f3776aa66bf0b2055f9
MD5 75ba41189dc89a96075673a6679bbcf6 files/mkisofs-iconv-11.patch 16791
RMD160 a5f3cb9e8b03b2cda14cffe900f9a9371ec2def9 files/mkisofs-iconv-11.patch 16791
SHA256 d1ddcbc3bf2f9bcb4949eb0bca871a104748daf8e4325f3776aa66bf0b2055f9 files/mkisofs-iconv-11.patch 16791
-AUX mkisofs-iconv-18.patch 18200 RMD160 3a28bf0a889e5137dd960e812ab5c8ea7e7248b1 SHA1 8ddc9a332916ceaa090e11bb0a075b818939d699 SHA256 db9a0d1834f53ba7263b11544c56a99b1e605bcf147972d59ae502529ad30676
-MD5 d3dfbd75ad7273037267e83aa461ca1a files/mkisofs-iconv-18.patch 18200
-RMD160 3a28bf0a889e5137dd960e812ab5c8ea7e7248b1 files/mkisofs-iconv-18.patch 18200
-SHA256 db9a0d1834f53ba7263b11544c56a99b1e605bcf147972d59ae502529ad30676 files/mkisofs-iconv-18.patch 18200
DIST cdrtools-2.01.01a10.tar.bz2 1499765 RMD160 242c7d325394e4cbb9a4659799dc333a910dc690 SHA1 e0b42b3454e961c9cf25f10d955052758d679f67 SHA256 1dea21bafae4af6b738c5e114aec26882f6f8b739340dfba6098c29550d4a39f
DIST cdrtools-2.01.01a25.tar.bz2 1590924 RMD160 8d55d2b784dc94c58d75cf15bb9be1c90a0f3f2a SHA1 bdec95d5683e22230867fdfa0506df2e73bb6bdc SHA256 f774fac641d9b312563265f0538f018006fb960251bb954a1873361d85fd5e52
+DIST cdrtools-2.01.01a27.tar.bz2 1594145 RMD160 c009cf067318da565a66420009406265df12b645 SHA1 fcb9bcdb697e474f2e60889fe64571b06442ffb4 SHA256 130527e8dcf67b64693ac4fc0cfaa4670af3e45c81c1ced2e90792988a586989
DIST cdrtools-2.01.tar.bz2 1400389 RMD160 b34a8b81b21cc8ed1927f34e44130513d2ee0407 SHA1 f94cfe51dd512d4e0b9106b986bde12d4f7967ce SHA256 728b6175069a77c4d7d92ae60108cbda81fbbf7bc7aa02e25153ccf2092f6c22
EBUILD cdrtools-2.01-r1.ebuild 3001 RMD160 ce1bb1e389f11553c3aafca83b4c9fd2e44b897b SHA1 d092c88b1467ea0661c1d3dd71bb392e1e00a28e SHA256 d7d2c06aafad22a5f7cc801a6ffd83dad814011633b861e4a2681fafbd0daaf1
MD5 31214970675829b8325b07b2d12b0e30 cdrtools-2.01-r1.ebuild 3001
@@ -48,14 +41,18 @@ EBUILD cdrtools-2.01.01_alpha10.ebuild 3743 RMD160 d75f538d66e416fdf1471d9a0b2d6
MD5 a242e520b96a122ba06e9493b7863837 cdrtools-2.01.01_alpha10.ebuild 3743
RMD160 d75f538d66e416fdf1471d9a0b2d671bce10c9f9 cdrtools-2.01.01_alpha10.ebuild 3743
SHA256 64c88759ca539f1da0003ef28d31e84eb8a756327b7ba1d62a37292d6eaafeb6 cdrtools-2.01.01_alpha10.ebuild 3743
-EBUILD cdrtools-2.01.01_alpha25.ebuild 3678 RMD160 9a3f1f827119c7e38cd2033e5c8efda3822f8fd4 SHA1 a3c4f300cd4526dde4a69bef703a964112fcb17b SHA256 c14e49e0ceee775c36f093dab13df209cc175ea6684a7afce2df5fb6e28dfcaf
-MD5 bad5c3ed12a571674a48954aebc0d520 cdrtools-2.01.01_alpha25.ebuild 3678
-RMD160 9a3f1f827119c7e38cd2033e5c8efda3822f8fd4 cdrtools-2.01.01_alpha25.ebuild 3678
-SHA256 c14e49e0ceee775c36f093dab13df209cc175ea6684a7afce2df5fb6e28dfcaf cdrtools-2.01.01_alpha25.ebuild 3678
-MISC ChangeLog 26009 RMD160 5198309a7cb0c0d06fcad718d22ee4df31e3c1db SHA1 ce115c0d334558b77e4a3ca1e32bf464a4354da2 SHA256 973fbd0106b1b2cf05d077ca09c0594cdc766e2167ac029ba57d0189e3c02946
-MD5 e3c0867bd31dfb2bb53577d034703a98 ChangeLog 26009
-RMD160 5198309a7cb0c0d06fcad718d22ee4df31e3c1db ChangeLog 26009
-SHA256 973fbd0106b1b2cf05d077ca09c0594cdc766e2167ac029ba57d0189e3c02946 ChangeLog 26009
+EBUILD cdrtools-2.01.01_alpha25.ebuild 3615 RMD160 77de81f53df453c2787708b7ff76f1e4cdec2671 SHA1 bf59bd56350c3051f3fc238f80146e13349f79e8 SHA256 cc98c092623718166516540e4569c26f8843a2af9ea33d2e5a71c0095144a027
+MD5 87d40b614f854a677360765c67acea1e cdrtools-2.01.01_alpha25.ebuild 3615
+RMD160 77de81f53df453c2787708b7ff76f1e4cdec2671 cdrtools-2.01.01_alpha25.ebuild 3615
+SHA256 cc98c092623718166516540e4569c26f8843a2af9ea33d2e5a71c0095144a027 cdrtools-2.01.01_alpha25.ebuild 3615
+EBUILD cdrtools-2.01.01_alpha27.ebuild 3622 RMD160 620fd79c489f0c40625bd297879f7e8efa2f6d47 SHA1 048fb3fa9af570b4faa45ed87bd5236ad0ad8cde SHA256 03473f73e7bf539c1403fa161f210fc09063e85fb04280a98ae9bdacca3a2bb3
+MD5 bddd2c653c09790d7d41bd5e9d8ed4d2 cdrtools-2.01.01_alpha27.ebuild 3622
+RMD160 620fd79c489f0c40625bd297879f7e8efa2f6d47 cdrtools-2.01.01_alpha27.ebuild 3622
+SHA256 03473f73e7bf539c1403fa161f210fc09063e85fb04280a98ae9bdacca3a2bb3 cdrtools-2.01.01_alpha27.ebuild 3622
+MISC ChangeLog 26412 RMD160 2748f0bfa9e51571397c7502bbdb30bc4e59d348 SHA1 bc7e5d35f80839a452dbe756e087ce9610aad492 SHA256 7f0f6d8e49d3b01c27715650b30c016cc12d68780776155a992046711ed074c0
+MD5 2aa6240dff96dfc50ba379f079a5d6e2 ChangeLog 26412
+RMD160 2748f0bfa9e51571397c7502bbdb30bc4e59d348 ChangeLog 26412
+SHA256 7f0f6d8e49d3b01c27715650b30c016cc12d68780776155a992046711ed074c0 ChangeLog 26412
MISC metadata.xml 254 RMD160 f274a70fa23d8064efddcce296e0aed3344bd86b SHA1 ab52ea446603ae6242dae41e0c90fcf7ae8f09cf SHA256 21400abf2dad3e5b7b0d2f7f9586c33cba6336b42a97e1f2b3e7e8b9db0daae5
MD5 015ab4293805faaa417d5ac5304750c4 metadata.xml 254
RMD160 f274a70fa23d8064efddcce296e0aed3344bd86b metadata.xml 254
@@ -69,10 +66,13 @@ SHA256 a243fe27f88f8832341653590b731738babc6c7ff6114e3c5f4a29f162dfd0c4 files/di
MD5 91f38fa40d7caac2a4f909eb9bab0713 files/digest-cdrtools-2.01.01_alpha25 265
RMD160 66b1a93a1ae843c9799788c0f117c13c45f3b47e files/digest-cdrtools-2.01.01_alpha25 265
SHA256 6984ee8a19e88bf1bed4b99aa03505d7b9756a6e518f6cc42a2ae1a8af6b9b20 files/digest-cdrtools-2.01.01_alpha25 265
+MD5 c966838930fb55b1cda518e062ae7e1c files/digest-cdrtools-2.01.01_alpha27 265
+RMD160 a2e24bc87ba6debe30b8157575d18d5571d97ac1 files/digest-cdrtools-2.01.01_alpha27 265
+SHA256 3f5ae1972474f6d5cf2b1b8536aa6d492001a68e62d54ed8890a47d5a15432ca files/digest-cdrtools-2.01.01_alpha27 265
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.4 (GNU/Linux)
+Version: GnuPG v1.4.7 (GNU/Linux)
-iD8DBQFGUGS4csIHjyDViGQRAujfAJ9C8jV7yi529j9jY0JZdmNcygueEACg0ujd
-A84X+VFRZW9IfuslhbXwsdo=
-=Mkwk
+iD8DBQFGYXeH6IPkARlRZfQRAiNRAJ4r3c/e2/g6MihJBly+VG17+6fU8gCfV+1/
+gx+aYmuwGiBGobDec6GAAms=
+=mdpj
-----END PGP SIGNATURE-----
diff --git a/app-cdr/cdrtools/cdrtools-2.01.01_alpha25.ebuild b/app-cdr/cdrtools/cdrtools-2.01.01_alpha25.ebuild
index 614f25efaae1..4db297cc6b81 100644
--- a/app-cdr/cdrtools/cdrtools-2.01.01_alpha25.ebuild
+++ b/app-cdr/cdrtools/cdrtools-2.01.01_alpha25.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdrtools/cdrtools-2.01.01_alpha25.ebuild,v 1.8 2007/05/20 15:03:42 josejx Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdrtools/cdrtools-2.01.01_alpha25.ebuild,v 1.9 2007/06/02 13:58:26 pylon Exp $
inherit eutils toolchain-funcs flag-o-matic
@@ -31,8 +31,6 @@ src_unpack() {
epatch "${FILESDIR}"/${PN}-2.01.01a01-scanbus.patch
epatch "${FILESDIR}"/${PN}-2.01.01a18-rezero.patch
- #use unicode && epatch "${FILESDIR}"/mkisofs-iconv-18.patch
-
# ppc-macos support
cd "${S}"/DEFAULTS
use ppc-macos && MYARCH="mac-os10" || MYARCH="linux"
diff --git a/app-cdr/cdrtools/cdrtools-2.01.01_alpha27.ebuild b/app-cdr/cdrtools/cdrtools-2.01.01_alpha27.ebuild
new file mode 100644
index 000000000000..2e8a1155f584
--- /dev/null
+++ b/app-cdr/cdrtools/cdrtools-2.01.01_alpha27.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdrtools/cdrtools-2.01.01_alpha27.ebuild,v 1.1 2007/06/02 13:58:26 pylon Exp $
+
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="A set of tools for CD/DVD reading and recording, including cdrecord"
+HOMEPAGE="http://cdrecord.berlios.de/"
+SRC_URI="ftp://ftp.berlios.de/pub/cdrecord/alpha/${P/_alpha/a}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1 CDDL-Schily"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="unicode"
+
+DEPEND="virtual/libc
+ !app-cdr/dvdrtools
+ !app-cdr/cdrkit"
+
+PROVIDE="virtual/cdrtools"
+
+S=${WORKDIR}/${PN}-2.01.01
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # CAN-2004-0806 - Bug 63187
+ epatch "${FILESDIR}"/${PN}-2.01-scsi-remote.patch
+ epatch "${FILESDIR}"/${PN}-2.01.01a03-warnings.patch
+ epatch "${FILESDIR}"/${PN}-2.01.01a01-scanbus.patch
+ epatch "${FILESDIR}"/${PN}-2.01.01a18-rezero.patch
+
+ # ppc-macos support
+ cd "${S}"/DEFAULTS
+ use ppc-macos && MYARCH="mac-os10" || MYARCH="linux"
+
+ sed -i "s:/opt/schily:/usr:g" Defaults.${MYARCH}
+ sed -i "s:/usr/src/linux/include::g" Defaults.${MYARCH}
+
+ cd "${S}"/librscg
+ sed -i "s:/opt/schily:/usr:g" scsi-remote.c
+
+ cd "${S}"/RULES
+ ln -sf i386-linux-cc.rul x86_64-linux-cc.rul
+ ln -sf i386-linux-gcc.rul x86_64-linux-gcc.rul
+ ln -sf ppc-linux-cc.rul ppc64-linux-cc.rul
+ ln -sf mips-linux-cc.rul mips64-linux-cc.rul
+ ln -sf i586-linux-cc.rul sh4-linux-cc.rul
+}
+
+src_compile() {
+ if use unicode; then
+ local flags="$(test-flags -finput-charset=ISO-8859-1 -fexec-charset=UTF-8)"
+ if [[ -n ${flags} ]]; then
+ append-flags ${flags}
+ else
+ ewarn "Your compiler does not support the options required to build"
+ ewarn "cdrtools with unicode in USE. unicode flag will be ignored."
+ fi
+ fi
+ emake CC="$(tc-getCC) -D__attribute_const__=const" COPTX="${CFLAGS}" CPPOPTX="${CPPFLAGS}" LDOPTX="${LDFLAGS}" || die
+}
+
+src_install() {
+ dobin cdda2wav/OBJ/*-*-cc/cdda2wav || die "cdda2wav"
+ dobin cdrecord/OBJ/*-*-cc/cdrecord || die "cdrecord"
+ dobin mkisofs/OBJ/*-*-cc/mkisofs || die "mkisofs"
+ dobin readcd/OBJ/*-*-cc/readcd || die "readcd"
+ dosbin rscsi/OBJ/*-*-cc/rscsi || die "rscsi"
+
+ insinto /usr/include
+ doins incs/*-*-cc/align.h incs/*-*-cc/avoffset.h incs/*-*-cc/xconfig.h || die "include"
+
+ cd mkisofs/diag/OBJ/*-*-cc
+ dobin devdump isodump isoinfo isovfy || die "dobin"
+
+ cd "${S}"
+ insinto /etc/default
+ doins rscsi/rscsi.dfl
+ doins cdrecord/cdrecord.dfl
+
+ cd "${S}"/libs/*-*-cc
+ dolib.a *.a || die "dolib failed"
+
+ cd "${S}"
+ insinto /usr/include/scsilib
+ doins include/schily/*.h
+ insinto /usr/include/scsilib/scg
+ doins include/scg/*.h
+
+ cd "${S}"
+ dodoc ABOUT Changelog README START READMEs/README.linux
+ dodoc README.{ATAPI,audio,cdplus,cdrw,cdtext,clone,copy,DiskT@2,linux-shm,mkisofs,multi,parallel,raw,rscsi,sony,verify}
+ doman */*.1
+ doman */*.8
+
+ cd "${S}"/mkisofs
+ docinto mkisofs
+ dodoc README*
+
+ cd "${S}"/cdda2wav
+ docinto cdda2wav
+ dodoc FAQ Frontends HOWTOUSE README TODO
+
+ cd "${S}"/doc
+ docinto print
+ dodoc *.ps
+}
+
+pkg_postinst() {
+ if use ppc-macos ; then
+ einfo
+ einfo "Darwin/OS X use the following device names:"
+ einfo
+ einfo "CD burners: (probably) ./cdrecord dev=IOCompactDiscServices"
+ einfo
+ einfo "DVD burners: (probably) ./cdrecord dev=IODVDServices"
+ einfo
+ else
+ echo
+ einfo "The command line option 'dev=/dev/hdX' (X is the name of your drive)"
+ einfo "should be used for IDE CD writers. And make sure that the permissions"
+ einfo "on this device are set properly and your user is in the correct group."
+ fi
+}
diff --git a/app-cdr/cdrtools/files/digest-cdrtools-2.01.01_alpha27 b/app-cdr/cdrtools/files/digest-cdrtools-2.01.01_alpha27
new file mode 100644
index 000000000000..d19fa42f67d5
--- /dev/null
+++ b/app-cdr/cdrtools/files/digest-cdrtools-2.01.01_alpha27
@@ -0,0 +1,3 @@
+MD5 ac3244b90403e3cb43ff168396a865e5 cdrtools-2.01.01a27.tar.bz2 1594145
+RMD160 c009cf067318da565a66420009406265df12b645 cdrtools-2.01.01a27.tar.bz2 1594145
+SHA256 130527e8dcf67b64693ac4fc0cfaa4670af3e45c81c1ced2e90792988a586989 cdrtools-2.01.01a27.tar.bz2 1594145
diff --git a/app-cdr/cdrtools/files/mkisofs-iconv-10.patch b/app-cdr/cdrtools/files/mkisofs-iconv-10.patch
deleted file mode 100644
index 7f584464c9f0..000000000000
--- a/app-cdr/cdrtools/files/mkisofs-iconv-10.patch
+++ /dev/null
@@ -1,619 +0,0 @@
-diff -urN --exclude-from=- cdrtools-2.01/include/unls.h cdrtools-2.01-jh/include/unls.h
---- cdrtools-2.01/include/unls.h 2003-06-16 00:41:23.000000000 +0300
-+++ cdrtools-2.01-jh/include/unls.h 2004-02-02 18:31:22.000000000 +0200
-@@ -30,6 +30,10 @@
- #include <prototyp.h>
- #endif
-
-+#ifdef USE_ICONV
-+#include <iconv.h>
-+#endif
-+
- #ifdef __cplusplus
- extern "C" {
- #endif
-@@ -43,6 +47,9 @@
- char *charset;
- unsigned char **page_uni2charset;
- struct nls_unicode *charset2uni;
-+#ifdef USE_ICONV
-+ iconv_t iconv_d;
-+#endif
-
- void (*inc_use_count) __PR((void));
- void (*dec_use_count) __PR((void));
-@@ -58,6 +65,9 @@
- extern void unload_nls __PR((struct nls_table *));
- extern struct nls_table *load_nls_default __PR((void));
- extern int init_nls_file __PR((char * name));
-+#ifdef USE_ICONV
-+extern int init_nls_iconv __PR((char * name));
-+#endif
-
- #ifdef __cplusplus
- }
-diff -urN --exclude-from=- cdrtools-2.01/libunls/libunls.mk cdrtools-2.01-jh/libunls/libunls.mk
---- cdrtools-2.01/libunls/libunls.mk 2000-03-25 14:51:56.000000000 +0200
-+++ cdrtools-2.01-jh/libunls/libunls.mk 2004-02-02 18:31:22.000000000 +0200
-@@ -8,6 +8,7 @@
- INSDIR= lib
- TARGETLIB= unls
- #CPPOPTS += -Istdio
-+CPPOPTS += -DUSE_ICONV
- include Targets
- LIBS=
-
-diff -urN --exclude-from=- cdrtools-2.01/libunls/nls.h cdrtools-2.01-jh/libunls/nls.h
---- cdrtools-2.01/libunls/nls.h 2002-12-03 02:34:27.000000000 +0200
-+++ cdrtools-2.01-jh/libunls/nls.h 2004-02-02 18:31:22.000000000 +0200
-@@ -111,5 +111,8 @@
- extern int init_nls_cp10079 __PR((void));
- extern int init_nls_cp10081 __PR((void));
- extern int init_nls_file __PR((char * name));
-+#ifdef USE_ICONV
-+extern int init_nls_iconv __PR((char * name));
-+#endif
-
- #endif /* _NLS_H */
-diff -urN --exclude-from=- cdrtools-2.01/libunls/nls_iconv.c cdrtools-2.01-jh/libunls/nls_iconv.c
---- cdrtools-2.01/libunls/nls_iconv.c 1970-01-01 02:00:00.000000000 +0200
-+++ cdrtools-2.01-jh/libunls/nls_iconv.c 2004-02-02 18:31:22.000000000 +0200
-@@ -0,0 +1,96 @@
-+/* @(#)nls_iconv.c 1.0 02/04/20 2002 J. Schilling */
-+#ifndef lint
-+static char sccsid[] =
-+ "@(#)nls_iconv.c 1.0 02/01/20 2002 J. Schilling";
-+#endif
-+/*
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2, or (at your option)
-+ * any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; see the file COPYING. If not, write to
-+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-+ */
-+/*
-+ * Modifications to make the code portable Copyright (c) 2000 J. Schilling
-+ *
-+ * nls_iconv: create a pseudo-charset table to use iconv() provided by C
-+ * library or libiconv by Bruno Haible
-+ * The Unicode to charset table has only exact mappings.
-+ *
-+ *
-+ * Jungshik Shin (jshin@mailaps.org) 04-Feb-2002
-+ */
-+
-+#ifdef USE_ICONV
-+#include <mconfig.h>
-+#include <stdio.h>
-+#include <stdxlib.h>
-+#include <strdefs.h>
-+#include "nls.h"
-+#include <iconv.h>
-+
-+static void inc_use_count __PR((void));
-+static void dec_use_count __PR((void));
-+
-+
-+static void
-+inc_use_count()
-+{
-+ MOD_INC_USE_COUNT;
-+}
-+
-+static void
-+dec_use_count()
-+{
-+ MOD_DEC_USE_COUNT;
-+}
-+
-+int
-+init_nls_iconv(charset)
-+ char *charset;
-+{
-+ iconv_t iconv_d; /* iconv conversion descriptor */
-+ struct nls_table *table;
-+
-+ /* give up if no charset is given */
-+ if (charset == NULL)
-+ return -1;
-+
-+ /* see if we already have a table with this name - built in tables
-+ have precedence over iconv() - i.e. can't have the name of an
-+ existing table. Also, we may have already registered this file
-+ table */
-+ if (find_nls(charset) != NULL)
-+ return -1;
-+
-+ if ((iconv_d = iconv_open("UCS-2BE", charset)) == (iconv_t) -1)
-+ return -1;
-+
-+
-+ /* set up the table */
-+ if ((table = (struct nls_table *)malloc(sizeof (struct nls_table)))
-+ == NULL) {
-+ return -1;
-+ }
-+
-+ /* give the table the file name, so we can find it again if needed */
-+ table->charset = strdup(charset);
-+ table->iconv_d = iconv_d;
-+ table->page_uni2charset = NULL;
-+ table->charset2uni = NULL;
-+ table->inc_use_count = inc_use_count;
-+ table->dec_use_count = dec_use_count;
-+ table->next = NULL;
-+
-+ /* register the table */
-+ return register_nls(table);
-+}
-+#endif
-diff -urN --exclude-from=- cdrtools-2.01/libunls/Targets cdrtools-2.01-jh/libunls/Targets
---- cdrtools-2.01/libunls/Targets 2002-12-03 02:34:27.000000000 +0200
-+++ cdrtools-2.01-jh/libunls/Targets 2004-02-02 18:31:22.000000000 +0200
-@@ -39,4 +39,5 @@
- nls_cp10029.c \
- nls_cp10079.c \
- nls_cp10081.c \
-- nls_file.c
-+ nls_file.c \
-+ nls_iconv.c
-diff -urN --exclude-from=- cdrtools-2.01/mkisofs/joliet.c cdrtools-2.01-jh/mkisofs/joliet.c
---- cdrtools-2.01/mkisofs/joliet.c 2003-04-28 01:36:08.000000000 +0300
-+++ cdrtools-2.01-jh/mkisofs/joliet.c 2004-02-03 14:15:17.000000000 +0200
-@@ -90,6 +90,11 @@
- #include <unls.h> /* For UNICODE translation */
- #include <schily.h>
-
-+#ifdef USE_ICONV
-+#include <iconv.h>
-+#include <errno.h>
-+#endif
-+
- static Uint jpath_table_index;
- static struct directory **jpathlist;
- static int next_jpath_index = 1;
-@@ -103,13 +108,23 @@
- };
-
- #ifdef UDF
-- void convert_to_unicode __PR((unsigned char *buffer,
-+# ifdef USE_ICONV
-+ size_t
-+# else
-+ void
-+# endif
-+ convert_to_unicode __PR((unsigned char *buffer,
- int size, char *source, struct nls_table *inls));
-- int joliet_strlen __PR((const char *string));
-+ int joliet_strlen __PR((const char *string, struct nls_table *inls));
- #else
--static void convert_to_unicode __PR((unsigned char *buffer,
-+# ifdef USE_ICONV
-+ static size_t
-+# else
-+ static void
-+#endif
-+ convert_to_unicode __PR((unsigned char *buffer,
- int size, char *source, struct nls_table *inls));
--static int joliet_strlen __PR((const char *string));
-+static int joliet_strlen __PR((const char *string, struct nls_table *inls));
- #endif
- static void get_joliet_vol_desc __PR((struct iso_primary_descriptor *jvol_desc));
- static void assign_joliet_directory_addresses __PR((struct directory *node));
-@@ -161,6 +176,20 @@
- if (inls == onls)
- return (c);
-
-+#ifdef USE_ICONV
-+ if(inls->charset2uni == NULL || onls->page_uni2charset == NULL) {
-+ /*
-+ * This shouldn't be reached
-+ */
-+ static BOOL iconv_warned = FALSE;
-+ if(!iconv_warned) {
-+ error("Warning: Iconv conversion not supported in conv_charset.\n");
-+ iconv_warned = TRUE;
-+ }
-+ return (c);
-+ }
-+#endif
-+
- /* get high and low UNICODE bytes */
- uh = inls->charset2uni[c].uni2;
- ul = inls->charset2uni[c].uni1;
-@@ -186,10 +215,18 @@
- *
- * Notes:
- */
--#ifdef UDF
--void
-+#ifdef USE_ICONV
-+# if UDF
-+size_t
-+# else
-+static size_t
-+# endif
- #else
-+# if UDF
-+void
-+# else
- static void
-+# endif
- #endif
- convert_to_unicode(buffer, size, source, inls)
- unsigned char *buffer;
-@@ -216,6 +253,51 @@
- tmpbuf = (Uchar *) source;
- }
-
-+#ifdef USE_ICONV
-+ if (inls->iconv_d && inls->charset2uni==NULL &&
-+ inls->page_uni2charset==NULL) {
-+ char *inptr = tmpbuf;
-+ char *outptr = buffer;
-+ size_t inleft = strlen(tmpbuf);
-+ size_t inlen = inleft;
-+ size_t outleft = size;
-+
-+ iconv(inls->iconv_d, NULL, NULL, NULL, NULL);
-+ if(iconv(inls->iconv_d, &inptr, &inleft, &outptr, &outleft) ==
-+ (size_t)-1 && errno == EILSEQ) {
-+ fprintf(stderr, "Incorrectly encoded string (%s) "
-+ "encountered.\nPossibly creating an invalid "
-+ "Joliet extension. Aborting.\n", source);
-+ exit(1);
-+ }
-+
-+ for (i = 0; (i + 1) < size - outleft; i += 2) { /* Size may be odd!!!*/
-+ if (buffer[i]=='\0') {
-+ switch (buffer[i+1]) { /* Invalid characters for Joliet */
-+ case '*':
-+ case '/':
-+ case ':':
-+ case ';':
-+ case '?':
-+ case '\\':
-+ buffer[i+1]='_';
-+ default:
-+ if (buffer[i+1] == 0x7f ||
-+ buffer[i+1] < 0x20)
-+ buffer[i+1]='_';
-+ }
-+ }
-+ }
-+ if (size & 1) { /* beautification */
-+ buffer[size - 1] = 0;
-+ }
-+ if (source == NULL) {
-+ free(tmpbuf);
-+ }
-+ return (inlen - inleft);
-+ }
-+#endif
-+
- /*
- * Now start copying characters. If the size was specified to be 0,
- * then assume the input was 0 terminated.
-@@ -271,6 +353,9 @@
- if (source == NULL) {
- free(tmpbuf);
- }
-+#ifdef USE_ICONV
-+ return j;
-+#endif
- }
-
- /*
-@@ -287,12 +372,50 @@
- #else
- static int
- #endif
--joliet_strlen(string)
-+joliet_strlen(string, inls)
- const char *string;
-+ struct nls_table *inls;
- {
- int rtn;
-
-+#ifdef USE_ICONV
-+ if (inls->iconv_d && inls->charset2uni==NULL &&
-+ inls->page_uni2charset==NULL) {
-+ /*
-+ * we const-cast since we're sure iconv won't change
-+ * the string itself
-+ */
-+ char *string_ptr = (char *)string;
-+ size_t string_len = strlen(string);
-+
-+ /*
-+ * iconv has no way of finding out the required size
-+ * in the target
-+ */
-+
-+ char *tmp, *tmp_ptr;
-+ /* we assume that the maximum length is 2 * jlen */
-+ size_t tmp_len = (size_t)jlen * 2 + 1;
-+ tmp = e_malloc(tmp_len);
-+ tmp_ptr = tmp;
-+
-+ iconv(inls->iconv_d, NULL, NULL, NULL, NULL);
-+ iconv(inls->iconv_d, &string_ptr, &string_len, &tmp_ptr,
-+ &tmp_len);
-+
-+ /*
-+ * iconv advanced the tmp pointer with as many chars
-+ * as it has written to it, so we add up the delta
-+ */
-+ rtn = (tmp_ptr - tmp);
-+
-+ free(tmp);
-+ } else {
-+ rtn = strlen(string) << 1;
-+ }
-+#else
- rtn = strlen(string) << 1;
-+#endif
-
- /*
- * We do clamp the maximum length of a Joliet string to be the
-@@ -480,16 +603,33 @@
- /* compare the Unicode names */
-
- while (*rpnt && *lpnt) {
-+#ifdef USE_ICONV
-+ size_t ri, li;
-+
-+ ri = convert_to_unicode(rtmp, 2, rpnt, rinls);
-+ li = convert_to_unicode(ltmp, 2, lpnt, linls);
-+ rpnt += ri;
-+ lpnt += li;
-+ if(!ri && !li)
-+ return (0);
-+ else if(ri && !li)
-+ return (1);
-+ else if(!ri && li)
-+ return (-1);
-+#else
- convert_to_unicode(rtmp, 2, rpnt, rinls);
- convert_to_unicode(ltmp, 2, lpnt, linls);
-+#endif
-
- if (a_to_u_2_byte(rtmp) < a_to_u_2_byte(ltmp))
- return (-1);
- if (a_to_u_2_byte(rtmp) > a_to_u_2_byte(ltmp))
- return (1);
-
-+#ifndef USE_ICONV
- rpnt++;
- lpnt++;
-+#endif
- }
-
- if (*rpnt)
-@@ -574,10 +714,10 @@
- }
- #ifdef APPLE_HYB
- if (USE_MAC_NAME(de))
-- namelen = joliet_strlen(de->hfs_ent->name);
-+ namelen = joliet_strlen(de->hfs_ent->name, hfs_inls);
- else
- #endif /* APPLE_HYB */
-- namelen = joliet_strlen(de->name);
-+ namelen = joliet_strlen(de->name, in_nls);
-
- if (dpnt == root) {
- jpath_table_l[jpath_table_index] = 1;
-@@ -742,10 +882,10 @@
- #ifdef APPLE_HYB
- /* Use the HFS name if it exists */
- if (USE_MAC_NAME(s_entry1))
-- cvt_len = joliet_strlen(s_entry1->hfs_ent->name);
-+ cvt_len = joliet_strlen(s_entry1->hfs_ent->name, hfs_inls);
- else
- #endif /* APPLE_HYB */
-- cvt_len = joliet_strlen(s_entry1->name);
-+ cvt_len = joliet_strlen(s_entry1->name, in_nls);
-
- /*
- * Fix the record length
-@@ -891,12 +1031,12 @@
- if (USE_MAC_NAME(s_entry))
- /* Use the HFS name if it exists */
- jpath_table_size +=
-- joliet_strlen(s_entry->hfs_ent->name) +
-+ joliet_strlen(s_entry->hfs_ent->name, hfs_inls) +
- offsetof(struct iso_path_table, name[0]);
- else
- #endif /* APPLE_HYB */
- jpath_table_size +=
-- joliet_strlen(s_entry->name) +
-+ joliet_strlen(s_entry->name, in_nls) +
- offsetof(struct iso_path_table, name[0]);
- if (jpath_table_size & 1) {
- jpath_table_size++;
-@@ -918,13 +1058,13 @@
- /* Use the HFS name if it exists */
- s_entry->jreclen =
- offsetof(struct iso_directory_record, name[0])
-- + joliet_strlen(s_entry->hfs_ent->name)
-+ + joliet_strlen(s_entry->hfs_ent->name, hfs_inls)
- + 1;
- else
- #endif /* APPLE_HYB */
- s_entry->jreclen =
- offsetof(struct iso_directory_record, name[0])
-- + joliet_strlen(s_entry->name)
-+ + joliet_strlen(s_entry->name, in_nls)
- + 1;
- } else {
- /*
-@@ -1072,6 +1212,9 @@
- #endif
-
- while (*rpnt && *lpnt) {
-+#ifdef USE_ICONV
-+ size_t ri, li;
-+#endif
- if (*rpnt == ';' && *lpnt != ';')
- return (-1);
- if (*rpnt != ';' && *lpnt == ';')
-@@ -1092,16 +1235,32 @@
- return (1);
- #endif
-
-+#ifdef USE_ICONV
-+
-+ ri = convert_to_unicode(rtmp, 2, rpnt, rinls);
-+ li = convert_to_unicode(ltmp, 2, lpnt, linls);
-+ rpnt += ri;
-+ lpnt += li;
-+ if(!ri && !li)
-+ return (0);
-+ else if(ri && !li)
-+ return (1);
-+ else if(!ri && li)
-+ return (-1);
-+#else
- convert_to_unicode(rtmp, 2, rpnt, rinls);
- convert_to_unicode(ltmp, 2, lpnt, linls);
-+#endif
-
- if (a_to_u_2_byte(rtmp) < a_to_u_2_byte(ltmp))
- return (-1);
- if (a_to_u_2_byte(rtmp) > a_to_u_2_byte(ltmp))
- return (1);
-
-+#ifndef USE_ICONV
- rpnt++;
- lpnt++;
-+#endif
- }
- if (*rpnt)
- return (1);
-diff -urN --exclude-from=- cdrtools-2.01/mkisofs/Makefile cdrtools-2.01-jh/mkisofs/Makefile
---- cdrtools-2.01/mkisofs/Makefile 2004-01-02 17:23:32.000000000 +0200
-+++ cdrtools-2.01-jh/mkisofs/Makefile 2004-02-02 18:31:22.000000000 +0200
-@@ -32,6 +32,7 @@
- CPPOPTS += -DUDF
- CPPOPTS += -DDVD_VIDEO
- CPPOPTS += -DSORTING
-+CPPOPTS += -DUSE_ICONV
- CPPOPTS += -I../libhfs_iso/
- CPPOPTS += -DHAVE_CONFIG_H -DUSE_LIBSCHILY -DUSE_SCG \
- '-DAPPID_DEFAULT="MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING"' \
-diff -urN --exclude-from=- cdrtools-2.01/mkisofs/mkisofs.c cdrtools-2.01-jh/mkisofs/mkisofs.c
---- cdrtools-2.01/mkisofs/mkisofs.c 2004-01-07 01:23:46.000000000 +0200
-+++ cdrtools-2.01-jh/mkisofs/mkisofs.c 2004-02-02 18:31:22.000000000 +0200
-@@ -59,6 +59,11 @@
- #endif
- #endif /* no_more_needed */
-
-+#ifdef USE_ICONV
-+#include <locale.h>
-+#include <langinfo.h>
-+#endif
-+
- struct directory *root = NULL;
- int path_ind;
-
-@@ -223,6 +228,10 @@
- int do_sort = 0; /* sort file data */
- #endif /* SORTING */
-
-+#ifdef USE_ICONV
-+int iconv_possible;
-+#endif
-+
- struct nls_table *in_nls = NULL; /* input UNICODE conversion table */
- struct nls_table *out_nls = NULL; /* output UNICODE conversion table */
- #ifdef APPLE_HYB
-@@ -2235,6 +2244,37 @@
- init_nls_file(hfs_ocharset);
- #endif /* APPLE_HYB */
-
-+#ifdef USE_ICONV
-+ iconv_possible = !(iso9660_level >= 4 || ((ocharset &&
-+ strcmp(ocharset, icharset ? icharset : "")) &&
-+ use_RockRidge) || apple_ext || apple_hyb);
-+
-+ setlocale(LC_CTYPE, "");
-+
-+ if (icharset == NULL && iconv_possible) {
-+ char *charset = nl_langinfo(CODESET);
-+ /* set to detected value but only if it is not pure US-ASCII */
-+ if(strcmp(charset, "ANSI_X3.4-1968") != 0)
-+ icharset = charset;
-+
-+ if(icharset && verbose > 0)
-+ fprintf(stderr, "INFO:\t"
-+ "%s character encoding detected by locale settings."
-+ "\n\tAssuming %s encoded filenames on source "
-+ "filesystem,\n"
-+ "\tuse -input-charset to override.\n",
-+ icharset, icharset);
-+ }
-+
-+ if(iconv_possible) {
-+ /*
-+ * don't care if initialization fails
-+ */
-+ init_nls_iconv(icharset);
-+ init_nls_iconv(ocharset);
-+ }
-+#endif
-+
- if (icharset == NULL) {
- #if (defined(__CYGWIN32__) || defined(__CYGWIN__)) && !defined(IS_CYGWIN_1)
- in_nls = load_nls("cp437");
-@@ -2262,6 +2302,12 @@
- if (in_nls == NULL || out_nls == NULL) { /* Unknown charset specified */
- fprintf(stderr, "Unknown charset\nKnown charsets are:\n");
- list_nls(); /* List all known charset names */
-+#ifdef USE_ICONV
-+ if(!iconv_possible)
-+ fprintf(stderr, "Iconv charsets cannot be used with "
-+ "Apple extension, HFS, ISO9660 version 2 or\n"
-+ "Rock Ridge.\n");
-+#endif
- exit(1);
- }
-
-diff -urN --exclude-from=- cdrtools-2.01/mkisofs/mkisofs.h cdrtools-2.01-jh/mkisofs/mkisofs.h
---- cdrtools-2.01/mkisofs/mkisofs.h 2003-12-28 15:38:51.000000000 +0200
-+++ cdrtools-2.01-jh/mkisofs/mkisofs.h 2004-02-02 18:31:22.000000000 +0200
-@@ -501,9 +501,14 @@
-
- /* joliet.c */
- #ifdef UDF
-+# ifdef USE_ICONV
-+extern size_t convert_to_unicode __PR((unsigned char *buffer,
-+ int size, char *source, struct nls_table *inls));
-+# else
- extern void convert_to_unicode __PR((unsigned char *buffer,
- int size, char *source, struct nls_table *inls));
--extern int joliet_strlen __PR((const char *string));
-+# endif
-+extern int joliet_strlen __PR((const char *string, struct nls_table *inls));
- #endif
- extern unsigned char conv_charset __PR((unsigned char, struct nls_table *,
- struct nls_table *));
-diff -urN --exclude-from=- cdrtools-2.01/mkisofs/udf.c cdrtools-2.01-jh/mkisofs/udf.c
---- cdrtools-2.01/mkisofs/udf.c 2003-04-28 01:34:52.000000000 +0300
-+++ cdrtools-2.01-jh/mkisofs/udf.c 2004-02-02 18:31:22.000000000 +0200
-@@ -442,7 +442,7 @@
- int i;
- int expanded_length;
-
-- expanded_length = joliet_strlen(src);
-+ expanded_length = joliet_strlen(src, in_nls);
- if (expanded_length > 1024)
- expanded_length = 1024;
- if (expanded_length > (dst_size-1)*2)
diff --git a/app-cdr/cdrtools/files/mkisofs-iconv-18.patch b/app-cdr/cdrtools/files/mkisofs-iconv-18.patch
deleted file mode 100644
index 9c565794bf3f..000000000000
--- a/app-cdr/cdrtools/files/mkisofs-iconv-18.patch
+++ /dev/null
@@ -1,603 +0,0 @@
-diff -Naurp cdrtools-2.01.01.orig/include/schily/unls.h cdrtools-2.01.01/include/schily/unls.h
---- cdrtools-2.01.01.orig/include/schily/unls.h 2006-10-10 10:24:15.000000000 +0200
-+++ cdrtools-2.01.01/include/schily/unls.h 2006-10-28 16:59:33.000000000 +0200
-@@ -23,6 +23,10 @@
- #include <schily/mconfig.h>
- #endif
-
-+#ifdef USE_ICONV
-+#include <iconv.h>
-+#endif
-+
- #ifdef __cplusplus
- extern "C" {
- #endif
-@@ -37,6 +41,9 @@ struct unls_table {
- unsigned char **unls_uni2cs; /* Unicode -> Charset */
- struct unls_unicode *unls_cs2uni; /* Charset -> Unicode */
- struct unls_table *unls_next; /* Next table */
-+#ifdef USE_ICONV
-+ iconv_t iconv_d;
-+#endif
- };
-
- extern int init_unls __PR((void));
-@@ -48,6 +55,9 @@ extern struct unls_table *load_unls __P
- extern void unload_unls __PR((struct unls_table *));
- extern struct unls_table *load_unls_default __PR((void));
- extern int init_unls_file __PR((char * name));
-+#ifdef USE_ICONV
-+extern int init_unls_iconv __PR((char * name));
-+#endif
-
- #ifdef __cplusplus
- }
-diff -Naurp cdrtools-2.01.01.orig/libunls/libunls.mk cdrtools-2.01.01/libunls/libunls.mk
---- cdrtools-2.01.01.orig/libunls/libunls.mk 2000-03-25 13:51:56.000000000 +0100
-+++ cdrtools-2.01.01/libunls/libunls.mk 2006-10-28 16:59:33.000000000 +0200
-@@ -8,6 +8,7 @@ include $(SRCROOT)/$(RULESDIR)/rules.to
- INSDIR= lib
- TARGETLIB= unls
- #CPPOPTS += -Istdio
-+CPPOPTS += -DUSE_ICONV
- include Targets
- LIBS=
-
-diff -Naurp cdrtools-2.01.01.orig/libunls/nls.h cdrtools-2.01.01/libunls/nls.h
---- cdrtools-2.01.01.orig/libunls/nls.h 2006-09-13 17:09:14.000000000 +0200
-+++ cdrtools-2.01.01/libunls/nls.h 2006-10-28 16:59:33.000000000 +0200
-@@ -110,5 +110,8 @@ extern int init_unls_cp10029 __PR((void)
- extern int init_unls_cp10079 __PR((void));
- extern int init_unls_cp10081 __PR((void));
- extern int init_unls_file __PR((char * name));
-+#ifdef USE_ICONV
-+extern int init_unls_iconv __PR((char * name));
-+#endif
-
- #endif /* _NLS_H */
-diff -Naurp cdrtools-2.01.01.orig/libunls/nls_iconv.c cdrtools-2.01.01/libunls/nls_iconv.c
---- cdrtools-2.01.01.orig/libunls/nls_iconv.c 1970-01-01 01:00:00.000000000 +0100
-+++ cdrtools-2.01.01/libunls/nls_iconv.c 2006-10-28 16:58:38.000000000 +0200
-@@ -0,0 +1,80 @@
-+/* @(#)nls_iconv.c 1.0 02/04/20 2002 J. Schilling */
-+#ifndef lint
-+static char sccsid[] =
-+ "@(#)nls_iconv.c 1.0 02/01/20 2002 J. Schilling";
-+#endif
-+/*
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2, or (at your option)
-+ * any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; see the file COPYING. If not, write to
-+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-+ */
-+/*
-+ * Modifications to make the code portable Copyright (c) 2000 J. Schilling
-+ *
-+ * nls_iconv: create a pseudo-charset table to use iconv() provided by C
-+ * library or libiconv by Bruno Haible
-+ * The Unicode to charset table has only exact mappings.
-+ *
-+ *
-+ * Jungshik Shin (jshin@mailaps.org) 04-Feb-2002
-+ */
-+
-+#ifdef USE_ICONV
-+#include <mconfig.h>
-+#include <stdio.h>
-+#include <stdxlib.h>
-+#include <strdefs.h>
-+#include "nls.h"
-+#include <iconv.h>
-+
-+
-+int
-+init_unls_iconv(charset)
-+ char *charset;
-+{
-+ iconv_t iconv_d; /* iconv conversion descriptor */
-+ struct unls_table *table;
-+
-+ /* give up if no charset is given */
-+ if (charset == NULL)
-+ return -1;
-+
-+ /* see if we already have a table with this name - built in tables
-+ have precedence over iconv() - i.e. can't have the name of an
-+ existing table. Also, we may have already registered this file
-+ table */
-+ if (find_unls(charset) != NULL)
-+ return -1;
-+
-+ if ((iconv_d = iconv_open("UCS-2BE", charset)) == (iconv_t) -1)
-+ return -1;
-+
-+
-+ /* set up the table */
-+ if ((table = (struct unls_table *)malloc(sizeof (struct unls_table)))
-+ == NULL) {
-+ return -1;
-+ }
-+
-+ /* give the table the file name, so we can find it again if needed */
-+ table->unls_name = strdup(charset);
-+ table->iconv_d = iconv_d;
-+ table->unls_uni2cs = NULL;
-+ table->unls_cs2uni = NULL;
-+ table->unls_next = NULL;
-+
-+ /* register the table */
-+ return register_unls(table);
-+}
-+#endif
-+
-diff -Naurp cdrtools-2.01.01.orig/libunls/Targets cdrtools-2.01.01/libunls/Targets
---- cdrtools-2.01.01.orig/libunls/Targets 2002-12-03 01:34:27.000000000 +0100
-+++ cdrtools-2.01.01/libunls/Targets 2006-10-28 16:59:33.000000000 +0200
-@@ -39,4 +39,5 @@ CFILES= nls_base.c \
- nls_cp10029.c \
- nls_cp10079.c \
- nls_cp10081.c \
-- nls_file.c
-+ nls_file.c \
-+ nls_iconv.c
-diff -Naurp cdrtools-2.01.01.orig/mkisofs/joliet.c cdrtools-2.01.01/mkisofs/joliet.c
---- cdrtools-2.01.01.orig/mkisofs/joliet.c 2006-10-08 15:48:36.000000000 +0200
-+++ cdrtools-2.01.01/mkisofs/joliet.c 2006-10-28 16:59:33.000000000 +0200
-@@ -90,6 +90,11 @@ static char sccsid[] =
- #include <schily/unls.h> /* For UNICODE translation */
- #include <schily/schily.h>
-
-+#ifdef USE_ICONV
-+#include <iconv.h>
-+#include <errno.h>
-+#endif
-+
- static Uint jpath_table_index;
- static struct directory **jpathlist;
- static int next_jpath_index = 1;
-@@ -103,13 +108,23 @@ static char ucs_codes[] = {
- };
-
- #ifdef UDF
-- void convert_to_unicode __PR((unsigned char *buffer,
-+# ifdef USE_ICONV
-+ size_t
-+# else
-+ void
-+# endif
-+ convert_to_unicode __PR((unsigned char *buffer,
- int size, char *source, struct unls_table *inls));
-- int joliet_strlen __PR((const char *string));
-+ int joliet_strlen __PR((const char *string, struct unls_table *inls));
- #else
--static void convert_to_unicode __PR((unsigned char *buffer,
-+# ifdef USE_ICONV
-+ static size_t
-+# else
-+ static void
-+#endif
-+ convert_to_unicode __PR((unsigned char *buffer,
- int size, char *source, struct unls_table *inls));
--static int joliet_strlen __PR((const char *string));
-+static int joliet_strlen __PR((const char *string, struct unls_table *inls));
- #endif
- static void get_joliet_vol_desc __PR((struct iso_primary_descriptor *jvol_desc));
- static void assign_joliet_directory_addresses __PR((struct directory *node));
-@@ -161,6 +176,20 @@ conv_charset(c, inls, onls)
- if (inls == onls)
- return (c);
-
-+#ifdef USE_ICONV
-+ if(inls->unls_cs2uni == NULL || onls->unls_uni2cs == NULL) {
-+ /*
-+ * This shouldn't be reached
-+ */
-+ static BOOL iconv_warned = FALSE;
-+ if(!iconv_warned) {
-+ error("Warning: Iconv conversion not supported in conv_charset.\n");
-+ iconv_warned = TRUE;
-+ }
-+ return (c);
-+ }
-+#endif
-+
- /* get high and low UNICODE bytes */
- uh = inls->unls_cs2uni[c].unls_high;
- ul = inls->unls_cs2uni[c].unls_low;
-@@ -186,10 +215,18 @@ conv_charset(c, inls, onls)
- *
- * Notes:
- */
--#ifdef UDF
--void
-+#ifdef USE_ICONV
-+# if UDF
-+size_t
-+# else
-+static size_t
-+# endif
- #else
-+# if UDF
-+void
-+# else
- static void
-+# endif
- #endif
- convert_to_unicode(buffer, size, source, inls)
- unsigned char *buffer;
-@@ -216,6 +253,51 @@ convert_to_unicode(buffer, size, source,
- tmpbuf = (Uchar *) source;
- }
-
-+#ifdef USE_ICONV
-+ if (inls->iconv_d && inls->unls_cs2uni==NULL &&
-+ inls->unls_uni2cs==NULL) {
-+ char *inptr = tmpbuf;
-+ char *outptr = buffer;
-+ size_t inleft = strlen(tmpbuf);
-+ size_t inlen = inleft;
-+ size_t outleft = size;
-+
-+ iconv(inls->iconv_d, NULL, NULL, NULL, NULL);
-+ if(iconv(inls->iconv_d, &inptr, &inleft, &outptr, &outleft) ==
-+ (size_t)-1 && errno == EILSEQ) {
-+ fprintf(stderr, "Incorrectly encoded string (%s) "
-+ "encountered.\nPossibly creating an invalid "
-+ "Joliet extension. Aborting.\n", source);
-+ exit(1);
-+ }
-+
-+ for (i = 0; (i + 1) < size - outleft; i += 2) { /* Size may be odd!!!*/
-+ if (buffer[i]=='\0') {
-+ switch (buffer[i+1]) { /* Invalid characters for Joliet */
-+ case '*':
-+ case '/':
-+ case ':':
-+ case ';':
-+ case '?':
-+ case '\\':
-+ buffer[i+1]='_';
-+ default:
-+ if (buffer[i+1] == 0x7f ||
-+ buffer[i+1] < 0x20)
-+ buffer[i+1]='_';
-+ }
-+ }
-+ }
-+ if (size & 1) { /* beautification */
-+ buffer[size - 1] = 0;
-+ }
-+ if (source == NULL) {
-+ free(tmpbuf);
-+ }
-+ return (inlen - inleft);
-+ }
-+#endif
-+
- /*
- * Now start copying characters. If the size was specified to be 0,
- * then assume the input was 0 terminated.
-@@ -271,6 +353,9 @@ convert_to_unicode(buffer, size, source,
- if (source == NULL) {
- free(tmpbuf);
- }
-+#ifdef USE_ICONV
-+ return j;
-+#endif
- }
-
- /*
-@@ -287,12 +372,50 @@ int
- #else
- static int
- #endif
--joliet_strlen(string)
-+joliet_strlen(string, inls)
- const char *string;
-+ struct unls_table *inls;
- {
- int rtn;
-
-+#ifdef USE_ICONV
-+ if (inls->iconv_d && inls->unls_cs2uni==NULL &&
-+ inls->unls_uni2cs==NULL) {
-+ /*
-+ * we const-cast since we're sure iconv won't change
-+ * the string itself
-+ */
-+ char *string_ptr = (char *)string;
-+ size_t string_len = strlen(string);
-+
-+ /*
-+ * iconv has no way of finding out the required size
-+ * in the target
-+ */
-+
-+ char *tmp, *tmp_ptr;
-+ /* we assume that the maximum length is 2 * jlen */
-+ size_t tmp_len = (size_t)jlen * 2 + 1;
-+ tmp = e_malloc(tmp_len);
-+ tmp_ptr = tmp;
-+
-+ iconv(inls->iconv_d, NULL, NULL, NULL, NULL);
-+ iconv(inls->iconv_d, &string_ptr, &string_len, &tmp_ptr,
-+ &tmp_len);
-+
-+ /*
-+ * iconv advanced the tmp pointer with as many chars
-+ * as it has written to it, so we add up the delta
-+ */
-+ rtn = (tmp_ptr - tmp);
-+
-+ free(tmp);
-+ } else {
-+ rtn = strlen(string) << 1;
-+ }
-+#else
- rtn = strlen(string) << 1;
-+#endif
-
- /*
- * We do clamp the maximum length of a Joliet string to be the
-@@ -481,16 +604,33 @@ joliet_compare_paths(r, l)
- /* compare the Unicode names */
-
- while (*rpnt && *lpnt) {
-+#ifdef USE_ICONV
-+ size_t ri, li;
-+
-+ ri = convert_to_unicode(rtmp, 2, rpnt, rinls);
-+ li = convert_to_unicode(ltmp, 2, lpnt, linls);
-+ rpnt += ri;
-+ lpnt += li;
-+ if(!ri && !li)
-+ return (0);
-+ else if(ri && !li)
-+ return (1);
-+ else if(!ri && li)
-+ return (-1);
-+#else
- convert_to_unicode(rtmp, 2, rpnt, rinls);
- convert_to_unicode(ltmp, 2, lpnt, linls);
-+#endif
-
- if (a_to_u_2_byte(rtmp) < a_to_u_2_byte(ltmp))
- return (-1);
- if (a_to_u_2_byte(rtmp) > a_to_u_2_byte(ltmp))
- return (1);
-
-+#ifndef USE_ICONV
- rpnt++;
- lpnt++;
-+#endif
- }
-
- if (*rpnt)
-@@ -564,10 +704,10 @@ generate_joliet_path_tables()
- }
- #ifdef APPLE_HYB
- if (USE_MAC_NAME(de))
-- namelen = joliet_strlen(de->hfs_ent->name);
-+ namelen = joliet_strlen(de->hfs_ent->name, hfs_inls);
- else
- #endif /* APPLE_HYB */
-- namelen = joliet_strlen(de->name);
-+ namelen = joliet_strlen(de->name, in_nls);
-
- if (dpnt == root) {
- jpath_table_l[jpath_table_index] = 1;
-@@ -712,10 +852,10 @@ generate_one_joliet_directory(dpnt, outf
- #ifdef APPLE_HYB
- /* Use the HFS name if it exists */
- if (USE_MAC_NAME(s_entry1))
-- cvt_len = joliet_strlen(s_entry1->hfs_ent->name);
-+ cvt_len = joliet_strlen(s_entry1->hfs_ent->name, hfs_inls);
- else
- #endif /* APPLE_HYB */
-- cvt_len = joliet_strlen(s_entry1->name);
-+ cvt_len = joliet_strlen(s_entry1->name, in_nls);
-
- /*
- * Fix the record length
-@@ -849,12 +989,12 @@ joliet_sort_n_finish(this_dir)
- if (USE_MAC_NAME(s_entry))
- /* Use the HFS name if it exists */
- jpath_table_size +=
-- joliet_strlen(s_entry->hfs_ent->name) +
-+ joliet_strlen(s_entry->hfs_ent->name, hfs_inls) +
- offsetof(struct iso_path_table, name[0]);
- else
- #endif /* APPLE_HYB */
- jpath_table_size +=
-- joliet_strlen(s_entry->name) +
-+ joliet_strlen(s_entry->name, in_nls) +
- offsetof(struct iso_path_table, name[0]);
- if (jpath_table_size & 1) {
- jpath_table_size++;
-@@ -876,13 +1016,13 @@ joliet_sort_n_finish(this_dir)
- /* Use the HFS name if it exists */
- s_entry->jreclen =
- offsetof(struct iso_directory_record, name[0])
-- + joliet_strlen(s_entry->hfs_ent->name)
-+ + joliet_strlen(s_entry->hfs_ent->name, hfs_inls)
- + 1;
- else
- #endif /* APPLE_HYB */
- s_entry->jreclen =
- offsetof(struct iso_directory_record, name[0])
-- + joliet_strlen(s_entry->name)
-+ + joliet_strlen(s_entry->name, in_nls)
- + 1;
- } else {
- /*
-@@ -1024,6 +1164,9 @@ joliet_compare_dirs(rr, ll)
- #endif
-
- while (*rpnt && *lpnt) {
-+#ifdef USE_ICONV
-+ size_t ri, li;
-+#endif
- if (*rpnt == ';' && *lpnt != ';')
- return (-1);
- if (*rpnt != ';' && *lpnt == ';')
-@@ -1044,16 +1187,32 @@ joliet_compare_dirs(rr, ll)
- return (1);
- #endif
-
-+#ifdef USE_ICONV
-+
-+ ri = convert_to_unicode(rtmp, 2, rpnt, rinls);
-+ li = convert_to_unicode(ltmp, 2, lpnt, linls);
-+ rpnt += ri;
-+ lpnt += li;
-+ if(!ri && !li)
-+ return (0);
-+ else if(ri && !li)
-+ return (1);
-+ else if(!ri && li)
-+ return (-1);
-+#else
- convert_to_unicode(rtmp, 2, rpnt, rinls);
- convert_to_unicode(ltmp, 2, lpnt, linls);
-+#endif
-
- if (a_to_u_2_byte(rtmp) < a_to_u_2_byte(ltmp))
- return (-1);
- if (a_to_u_2_byte(rtmp) > a_to_u_2_byte(ltmp))
- return (1);
-
-+#ifndef USE_ICONV
- rpnt++;
- lpnt++;
-+#endif
- }
- if (*rpnt)
- return (1);
-diff -Naurp cdrtools-2.01.01.orig/mkisofs/Makefile cdrtools-2.01.01/mkisofs/Makefile
---- cdrtools-2.01.01.orig/mkisofs/Makefile 2006-10-08 13:51:43.000000000 +0200
-+++ cdrtools-2.01.01/mkisofs/Makefile 2006-10-28 16:59:33.000000000 +0200
-@@ -33,6 +33,7 @@ CPPOPTS += -DAPPLE_HYB
- CPPOPTS += -DUDF
- CPPOPTS += -DDVD_VIDEO
- CPPOPTS += -DSORTING
-+CPPOPTS += -DUSE_ICONV
- CPPOPTS += -I../libhfs_iso/
- CPPOPTS += -DUSE_SCG \
- '-DAPPID_DEFAULT="MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING"' \
-diff -Naurp cdrtools-2.01.01.orig/mkisofs/mkisofs.c cdrtools-2.01.01/mkisofs/mkisofs.c
---- cdrtools-2.01.01.orig/mkisofs/mkisofs.c 2006-10-08 19:55:12.000000000 +0200
-+++ cdrtools-2.01.01/mkisofs/mkisofs.c 2006-10-28 16:59:33.000000000 +0200
-@@ -64,6 +64,11 @@ static char sccsid[] =
- #endif
- #endif /* no_more_needed */
-
-+#ifdef USE_ICONV
-+#include <locale.h>
-+#include <langinfo.h>
-+#endif
-+
- struct directory *root = NULL;
- int path_ind;
-
-@@ -297,6 +302,10 @@ UInt32_t null_inodes = NULL_INO_MAX;
- BOOL correct_inodes = TRUE; /* TRUE: add a "correct inodes" fingerprint */
- BOOL rrip112 = TRUE; /* TRUE: create Rock Ridge V 1.12 */
-
-+#ifdef USE_ICONV
-+int iconv_possible;
-+#endif
-+
- struct unls_table *in_nls = NULL; /* input UNICODE conversion table */
- struct unls_table *out_nls = NULL; /* output UNICODE conversion table */
- #ifdef APPLE_HYB
-@@ -1969,6 +1978,37 @@ args_ok:
- init_unls_file(hfs_ocharset);
- #endif /* APPLE_HYB */
-
-+#ifdef USE_ICONV
-+ iconv_possible = !(iso9660_level >= 4 || ((ocharset &&
-+ strcmp(ocharset, icharset ? icharset : "")) &&
-+ use_RockRidge) || apple_ext || apple_hyb);
-+
-+ setlocale(LC_CTYPE, "");
-+
-+ if (icharset == NULL && iconv_possible) {
-+ char *charset = nl_langinfo(CODESET);
-+ /* set to detected value but only if it is not pure US-ASCII */
-+ if(strcmp(charset, "ANSI_X3.4-1968") != 0)
-+ icharset = charset;
-+
-+ if(icharset && verbose > 0)
-+ fprintf(stderr, "INFO:\t"
-+ "%s character encoding detected by locale settings."
-+ "\n\tAssuming %s encoded filenames on source "
-+ "filesystem,\n"
-+ "\tuse -input-charset to override.\n",
-+ icharset, icharset);
-+ }
-+
-+ if(iconv_possible) {
-+ /*
-+ * don't care if initialization fails
-+ */
-+ init_unls_iconv(icharset);
-+ init_unls_iconv(ocharset);
-+ }
-+#endif
-+
- if (icharset == NULL) {
- #if (defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__DJGPP__)) && !defined(IS_CYGWIN_1)
- in_nls = load_unls("cp437");
-@@ -1996,6 +2036,12 @@ args_ok:
- if (in_nls == NULL || out_nls == NULL) { /* Unknown charset specified */
- fprintf(stderr, "Unknown charset\nKnown charsets are:\n");
- list_unls(); /* List all known charset names */
-+#ifdef USE_ICONV
-+ if(!iconv_possible)
-+ fprintf(stderr, "Iconv charsets cannot be used with "
-+ "Apple extension, HFS, ISO9660 version 2 or\n"
-+ "Rock Ridge.\n");
-+#endif
- exit(1);
- }
-
-diff -Naurp cdrtools-2.01.01.orig/mkisofs/mkisofs.h cdrtools-2.01.01/mkisofs/mkisofs.h
---- cdrtools-2.01.01.orig/mkisofs/mkisofs.h 2006-10-08 19:55:12.000000000 +0200
-+++ cdrtools-2.01.01/mkisofs/mkisofs.h 2006-10-28 16:59:33.000000000 +0200
-@@ -513,9 +513,14 @@ extern int get_session_start __PR((int *
-
- /* joliet.c */
- #ifdef UDF
-+# ifdef USE_ICONV
-+extern size_t convert_to_unicode __PR((unsigned char *buffer,
-+ int size, char *source, struct unls_table *inls));
-+# else
- extern void convert_to_unicode __PR((unsigned char *buffer,
- int size, char *source, struct unls_table *inls));
--extern int joliet_strlen __PR((const char *string));
-+# endif
-+extern int joliet_strlen __PR((const char *string, struct unls_table *inls));
- #endif
- extern unsigned char conv_charset __PR((unsigned char, struct unls_table *,
- struct unls_table *));
-diff -Naurp cdrtools-2.01.01.orig/mkisofs/udf.c cdrtools-2.01.01/mkisofs/udf.c
---- cdrtools-2.01.01.orig/mkisofs/udf.c 2006-10-08 15:49:56.000000000 +0200
-+++ cdrtools-2.01.01/mkisofs/udf.c 2006-10-28 16:59:33.000000000 +0200
-@@ -439,7 +439,7 @@ set_ostaunicode(dst, dst_size, src)
- int i;
- int expanded_length;
-
-- expanded_length = joliet_strlen(src);
-+ expanded_length = joliet_strlen(src, in_nls);
- if (expanded_length > 1024)
- expanded_length = 1024;
- if (expanded_length > (dst_size-1)*2)