Created
August 30, 2013 18:24
-
-
Save bkcsoft/6392871 to your computer and use it in GitHub Desktop.
vobcopy PKGBUILD for ArchBSD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- dvd.c.orig 2008-02-19 00:27:04.000000000 -0500 | |
+++ dvd.c 2008-08-08 19:02:43.000000000 -0400 | |
@@ -510,7 +510,15 @@ | |
*/ | |
- k = strstr( tmp_bufferin, " " ); | |
+ k = strpbrk( tmp_bufferin, " \t" ); | |
+ | |
+ /* Avoid a core dump by checking that the break token | |
+ was found */ | |
+ if ( k == NULL ) | |
+ { | |
+ fprintf(stderr, "[Error] Unable to parse the /etc/fstab file\n"); | |
+ return -1; | |
+ } | |
/*traverse the gap*/ | |
@@ -646,21 +654,6 @@ | |
return ( off_t ) vob_size; | |
} | |
- sprintf( stat_path, "%s_1.vob", path_to_vobs3 ); | |
- if( ( tmp_streamin1 = fopen( stat_path, "r" ) ) != NULL ) /*check if this path is correct */ | |
- { | |
- fclose ( tmp_streamin1 ); | |
- subvob = 1; | |
- while( !stat( stat_path, &buf ) ) | |
- { | |
- /* adjust path for next subvob */ | |
- subvob++; | |
- sprintf( stat_path, "%s_%d.vob", path_to_vobs3, subvob ); | |
- vob_size += buf.st_size; | |
- } | |
- return ( off_t ) vob_size; | |
- } | |
- | |
/*none of the above seemed to have caught it, so this is the error return */ | |
return ( off_t ) 0; /* think that (off_t) is not really needed here? | |
as it is defined as off_t and the function is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- vobcopy.c.orig Sun Jun 24 08:26:07 2007 | |
+++ vobcopy.c Wed Oct 10 20:56:58 2007 | |
@@ -149,6 +149,8 @@ | |
#endif | |
+ /* initialize string */ | |
+ dvd_path[0] = '\0'; | |
/* | |
* the getopt part (getting the options from command line) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- vobcopy.h.old 2009-06-12 10:46:16.000000000 +0000 | |
+++ vobcopy.h 2009-06-12 10:47:20.000000000 +0000 | |
@@ -69,7 +69,7 @@ | |
/* ////////// *BSD ////////// */ | |
#if ( defined( BSD ) && ( BSD >= 199306 ) ) | |
-#if !defined( __NetBSD__ ) || \ | |
+#if ! ( defined( __NetBSD__ ) ) || \ | |
( defined( __NetBSD__) && ( __NetBSD_Version__ < 200040000 ) ) | |
#include <sys/mount.h> | |
#define USE_STATFS 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $Id$ | |
# Maintainer: Daenyth | |
# Contributor: Giovanni Scafora <giovanni@archlinux.org> | |
# Contributor: Tino Reichardt <milky-archlinux@mcmilk.de> | |
pkgname=vobcopy | |
pkgver=1.2.0 | |
pkgrel=4 | |
pkgdesc="Copies DVD .vob files to harddisk, decrypting them on the way" | |
arch=('i686' 'x86_64') | |
url="http://www.vobcopy.org" | |
license=('GPL2') | |
depends=('libdvdread' 'libdvdcss') | |
options=('!docs') | |
_port_patches=( | |
'patch-dvd.c' | |
'patch-vobcopy.c' | |
'patch-vobcopy.h' | |
) | |
source=(http://www.vobcopy.org/download/${pkgname}-${pkgver}.tar.bz2 | |
${_port_patches[@]}) | |
md5sums=('88f735ccd051093ff40dab4597bc586e') | |
prepare() { | |
cd "${srcdir}/${pkgname}-${pkgver}" | |
for _p in ${_port_patches[@]}; do | |
patch < ../${_p} | |
done | |
sed -i '' -E -e 's|(fopen\( *"/etc/)mtab|\1fstab|; s|iso9660|cd9660|' dvd.c | |
sed -i '' -E -e 's|declare -i i=0||' configure.sh | |
# -CURRENT after 500041 has getopt_long | |
# do not use libgnugetopt | |
sed -i '' -E -e 's|-lgnugetopt||' configure.sh | |
# fix typo | |
sed -i '' -E -e 's|FreeBSD_Version|FreeBSD_version|' dvd.c | |
# no such flag under FreeBSD | |
# fdatasync(2) -> fsync(2) | |
sed -i '' -E -e 's|O_LARGEFILE|0|' -e 's|fdatasync|fsync|g' vobcopy.c | |
} | |
build() { | |
cd "${srcdir}/${pkgname}-${pkgver}" | |
chmod a+x ./configure.sh | |
./configure.sh --with-lfs --with-dvdread-libs=/usr | |
gmake | |
} | |
package() { | |
cd "${srcdir}/${pkgname}-${pkgver}" | |
gmake DESTDIR="$pkgdir" PREFIX=/usr/ MANDIR=/usr/share/man install | |
} | |
md5sums=('88f735ccd051093ff40dab4597bc586e' | |
'70a974bf2ad3d04a20745ef7df3c20cf' | |
'17b5f6cecb41235f3902ecb470fee11a' | |
'61cc90cc142c5ca060af8f6972207118') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment