aboutsummaryrefslogtreecommitdiff
path: root/system/bin2iso
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-08-29 05:55:44 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-08-31 07:56:40 +0700
commit4fd07339b00e32881b51819118ca19da1e3f2a08 (patch)
tree4c84fa2cd8b814906f8253ad00343a09ffb715e4 /system/bin2iso
parent0b68b9a4cba8cace6cdfe11c0962bc7856511734 (diff)
system/bin2iso: Fix VERSION (not upgraded), new maintainer.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/bin2iso')
-rw-r--r--system/bin2iso/README9
-rw-r--r--system/bin2iso/bin2iso.SlackBuild92
-rw-r--r--system/bin2iso/bin2iso.info12
-rw-r--r--system/bin2iso/fixwarnings.diff27
-rw-r--r--system/bin2iso/readme.txt132
-rw-r--r--system/bin2iso/slack-desc10
6 files changed, 91 insertions, 191 deletions
diff --git a/system/bin2iso/README b/system/bin2iso/README
index d32d0e6ffd477..d1cc5b5005dad 100644
--- a/system/bin2iso/README
+++ b/system/bin2iso/README
@@ -1 +1,8 @@
-Converts RAW format (.bin) files to ISO/WAV format.
+bin2iso (BIN/CUE to ISO/WAV converter)
+
+bin2iso converts raw format (.bin/.cue) CD image files to ISO-9660 or
+.wav format. It's also (sometimes) capable of creating a .cue file for
+a .bin file whose .cue file has gone missong.
+
+There is no man page or --help option; run 'bin2iso' with no arguments
+for usage.
diff --git a/system/bin2iso/bin2iso.SlackBuild b/system/bin2iso/bin2iso.SlackBuild
index 3bb700fe98e5f..6401daf7f2b0b 100644
--- a/system/bin2iso/bin2iso.SlackBuild
+++ b/system/bin2iso/bin2iso.SlackBuild
@@ -2,34 +2,33 @@
# Slackware build script for bin2iso
-# Copyright 2016, 2019 Hunter Sezen California, USA
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Original written by Hunter Sezen.
+# Modified and now maintained by B. Watson <urchlay@slackware.uk>.
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20240829 bkw:
+# - new maintainer.
+# - fix VERSION: it was "19b", for version 1.9b.
+# - use a non-slackware.uk download URL, since it sucks to keep the
+# original and the backup (sbosrcarch) on the same server.
+# - use a tarball that includes upstream's readme.
+# - fix a couple of compiler warnings.
+# - use a homepage that actually works.
+# - mention CD images in README and slack-desc.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=bin2iso
-VERSION=${VERSION:-19b}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-1.9b}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
+# 20240829 bkw: no tags in the github repo, use the one and only
+# commit tarball.
+COMMIT=${COMMIT:-a08f6f93b833878dc009fe59da072643f06a7830}
+
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
@@ -38,9 +37,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -52,41 +48,43 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
fi
-set -eu
+set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-mkdir $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION
-
-${CC:-cc} \
- $(printf %s "$SLKCFLAGS") -Wall -o $PRGNAM \
- $CWD/$PRGNAM${VERSION}_linux.c
-
-mkdir -p -- "$PKG/usr/bin"
-cp -- $PRGNAM "$PKG/usr/bin/"
-chmod 0755 -- "$PKG/usr/bin/$PRGNAM"
-
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" |
- grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp $CWD/readme.txt $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+rm -rf $PRGNAM-$COMMIT
+tar xvf $CWD/$PRGNAM-$COMMIT.tar.gz --wildcards '*/*.txt' '*/src/linux_macos/*.c'
+cd $PRGNAM-$COMMIT
+chown -R root:root .
+find . -type f -exec chmod 644 {} + -o -type d -exec chmod 755 {} +
+
+# 20240829 bkw: Fix a couple of warnings, the ones we get *without* -Wall.
+# One of these constitutes an actual bug, but it only affects files that
+# aren't an even number of CD sectors (premature EOF; the last sector was
+# supposed to be zero-filled, but it used == instead of = for assignment).
+# Not gonna worry about the -Wall ones for now.
+patch -p1 < $CWD/fixwarnings.diff
+
+# 20240829 bkw: WALL=yes for my own use.
+[ "${WALL:-no}" = "yes" ] && SLKCFLAGS+=" -Wall"
+
+# 20240829 bkw: -Wl,-s builds stripped binaries.
+mkdir -p $PKG/usr/bin
+${CC:-cc} $SLKCFLAGS -Wl,-s -o $PKG/usr/bin/$PRGNAM src/linux_macos/*.c
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a README.txt $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/system/bin2iso/bin2iso.info b/system/bin2iso/bin2iso.info
index a6adee948f843..84669de9da08a 100644
--- a/system/bin2iso/bin2iso.info
+++ b/system/bin2iso/bin2iso.info
@@ -1,10 +1,10 @@
PRGNAM="bin2iso"
-VERSION="19b"
-HOMEPAGE="http://users.eastlink.ca/~doiron/bin2iso/"
-DOWNLOAD="http://slackware.uk/sbosrcarch/by-name/system/bin2iso/bin2iso19b_linux.c"
-MD5SUM="01dab72496175a772bcf6e08c854d440"
+VERSION="1.9b"
+HOMEPAGE="https://github.com/einsteinx2/bin2iso/"
+DOWNLOAD="https://github.com/einsteinx2/bin2iso/archive/a08f6f93b833878dc009fe59da072643f06a7830/bin2iso-a08f6f93b833878dc009fe59da072643f06a7830.tar.gz"
+MD5SUM="b0add21add73472a83eb60d8ce5c160e"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Hunter Sezen"
-EMAIL="orbea@riseup.net"
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/system/bin2iso/fixwarnings.diff b/system/bin2iso/fixwarnings.diff
new file mode 100644
index 0000000000000..22b45ad2de966
--- /dev/null
+++ b/system/bin2iso/fixwarnings.diff
@@ -0,0 +1,27 @@
+diff --git a/src/linux_macos/bin2iso_v1.9b_linux.c b/src/linux_macos/bin2iso_v1.9b_linux.c
+index aff7a72..a3044ad 100644
+--- a/src/linux_macos/bin2iso_v1.9b_linux.c
++++ b/src/linux_macos/bin2iso_v1.9b_linux.c
+@@ -1,3 +1,4 @@
++#include <unistd.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
+@@ -111,7 +112,7 @@ typedef struct track
+ unsigned long size; /* track size in bytes */
+ } tTrack;
+
+-buffered_fread(unsigned char *array, unsigned int size) {
++int buffered_fread(unsigned char *array, unsigned int size) {
+ unsigned int i;
+
+ if(INBUF_WIDX == 0) {
+@@ -125,7 +126,7 @@ buffered_fread(unsigned char *array, unsigned int size) {
+ array[i] = INBUF[INBUF_RIDX++];
+ if((INBUF_RIDX == INBUF_WIDX) && (i < (size -1))) {
+ printf(" Warning: Premature EOF\n");
+- while(i++ < size) { array[i] == 0; }/* zero fill the rest */
++ while(i++ < size) { array[i] = 0; }/* zero fill the rest */
+ break;
+ }
+ }
diff --git a/system/bin2iso/readme.txt b/system/bin2iso/readme.txt
deleted file mode 100644
index 62309bfbda0bc..0000000000000
--- a/system/bin2iso/readme.txt
+++ /dev/null
@@ -1,132 +0,0 @@
-Jul 25 1999, 09:29:46
-bin2iso V1.9b - Converts RAW format (.bin) files to ISO/WAV format
- Bob Doiron, ICQ#280251
-
-Linux port by Owen: mxu@cae.wisc.edu
-
-Check for updates at http://users.andara.com/~doiron
-
-Usage: bin2iso <cuefile> [<output dir>] [-[a]wg] [-t XX] [-i] [-nob]
-or : bin2iso <cuefile> -c <binfile>
-
-Where:
- <cuefile> - the .cue file that belongs to the .bin file to
- be converted
- <output dir> - the output directory (defaults to current dir)
- -nwg - indicates that audio data found in the track
- 'gaps' shouldn't be appended to the audio tracks
- -awg - looks for non-zero data in the 'gaps', if found
- then gaps are appended to audio tracks. Looks
- for more than 1/2 of a sector of non-zero values
- (588 values),
- -t XX - Extracts the XX'th track.
- -i - Performs the conversion 'in place'. Meaning it
- truncates the binfile after each track is
- created to minimize diskspace requirements.
- [not valid with -t]
- -nob - Doesn't use overburn data past 334873 sectors.
- This of course presumes that the data is not
- useful.
- -c - Attempts to create a <cuefile> from an existing
- <binfile>
-
-
----------------------------------------------------------------------
-NOTE: This is a work in progress!
-
-So far I beleive it handles MODE1, MODE2 and AUDIO tracks.
-
-Since I have little exposure to .bin files, and little expertise in
-CD formats, I can't guarantee this will work for all .bin's.
-
-so... TEST the output before burning. Use Winimage on the ISO files
-and a wave player on the WAVs.
-
-If you do run into trouble, send me the following info:
-- .cue file
-- command line used
-- the screen output
-- directory listing of source and files created (with sizes)
-and I'll fix it up.
-
-Revision History
-
-v1.9b
- - Oops.. was no way to turn writegap off:
- changed -wg option to -nwg
-
-v1.9a
- - Fixed bug in extracting single track
- - changed code to default to writing gap data because of the way
- easycd pro writes the table of contents for the cd
-
-v1.9
- - revamped internally allowing me to do add some functionality...
- Added a -i option to allow converting a bin using a little diskspace
- as possible. !NOTE! This is destructive to the original .bin
- - No longer barfs on PREGAP lines...
- - Added a -awg option that checks for non-zero data in the gaps between
- audio tracks and turns on the -wg feature if it finds more than half
- a sector of non-zero values.
- - Added a -nob option that ditches overburn data. I haven't tested this,
- but rumour has it that some cd players can't access data over 74.XX
- minutes. I'm not sure if I beleive this, but I put the option in in
- case I get a chance to try it. (so far untested!)
-
-v1.8b
- - modified the audio gap detection scheme for creating cue files...
- Now it may detect extra gaps, but they are easily removed by editing
- the cuefile. Before it would sometimes not detect gaps, so I think
- this is better.
-
-v1.8
- - Added the ability to create a cuefile from a binfile.
- (assumes MODE1/2352, MODE2/2352 or AUDIO tracks)
- - Added ISO track numbering for cd's with more than one data track
-
-v1.7
- - Made the reads/writes happen in 4Meg chunks... should speed things up
- when read from and writing to the same disk. (less head thrashing)
- - Added Mode2/2336: When this type of track is encountered, it converts
- it to the trusty Mode2/2352 track we're used to. (Burn with EasyCD
- or open with WinImage)
- Or, if you like, you can rename the output from a .iso to a .bin and then
- edit the cue file track type from MODE2/2336 to MODE2/2352 to burn with
- cdrwin.
-
-v1.6
- - Added a '-wg' command switch to make bin2iso append pregap sectors to the
- last wav file. Useful because some cd's have music in the pregaps.
- Note: most TAO burning leaves 2 second gaps between songs, so if you copy
- a copy, then don't use the -wg option. If you do use it, then the
- audio track will grow by 2 seconds.
-
-v1.5
- - Fixed parsing of the filename from the cue file. (handles spaces etc)
- - Added progress display
- - Detects a single track, mode2 bin which can be burnt as is.
- - Verifies data tracks (checks the mode and frame sequence)
-
-v1.4
- - fixed bug that occured when tracks had no pregap index
- - parsing of .bin filename out of .cue file now ditches path info
- - fixed bugs in [<output dir>] parsing. (trailing '\' or ':')
-
-v1.3
- - first release to public
-
-Suggested programs:
-WinImage - for viewing ISO images
-EasyCD Pro 2.11 (020) - for burning ISO or Mixed mode ISO/WAV
- (rumour is that creator doesn't always burn the
- images as is, sometimes screws long filenames
- or burns a mode2 iso in mode1 form, etc, etc)
-Nero - Burning Rom - For burning AUDIO disks because it allows changing
- the gap size on my sony928e.
-
-!DO NOT USE! Easy CD Creator for burning mode2/2352 images. You'll get a coaster.
-
-
-TROUBLESHOOTING
-
-Don't know of any problems right now. Let me know.
diff --git a/system/bin2iso/slack-desc b/system/bin2iso/slack-desc
index cc64e5ed058de..42c1fcee236b7 100644
--- a/system/bin2iso/slack-desc
+++ b/system/bin2iso/slack-desc
@@ -6,13 +6,13 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-bin2iso: bin2iso (RAW to ISO/WAV converter)
-bin2iso:
-bin2iso: Converts RAW format (.bin) files to ISO/WAV format.
-bin2iso:
-bin2iso: Homepage: http://users.eastlink.ca/~doiron/bin2iso/
+bin2iso: bin2iso (BIN/CUE to ISO/WAV converter)
bin2iso:
+bin2iso: bin2iso converts raw format (.bin/.cue) CD image files to ISO-9660 or
+bin2iso: .wav format. It's also (sometimes) capable of creating a .cue file for
+bin2iso: a .bin file whose .cue file has gone missong.
bin2iso:
+bin2iso: Homepage: https://github.com/einsteinx2/bin2iso/
bin2iso:
bin2iso:
bin2iso: