Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions pkgs/by-name/vo/vobcopy/fix-darwin.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/vobcopy.h b/vobcopy.h
index dcf4266..d34c2b4 100644
--- a/vobcopy.h
+++ b/vobcopy.h
@@ -115,6 +115,7 @@ typedef enum { FALSE=0, TRUE=1 } bool;

#ifdef HAVE_SYS_STATVFS_H
#include <sys/statvfs.h>
+#ifndef __APPLE__
#ifndef USE_STATFS
#define USE_STATVFS
#ifndef USE_STATFS_FOR_DEV
@@ -122,6 +123,7 @@ typedef enum { FALSE=0, TRUE=1 } bool;
#endif
#endif
#endif
+#endif

#ifdef HAVE_MNTENT_H
#include <mntent.h>
@@ -164,6 +166,6 @@ char *safestrncpy(char *dest, const char *src, size_t n);
int check_progress( void ); /* this can be removed because the one below supersedes it */
int progressUpdate( int starttime, int cur, int tot, int force );

-#ifndef HAVE_FDATASYNC
+#if !defined(HAVE_FDATASYNC) || defined(__APPLE__)
#define fdatasync(fd) 0
#endif
31 changes: 20 additions & 11 deletions pkgs/by-name/vo/vobcopy/package.nix
Original file line number Diff line number Diff line change
@@ -1,32 +1,41 @@
{
lib,
stdenv,
fetchurl,
fetchFromGitHub,
autoreconfHook,
gettext,
libdvdread,
libdvdcss,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation {
pname = "vobcopy";
version = "1.2.0";
version = "1.2.1-unstable-2023-08-29";

src = fetchurl {
url = "http://www.vobcopy.org/download/vobcopy-${version}.tar.bz2";
sha256 = "01l1yihbd73srzghzzx5dgfg3yfb5kml5dix52mq0snhjp8h89c9";
src = fetchFromGitHub {
owner = "barak";
repo = "vobcopy";
rev = "cb560b3a67358f51d51ecc0e511f49f09f304a13";
hash = "sha256-2EtSO39yOFoCZ5GMqtp+SvmzqSevlqYDo73p0lVHZ3o=";
};

# Based on https://github.com/barak/vobcopy/issues/14, but also fixes
# "error: call to undeclared function 'fdatasync'". The latter patch
# is inspired by https://github.com/php/php-src/commit/e69729f2ba02ddc26c70b4bd88ef86c0a2277bdc
patches = [ ./fix-darwin.patch ];

nativeBuildInputs = [
autoreconfHook
];
buildInputs = [
gettext # Fails on Darwin otherwise
libdvdread
libdvdcss
];
makeFlags = [
"DESTDIR=$(out)"
"PREFIX=/"
];

meta = {
description = "Copies DVD .vob files to harddisk, decrypting them on the way";
homepage = "http://vobcopy.org/projects/c/c.shtml";
homepage = "https://github.com/barak/vobcopy";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.all;
mainProgram = "vobcopy";
Expand Down
Loading