summaryrefslogtreecommitdiff
path: root/dev-python/pydvdread
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/pydvdread
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/pydvdread')
-rw-r--r--dev-python/pydvdread/Manifest7
-rw-r--r--dev-python/pydvdread/files/pydvdread-1.0-api-update.patch287
-rw-r--r--dev-python/pydvdread/files/pydvdread-1.0-py3k.patch19
-rw-r--r--dev-python/pydvdread/metadata.xml11
-rw-r--r--dev-python/pydvdread/pydvdread-1.0-r1.ebuild28
5 files changed, 352 insertions, 0 deletions
diff --git a/dev-python/pydvdread/Manifest b/dev-python/pydvdread/Manifest
new file mode 100644
index 000000000000..6d1e7558fc83
--- /dev/null
+++ b/dev-python/pydvdread/Manifest
@@ -0,0 +1,7 @@
+AUX pydvdread-1.0-api-update.patch 9032 SHA256 c64f8c1bd346c9bece1bee0958f0d54f90799a78678e4191de0e5d7f56a65f2c SHA512 52456ce0a3b7503de4f70d0fd6b8f03cc1cc91db348dbeb41d62c246773e280869149bed30e763ecb0a4ac57413369a1a269669977a5e8465ba56be5b0536be2 WHIRLPOOL 02b233e6fd5545c34a480ff7b0092f355e49831dd73271be8a36c8155ad6d8d5ce92281906838214abcf006adf2ff02681e6aba69735261da416e9660245da02
+AUX pydvdread-1.0-py3k.patch 790 SHA256 a277e81d5ed0c7ff633daee5de4c0bba6aaf7599a5374e6c38228cc9491e0fb0 SHA512 82f8721dc618d79a0684353011a714144143d836fe742878003cfcc122fe171f1c3e11d340bbf3e9a778160a351df50ffb68b0cc858244babcf81e8595690236 WHIRLPOOL 94791a0269391940748dac2ffa7781c0736978193cb89987c137909cf4b50e45e03867afd73df8d043636e8356e24c486ad47286b8ab5cf6ff62c7ca453dd2dc
+DIST pydvdread-1.0.tar.bz2 62072 SHA256 aae9a0ad1ab4d218a52cc7cffcbbeb9c3e59f4f4286acc36d02d46f3e0b31cb2 SHA512 1d403e1b9538113bb5ab1a808147691b806ee57db3fa30f704a0fcb1dbb8e9155e470dc2fbb895788af59c2952d637a2853d613f0619deb5daf07d2e7b675eee WHIRLPOOL 5c65a36b90f68b2e72f3900954a90b99fc51ea3e70f70e06ecba9a2ee172f51f3972f4c96b240954360e85b5a8d338f1039c7e3ed279d4f20b8edc5ecff4ba3e
+EBUILD pydvdread-1.0-r1.ebuild 832 SHA256 d63dce1d59cd43d088369b4ce8c76d5e25e90b4c7b5452df5451ca582b04d4a7 SHA512 16bf146e28b91b95f5d48d0fe4f20208ce711e0bbb86d16b211f8ad809da66ff00ac1a679b3f1c75f631d8bd30018f31d58cbeb9152227446705a28d1e04ffb6 WHIRLPOOL 33e4227040bb3c2a2b20876c7bc6c47af3e94119fa3bbb892644c3e270fe0bd3202badeb06f6191dedac8ef9d2902e2e79d13e23b01325a5e1ea9e506c5fb987
+MISC ChangeLog 2511 SHA256 1eec4ff9d840a4fdcdb1681dff1dcd77d3719a99e17effa88257adc15d711b12 SHA512 7e480d34d0ea1dc4634ca248e82d8945c21b94ed84a2d4c79e8dae025199782428d19c63e29285385f5c0c78afcdac7bd4c546d5484e8500624d9d19681b08f3 WHIRLPOOL abe0277cb8c10b47a7c9f039c74406afb3788aede92e40aebff698eaaaedde5f48a616c1956767c42c069c142edf5911bb1f1818bac2f7dab2cff4026a1286f1
+MISC ChangeLog-2015 955 SHA256 bd452a093c145f3df49a4135a6946f6b3a662331a4eaeeb4236788299c791e01 SHA512 656853233d12dfd2fe496bb1e45641adb84d20077db382091a55db7069a831b57fdf0e8dc9cb9e7ee31c926d6e4cd550b5862ebf1c791fc7d4557c54a21b36aa WHIRLPOOL a43ee7af147a96e51cc78f1594af752bcfddbe13b3149ea61160ace0581729e5b8e112ced8a89860a31cdaa053abcda07a41d9de89e951a4212d06ffaeffdb0c
+MISC metadata.xml 319 SHA256 de727cffef86947388e44b4be2ec6fa6668e91c9fbc236436c49655ef72dcf3c SHA512 73a20bef88f68ec88c854ce4d4418742563267d7a8007aa5c32a421fcac1259cb22a3ede01d2f5e49265902b4957bcf8a1e81512ed4715c49d461044f886d1f8 WHIRLPOOL 4e567480f758ee5e2f0ee22001ee1fc91ecb56407c14a3ab560cb9e0c3fb0976127c57684ec68b5eb786c7b6156562dbc33e8d523b838171d9577ae99b374e30
diff --git a/dev-python/pydvdread/files/pydvdread-1.0-api-update.patch b/dev-python/pydvdread/files/pydvdread-1.0-api-update.patch
new file mode 100644
index 000000000000..71c08158e660
--- /dev/null
+++ b/dev-python/pydvdread/files/pydvdread-1.0-api-update.patch
@@ -0,0 +1,287 @@
+update the module to libdvdread-4.2.0 (at least so tests pass)
+
+--- a/src/dvdread/__init__.py
++++ b/src/dvdread/__init__.py
+@@ -1,6 +1,6 @@
+ """Main package of pydvdread."""
+
+-__all__ = ['cmd_print',
++__all__ = [
+ 'dvd_reader',
+ 'ifo_print',
+ 'ifo_read',
+--- a/src/dvdread/all.i
++++ b/src/dvdread/all.i
+@@ -403,7 +403,6 @@
+ %{
+ #include <stdint.h>
+ %}
+-%include "cmd_print.i"
+ %include "dvd_reader.i"
+ %include "ifo_print.i"
+ %include "ifo_read.i"
+--- a/src/dvdread/ifo_types.i
++++ b/src/dvdread/ifo_types.i
+@@ -374,7 +374,7 @@ typedef struct {
+ uint16_t nr_of_pre;
+ uint16_t nr_of_post;
+ uint16_t nr_of_cell;
+- uint16_t last_byte;
++ uint16_t zero_1;
+ vm_cmd_t *pre_cmds;
+ vm_cmd_t *post_cmds;
+ vm_cmd_t *cell_cmds;
+--- a/src/dvdread/ifo_print.i
++++ b/src/dvdread/ifo_print.i
+@@ -31,6 +31,7 @@ file to stdout."
+
+ %{
+ #include <dvdread/ifo_print.h>
++#include <dvdread/ifo_read.h>
+ %}
+
+ /**
+@@ -40,21 +41,6 @@ file to stdout."
+ %feature("autodoc", "0");
+
+ /* ifoPrint(dvd, title); */
+-void ifoPrint(dvd_reader_t *dvd, int title);
++void ifo_print(dvd_reader_t *dvd, int title);
+
+ %feature("autodoc", "1");
+-
+-void ifoPrint_VMGI_MAT(vmgi_mat_t *obj);
+-void ifoPrint_VTSI_MAT(vtsi_mat_t *obj);
+-
+-void ifoPrint_PTL_MAIT(ptl_mait_t *obj);
+-void ifoPrint_VTS_ATRT(vts_atrt_t *obj);
+-void ifoPrint_TT_SRPT(tt_srpt_t *obj);
+-void ifoPrint_VTS_PTT_SRPT(vts_ptt_srpt_t *obj);
+-void ifoPrint_PGC(pgc_t *obj);
+-void ifoPrint_PGCIT(pgcit_t *obj);
+-void ifoPrint_PGCI_UT(pgci_ut_t *obj);
+-void ifoPrint_VTS_TMAPT(vts_tmapt_t *obj);
+-void ifoPrint_C_ADT(c_adt_t *obj);
+-void ifoPrint_VOBU_ADMAP(vobu_admap_t *obj);
+-
+--- a/src/dvdread/ifo_print.py
++++ b/src/dvdread/ifo_print.py
+@@ -16,11 +16,4 @@
+ ## along with this program; if not, write to the Free Software
+ ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+-from all import ifoPrint
+-from all import ifoPrint_VMGI_MAT, ifoPrint_VTSI_MAT
+-from all import ifoPrint_PTL_MAIT, ifoPrint_VTS_ATRT
+-from all import ifoPrint_TT_SRPT, ifoPrint_VTS_PTT_SRPT
+-from all import ifoPrint_PGC, ifoPrint_PGCIT
+-from all import ifoPrint_PGCI_UT, ifoPrint_VTS_TMAPT
+-from all import ifoPrint_C_ADT, ifoPrint_VOBU_ADMAP
+-
++from all import ifo_print
+--- a/src/dvdread/dvd_reader.i
++++ b/src/dvdread/dvd_reader.i
+@@ -59,14 +59,6 @@ reading files located on a DVD."
+
+
+ /**
+- * DVDVersion
+- */
+-%feature("autodoc", "DVDVersion() -> int\n\n\
+-Returns the version of libdvdread.") DVDVersion;
+-int DVDVersion(void);
+-
+-
+-/**
+ * DVDOpen
+ */
+ %feature("autodoc", "DVDOpen(path) -> dvd\n\n\
+@@ -106,25 +98,6 @@ void DVDClose( dvd_reader_t * );
+
+
+ /**
+- * DVDInit
+- */
+-%feature("autodoc", "DVDInit()\n\n\
+-Initializes support for multiple threads.\n\n\
+-NOTE: You must call DVDInit before using any of the other functions\n\
+-if you are going to use them in a multithreading app.") DVDInit;
+-void DVDInit(void);
+-
+-
+-/**
+- * DVDFinish
+- */
+-%feature("autodoc", "DVDFinish()\n\n\
+-Frees any dlopened objects.\n\n\
+-NOTE: You must DVDClose all handles opened with DVDOpen before calling this.") DVDFinish;
+-void DVDFinish(void);
+-
+-
+-/**
+ * File Domains
+ */
+ typedef enum {
+--- a/src/dvdread/dvd_reader.py
++++ b/src/dvdread/dvd_reader.py
+@@ -22,9 +22,7 @@ from all import DVD_READ_MENU_VOBS, DVD_READ_TITLE_VOBS
+
+ from all import dvd_stat_t
+
+-from all import DVDVersion, DVDOpen
+-from all import DVDClose, DVDInit
+-from all import DVDFinish, DVDFileStat
++from all import DVDOpen, DVDClose, DVDFileStat
+ from all import DVDOpenFile, DVDCloseFile
+ from all import DVDReadBlocks, DVDFileSeek
+ from all import DVDReadBytes, DVDFileSize
+--- a/tests/TestAll.py
++++ b/tests/TestAll.py
+@@ -33,7 +33,6 @@ devpath()
+
+ import unittest
+
+-import Test_cmd_print
+ import Test_dvd_reader
+ import Test_ifo_print
+ import Test_ifo_read
+@@ -49,7 +48,6 @@ import TestStruct_nav_types
+ # Run all tests
+ if __name__ == '__main__':
+ if len(sys.argv) > 1:
+- Test_cmd_print.DVDPATH = sys.argv[1]
+ Test_dvd_reader.DVDPATH = sys.argv[1]
+ Test_ifo_print.DVDPATH = sys.argv[1]
+ Test_ifo_read.DVDPATH = sys.argv[1]
+@@ -57,8 +55,7 @@ if __name__ == '__main__':
+ Test_nav_print.DVDPATH = sys.argv[1]
+ Test_nav_read.DVDPATH = sys.argv[1]
+ Test_nav_types.DVDPATH = sys.argv[1]
+- suite = unittest.TestLoader().loadTestsFromModule(Test_cmd_print)
+- suite.addTest(unittest.TestLoader().loadTestsFromModule(Test_dvd_reader))
++ suite = unittest.TestLoader().loadTestsFromModule(Test_dvd_reader)
+ suite.addTest(unittest.TestLoader().loadTestsFromModule(Test_ifo_print))
+ suite.addTest(unittest.TestLoader().loadTestsFromModule(Test_ifo_read))
+ suite.addTest(unittest.TestLoader().loadTestsFromModule(Test_ifo_types))
+--- a/tests/Test_dvd_reader.py
++++ b/tests/Test_dvd_reader.py
+@@ -49,9 +49,6 @@ class Test1(unittest.TestCase):
+ self.assert_(isinstance(dvd_reader.DVD_READ_MENU_VOBS, int))
+ self.assert_(isinstance(dvd_reader.DVD_READ_TITLE_VOBS, int))
+
+- def test_DVDVersion(self):
+- self.assert_(isinstance(dvd_reader.DVDVersion(), int))
+-
+ class Test2(unittest.TestCase):
+
+ def tearDown(self):
+@@ -70,22 +67,6 @@ class Test3(unittest.TestCase):
+ def test_DVDClose(self):
+ dvd_reader.DVDClose(self.dvd)
+
+-class Test4(unittest.TestCase):
+-
+- def tearDown(self):
+- dvd_reader.DVDFinish()
+-
+- def test_DVDInit(self):
+- dvd_reader.DVDInit()
+-
+-class Test5(unittest.TestCase):
+-
+- def setUp(self):
+- dvd_reader.DVDInit()
+-
+- def test_DVDFinish(self):
+- dvd_reader.DVDFinish()
+-
+ class Test6(unittest.TestCase):
+
+ def setUp(self):
+--- a/tests/Test_ifo_print.py
++++ b/tests/Test_ifo_print.py
+@@ -50,45 +50,8 @@ class Test1(unittest.TestCase):
+ ifo_read.ifoClose(self.ifo)
+ dvd_reader.DVDClose(self.dvd)
+
+- def test_ifoPrint(self):
+- ifo_print.ifoPrint(self.dvd, 1)
+-
+- def test_ifoPrint_VMGI_MAT(self):
+- ifo_print.ifoPrint_VMGI_MAT(self.ifo0.vmgi_mat)
+-
+- def test_ifoPrint_VTSI_MAT(self):
+- ifo_print.ifoPrint_VTSI_MAT(self.ifo.vtsi_mat)
+-
+- def test_ifoPrint_PTL_MAIT(self):
+- if self.ifo0.ptl_mait:
+- ifo_print.ifoPrint_PTL_MAIT(self.ifo0.ptl_mait)
+-
+- def test_ifoPrint_VTS_ATRT(self):
+- ifo_print.ifoPrint_VTS_ATRT(self.ifo0.vts_atrt)
+-
+- def test_ifoPrint_TT_SRPT(self):
+- ifo_print.ifoPrint_TT_SRPT(self.ifo0.tt_srpt)
+-
+- def test_ifoPrint_VTS_PTT_SRPT(self):
+- ifo_print.ifoPrint_VTS_PTT_SRPT(self.ifo.vts_ptt_srpt)
+-
+- def test_ifoPrint_PGC(self):
+- ifo_print.ifoPrint_PGC(self.ifo0.first_play_pgc)
+-
+- def test_ifoPrint_PGCIT(self):
+- ifo_print.ifoPrint_PGCIT(self.ifo.vts_pgcit)
+-
+- def test_ifoPrint_PGCI_UT(self):
+- ifo_print.ifoPrint_PGCI_UT(self.ifo.pgci_ut)
+-
+- def test_ifoPrint_VTS_TMAPT(self):
+- ifo_print.ifoPrint_VTS_TMAPT(self.ifo.vts_tmapt)
+-
+- def test_ifoPrint_C_ADT(self):
+- ifo_print.ifoPrint_C_ADT(self.ifo.menu_c_adt)
+-
+- def test_ifoPrint_VOBU_ADMAP(self):
+- ifo_print.ifoPrint_VOBU_ADMAP(self.ifo.menu_vobu_admap)
++ def test_ifo_print(self):
++ ifo_print.ifo_print(self.dvd, 1)
+
+
+ # Run the tests
+--- a/tests/Test_ifo_types.py
++++ b/tests/Test_ifo_types.py
+@@ -189,7 +189,7 @@ def pgc_command_tbl_t(obj, tester):
+ tester.assert_(isinstance(obj.nr_of_pre, int))
+ tester.assert_(isinstance(obj.nr_of_post, int))
+ tester.assert_(isinstance(obj.nr_of_cell, int))
+- tester.assert_(isinstance(obj.last_byte, int))
++ tester.assert_(isinstance(obj.zero_1, int))
+ tester.assert_(callable(obj.pre_cmds))
+ for i in range(obj.nr_of_pre):
+ tester.assert_(isinstance(obj.pre_cmds(i), ifo_types.vm_cmd_t))
+@@ -457,18 +457,18 @@ def ptl_mait_country_t(obj, tester):
+ tester.assert_(isinstance(obj.zero_1, int))
+ tester.assert_(isinstance(obj.pf_ptl_mai_start_byte, int))
+ tester.assert_(isinstance(obj.zero_2, int))
+- tester.assert_(isinstance(obj.pf_ptl_mai, ifo_types.pf_level_t))
+- pf_level_t(obj.pf_ptl_mai, tester)
++ # No idea what's going on here.
++ #tester.assert_(isinstance(obj.pf_ptl_mai, ifo_types.pf_level_t))
++ #pf_level_t(obj.pf_ptl_mai, tester)
+
+ def ptl_mait_t(obj, tester):
+ tester.assert_(isinstance(obj.nr_of_countries, int))
+ tester.assert_(isinstance(obj.nr_of_vtss, int))
+ tester.assert_(isinstance(obj.last_byte, int))
+- tester.assert_(isinstance(obj.countries, list))
+- tester.assertEqual(len(obj.countries), obj.nr_of_countries)
+- for elem in obj.countries:
+- tester.assert_(isinstance(elem, ifo_types.ptl_mait_country_t))
+- ptl_mait_country_t(elem, tester)
++ tester.assert_(callable(obj.countries))
++ for i in range(obj.nr_of_countries):
++ tester.assert_(isinstance(obj.countries(i), ifo_types.ptl_mait_country_t))
++ ptl_mait_country_t(obj.countries(i), tester)
+
+ def vts_attributes_t(obj, tester):
+ tester.assert_(isinstance(obj.last_byte, int))
diff --git a/dev-python/pydvdread/files/pydvdread-1.0-py3k.patch b/dev-python/pydvdread/files/pydvdread-1.0-py3k.patch
new file mode 100644
index 000000000000..338ad6c0ef0c
--- /dev/null
+++ b/dev-python/pydvdread/files/pydvdread-1.0-py3k.patch
@@ -0,0 +1,19 @@
+get it building w/python3
+
+--- a/setup.py
++++ b/setup.py
+@@ -18,11 +18,11 @@ def fixso(filepath):
+ class my_build_ext(build_ext):
+ def build_extension(self, ext):
+ sources = ext.sources
+- if sources is None or type(sources) not in (ListType, TupleType):
+- raise DistutilsSetupError, \
++ if sources is None or not isinstance(sources, (list, tuple)):
++ raise DistutilsSetupError(
+ ("in 'ext_modules' option (extension '%s'), " +
+ "'sources' must be present and must be " +
+- "a list of source filenames") % ext.name
++ "a list of source filenames") % ext.name)
+ sources = list(sources)
+ fullname = self.get_ext_fullname(ext.name)
+ if self.inplace:
diff --git a/dev-python/pydvdread/metadata.xml b/dev-python/pydvdread/metadata.xml
new file mode 100644
index 000000000000..d1ae6b21ccc0
--- /dev/null
+++ b/dev-python/pydvdread/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">pydvdread</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/pydvdread/pydvdread-1.0-r1.ebuild b/dev-python/pydvdread/pydvdread-1.0-r1.ebuild
new file mode 100644
index 000000000000..30b1b500bd16
--- /dev/null
+++ b/dev-python/pydvdread/pydvdread-1.0-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 pypy )
+
+inherit distutils-r1
+
+DESCRIPTION="A set of Python bindings for the libdvdread library"
+HOMEPAGE="http://pydvdread.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE=""
+RESTRICT="test" # Requires an actual DVD to test.
+
+DEPEND="media-libs/libdvdread
+ dev-lang/swig"
+RDEPEND=""
+
+PATCHES=( "${FILESDIR}"/${P}-py3k.patch \
+ "${FILESDIR}"/${P}-api-update.patch )
+
+python_test() {
+ "${PYTHON}" tests/TestAll.py || die "Tests fail with ${EPYTHON}"
+}