diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/pydvdread | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/pydvdread')
-rw-r--r-- | dev-python/pydvdread/Manifest | 5 | ||||
-rw-r--r-- | dev-python/pydvdread/files/pydvdread-1.0-api-update.patch | 287 | ||||
-rw-r--r-- | dev-python/pydvdread/files/pydvdread-1.0-py3k.patch | 19 | ||||
-rw-r--r-- | dev-python/pydvdread/metadata.xml | 11 | ||||
-rw-r--r-- | dev-python/pydvdread/pydvdread-1.0-r1.ebuild | 28 |
5 files changed, 350 insertions, 0 deletions
diff --git a/dev-python/pydvdread/Manifest b/dev-python/pydvdread/Manifest new file mode 100644 index 000000000000..16257e0f0a98 --- /dev/null +++ b/dev-python/pydvdread/Manifest @@ -0,0 +1,5 @@ +AUX pydvdread-1.0-api-update.patch 9032 BLAKE2B ac291fefbb26d550b6242005718be63b01c4c0b75e45b8cbea41c71d6352f1e2292ee0dfd6437b7c21541427d5d308e90039018cbb8741c98ffadd7908e7eabe SHA512 52456ce0a3b7503de4f70d0fd6b8f03cc1cc91db348dbeb41d62c246773e280869149bed30e763ecb0a4ac57413369a1a269669977a5e8465ba56be5b0536be2 +AUX pydvdread-1.0-py3k.patch 790 BLAKE2B 9b563ae15b22c225404af3bcb0b89c2b230a5651a44d8a47e9898e62518fad8a04a32b5980b31b6fefa181404bec5f82473c9d76e1ef433e3add33c345871864 SHA512 82f8721dc618d79a0684353011a714144143d836fe742878003cfcc122fe171f1c3e11d340bbf3e9a778160a351df50ffb68b0cc858244babcf81e8595690236 +DIST pydvdread-1.0.tar.bz2 62072 BLAKE2B 36ef9dc1accf8d346881ec4a270a43139823b6aa8691e72446433f6106b12468ce4a1c4b85664835c0b7d32c18b9a8b1bfcf1b89fd3120757b4d62a621efbb6c SHA512 1d403e1b9538113bb5ab1a808147691b806ee57db3fa30f704a0fcb1dbb8e9155e470dc2fbb895788af59c2952d637a2853d613f0619deb5daf07d2e7b675eee +EBUILD pydvdread-1.0-r1.ebuild 832 BLAKE2B e8dbffcc9a33fb5b7bd1d86b5de248fcdc7ab3fb016576823e1b5f0d17d4118afcaac8a07d965a336993837e7c766770ef7bacb57109731adcac667f90d71025 SHA512 16bf146e28b91b95f5d48d0fe4f20208ce711e0bbb86d16b211f8ad809da66ff00ac1a679b3f1c75f631d8bd30018f31d58cbeb9152227446705a28d1e04ffb6 +MISC metadata.xml 319 BLAKE2B 34985b920907d2c96cfc44f72f5a9e533e3112afec2fe10157b427914aacfccf4548ba1ce73a3b9ea14043f6b37f4271343fcc42958b9af4d907b393f48aff6c SHA512 73a20bef88f68ec88c854ce4d4418742563267d7a8007aa5c32a421fcac1259cb22a3ede01d2f5e49265902b4957bcf8a1e81512ed4715c49d461044f886d1f8 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}" +} |