app-cdr/b5i2iso: segfault patch, HOMEPAGE, Gentoo Prefix
authorYegor Timoshenko <yegortimoshenko@gmail.com>
Thu, 18 May 2017 01:02:38 +0000 (04:02 +0300)
committerMichał Górny <mgorny@gentoo.org>
Thu, 18 May 2017 19:11:02 +0000 (21:11 +0200)
Closes: https://github.com/gentoo/gentoo/pull/4664

app-cdr/b5i2iso/b5i2iso-0.2-r1.ebuild [new file with mode: 0644]
app-cdr/b5i2iso/files/b5i2iso-0.2-segfault.patch [new file with mode: 0644]
app-cdr/b5i2iso/metadata.xml

diff --git a/app-cdr/b5i2iso/b5i2iso-0.2-r1.ebuild b/app-cdr/b5i2iso/b5i2iso-0.2-r1.ebuild
new file mode 100644 (file)
index 0000000..4fa5202
--- /dev/null
@@ -0,0 +1,24 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+inherit toolchain-funcs
+
+DESCRIPTION="Convert CD images from b5i (BlindWrite) to iso"
+HOMEPAGE="https://web.archive.org/web/20100116120705/b5i2iso.berlios.de"
+SRC_URI="mirror://gentoo/${PN}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x64-macos"
+PATCHES=( "${FILESDIR}/${P}-segfault.patch" )
+
+S=${WORKDIR}/${PN}
+
+src_compile() {
+       $(tc-getCC) ${LDFLAGS} ${CFLAGS} src/${PN}.c -o ${PN}
+}
+
+src_install() {
+       dobin ${PN}
+}
diff --git a/app-cdr/b5i2iso/files/b5i2iso-0.2-segfault.patch b/app-cdr/b5i2iso/files/b5i2iso-0.2-segfault.patch
new file mode 100644 (file)
index 0000000..6fda80e
--- /dev/null
@@ -0,0 +1,18 @@
+--- b5i2iso/src/b5i2iso.c
++++ b5i2iso/src/b5i2iso.c
+@@ -1,3 +1,4 @@
++#include <errno.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -45,6 +46,10 @@
+    }
+ 
+ fsource = fopen(argv[1],"rb");
++if (fsource == NULL) {
++  printf("can't open %s: %s\n", argv[1], strerror(errno));
++  exit(EXIT_FAILURE);
++}
+ fdest = fopen(destfilename,"wb");
+ 
+ fseek(fsource, 2352, SEEK_CUR);
\ No newline at end of file
index 6f49eba8f49693023f393161560b3a2d9e2717c5..b59c10b746f47a72cc74a70c154ec4fd797fda95 100644 (file)
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-<!-- maintainer-needed -->
+<maintainer type="person">
+    <email>yegortimoshenko@gmail.com</email>
+    <name>Yegor Timoshenko</name>
+</maintainer>  
 </pkgmetadata>