From b4bf65abfa8e2fdec3e7c1d7d130bf30e6f1d308 Mon Sep 17 00:00:00 2001 From: rumble Date: Sat, 16 Apr 2005 06:51:26 +0000 Subject: regionset-1.0 Read and modify DVD drive region code --- multimedia/regionset/DESCR | 3 ++ multimedia/regionset/Makefile | 18 ++++++++++++ multimedia/regionset/PLIST | 2 ++ multimedia/regionset/distinfo | 6 ++++ multimedia/regionset/patches/patch-aa | 12 ++++++++ multimedia/regionset/patches/patch-ab | 55 +++++++++++++++++++++++++++++++++++ 6 files changed, 96 insertions(+) create mode 100644 multimedia/regionset/DESCR create mode 100644 multimedia/regionset/Makefile create mode 100644 multimedia/regionset/PLIST create mode 100644 multimedia/regionset/distinfo create mode 100644 multimedia/regionset/patches/patch-aa create mode 100644 multimedia/regionset/patches/patch-ab (limited to 'multimedia') diff --git a/multimedia/regionset/DESCR b/multimedia/regionset/DESCR new file mode 100644 index 00000000000..7d0898c42dc --- /dev/null +++ b/multimedia/regionset/DESCR @@ -0,0 +1,3 @@ +regionset allows for DVD drives to have their firmware region +setting read and changed, provided the limited number of +permitted user changes has not been exhausted. diff --git a/multimedia/regionset/Makefile b/multimedia/regionset/Makefile new file mode 100644 index 00000000000..a8c0d4d33d4 --- /dev/null +++ b/multimedia/regionset/Makefile @@ -0,0 +1,18 @@ +# $NetBSD: Makefile,v 1.1.1.1 2005/04/16 06:51:26 rumble Exp $ +# + +DISTNAME= regionset-0.1 +CATEGORIES= multimedia +MASTER_SITES= http://linvdr.org/download/regionset/ + +MAINTAINER= rumble@NetBSD.org +HOMEPAGE= http://linvdr.org/download/regionset/ +COMMENT= Read and modify DVD drive region code + +USE_BUILDLINK3= yes +ONLY_FOR_PLATFORM+= NetBSD-*-* OpenBSD-*-* Linux-*-* + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/regionset ${PREFIX}/bin + +.include "../../mk/bsd.pkg.mk" diff --git a/multimedia/regionset/PLIST b/multimedia/regionset/PLIST new file mode 100644 index 00000000000..c3ec5a83efc --- /dev/null +++ b/multimedia/regionset/PLIST @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2005/04/16 06:51:26 rumble Exp $ +bin/regionset diff --git a/multimedia/regionset/distinfo b/multimedia/regionset/distinfo new file mode 100644 index 00000000000..f1383d981dc --- /dev/null +++ b/multimedia/regionset/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1.1.1 2005/04/16 06:51:26 rumble Exp $ + +SHA1 (regionset-0.1.tar.gz) = c60b973f44288264234d07be1fb418b6e7bf61a5 +Size (regionset-0.1.tar.gz) = 17095 bytes +SHA1 (patch-aa) = a7247e9be9570ceb0a0e6266c1850adf01e22445 +SHA1 (patch-ab) = ded09a0e2d5703635e5a2d4260abdedde16a9e60 diff --git a/multimedia/regionset/patches/patch-aa b/multimedia/regionset/patches/patch-aa new file mode 100644 index 00000000000..e8f58e54e7d --- /dev/null +++ b/multimedia/regionset/patches/patch-aa @@ -0,0 +1,12 @@ +$NetBSD: patch-aa,v 1.1.1.1 2005/04/16 06:51:26 rumble Exp $ +--- dvd_udf.c.old 2003-10-30 07:30:33.000000000 -0500 ++++ dvd_udf.c 2005-04-16 02:21:37.000000000 -0400 +@@ -37,7 +37,7 @@ + #include + #include + +-#if defined(__OpenBSD__) ++#if defined(__NetBSD__) || defined(__OpenBSD__) + # include + #elif defined(__linux__) + # include diff --git a/multimedia/regionset/patches/patch-ab b/multimedia/regionset/patches/patch-ab new file mode 100644 index 00000000000..cda1396315c --- /dev/null +++ b/multimedia/regionset/patches/patch-ab @@ -0,0 +1,55 @@ +--- regionset.c.old 2003-10-30 07:32:34.000000000 -0500 ++++ regionset.c 2005-04-16 02:42:40.000000000 -0400 +@@ -27,7 +27,11 @@ + #include + #include "dvd_udf.h" + ++#if defined(__NetBSD__) || defined(__OpenBSD__) ++#define DEFAULTDEVICE "/dev/cd0a" ++#elif /* linux */ + #define DEFAULTDEVICE "/dev/dvd" ++#endif + #define VERSION "0.1" + + int main (int argc, char* argv[]) +@@ -39,8 +43,9 @@ + if (argc>1) err=UDFOpenDisc(argv[1]); + else err=UDFOpenDisc(DEFAULTDEVICE); + if (err<0) { +- printf("ERROR: Could not open disc \"%s\"!\n",((argc>=1)?argv[1]:DEFAULTDEVICE)); ++ printf("ERROR: Could not open disc \"%s\"!\n",((argc>=2)?argv[1]:DEFAULTDEVICE)); + printf("Ensure that there is any readable CD or DVD in the drive.\n"); ++ printf("usage: regionset [dvd-device-node]\n"); + return 1; + } + if (UDFRPCGet(&type,&vra,&ucca,®ion_mask,&rpc_scheme)) { +@@ -60,6 +65,20 @@ + printf("Would you like to change the region setting of your drive? [y/n]:"); + fgets(ch,3,stdin); + if ((ch[0]=='y') || (ch[0]=='Y')) { ++ printf("Choices include (not complete list):\n"); ++ printf(" 0: Regionless DVDs only\n"); ++ printf(" 1: USA, Canada, US Territories\n"); ++ printf(" 2: W. Europe, Greenland, S. Africa, Lesotho, " ++ "Swaziland, Japan, Egypt, Mid-East\n"); ++ printf(" 3: Southeast Asia, South Korea, Hong Kong, Macau, " ++ "Taiwan\n"); ++ printf(" 4: Australia, New Zealand, Oceania, Mexico, Central " ++ "America\n"); ++ printf(" 5: Russia (& former Soviet Union), E. Europe, Indian " ++ "subcontinent, Mongolia\n N. Korea, rest of Africa\n"); ++ printf(" 6: People's Republic of China\n"); ++ printf(" 7: reserved\n"); ++ printf(" 8: International Venues\n"); + printf("Enter the new region number for your drive [1..8]:"); + fgets(ch,3,stdin); + if ((ch[0]<'0') || (ch[0]>'8')) { +@@ -72,7 +91,7 @@ + printf("Identical region code already set, aborting!\n"); + goto ERROR; + } +- printf("New mask: 0x%02X, correct? [y/n]:",i); ++ printf("New mask: 0x%02X, correct? [y/n]:",i & 0xff); + fgets(ch,3,stdin); + if ((ch[0]=='y') || (ch[0]=='Y')) { + if (UDFRPCSet(i)) { -- cgit v1.2.3