From f70601e0934acd62f6c5d06c5ede4cc607179514 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 7 Jul 2018 11:42:03 +0100 Subject: gentoo resync : 07.07.2018 --- media-sound/xmms2/Manifest | 21 +- media-sound/xmms2/files/xmms2-0.8-audio4-p1.patch | 123 ------- media-sound/xmms2/files/xmms2-0.8-audio4-p2.patch | 171 --------- media-sound/xmms2/files/xmms2-0.8-audio4-p3.patch | 388 --------------------- media-sound/xmms2/files/xmms2-0.8-audio4-p4.patch | 296 ---------------- media-sound/xmms2/files/xmms2-0.8-audio4-p5.patch | 154 -------- media-sound/xmms2/files/xmms2-0.8-audio4-p6.patch | 106 ------ media-sound/xmms2/files/xmms2-0.8-audio4-p7.patch | 147 -------- media-sound/xmms2/files/xmms2-0.8-cpython.patch | 9 - .../xmms2/files/xmms2-0.8-cython-0.19.1.patch | 47 --- .../xmms2/files/xmms2-0.8-ffmpeg-0.11.patch | 18 - media-sound/xmms2/files/xmms2-0.8-libav-9-p2.patch | 50 --- media-sound/xmms2/files/xmms2-0.8-libav-9.patch | 20 -- media-sound/xmms2/files/xmms2-0.8-memset.patch | 19 - media-sound/xmms2/files/xmms2-0.8-modpug.patch | 11 - media-sound/xmms2/files/xmms2-0.8-samba-4.patch | 30 -- .../files/xmms2-0.8_p20161122-perl-no-local.patch | 17 + media-sound/xmms2/xmms2-0.8-r4.ebuild | 296 ---------------- media-sound/xmms2/xmms2-0.8_p20161122-r1.ebuild | 297 ---------------- media-sound/xmms2/xmms2-0.8_p20161122-r2.ebuild | 297 ---------------- media-sound/xmms2/xmms2-0.8_p20161122-r4.ebuild | 297 ++++++++++++++++ 21 files changed, 316 insertions(+), 2498 deletions(-) delete mode 100644 media-sound/xmms2/files/xmms2-0.8-audio4-p1.patch delete mode 100644 media-sound/xmms2/files/xmms2-0.8-audio4-p2.patch delete mode 100644 media-sound/xmms2/files/xmms2-0.8-audio4-p3.patch delete mode 100644 media-sound/xmms2/files/xmms2-0.8-audio4-p4.patch delete mode 100644 media-sound/xmms2/files/xmms2-0.8-audio4-p5.patch delete mode 100644 media-sound/xmms2/files/xmms2-0.8-audio4-p6.patch delete mode 100644 media-sound/xmms2/files/xmms2-0.8-audio4-p7.patch delete mode 100644 media-sound/xmms2/files/xmms2-0.8-cpython.patch delete mode 100644 media-sound/xmms2/files/xmms2-0.8-cython-0.19.1.patch delete mode 100644 media-sound/xmms2/files/xmms2-0.8-ffmpeg-0.11.patch delete mode 100644 media-sound/xmms2/files/xmms2-0.8-libav-9-p2.patch delete mode 100644 media-sound/xmms2/files/xmms2-0.8-libav-9.patch delete mode 100644 media-sound/xmms2/files/xmms2-0.8-memset.patch delete mode 100644 media-sound/xmms2/files/xmms2-0.8-modpug.patch delete mode 100644 media-sound/xmms2/files/xmms2-0.8-samba-4.patch create mode 100644 media-sound/xmms2/files/xmms2-0.8_p20161122-perl-no-local.patch delete mode 100644 media-sound/xmms2/xmms2-0.8-r4.ebuild delete mode 100644 media-sound/xmms2/xmms2-0.8_p20161122-r1.ebuild delete mode 100644 media-sound/xmms2/xmms2-0.8_p20161122-r2.ebuild create mode 100644 media-sound/xmms2/xmms2-0.8_p20161122-r4.ebuild (limited to 'media-sound/xmms2') diff --git a/media-sound/xmms2/Manifest b/media-sound/xmms2/Manifest index 83f1a1fc9539..0135b1419153 100644 --- a/media-sound/xmms2/Manifest +++ b/media-sound/xmms2/Manifest @@ -1,29 +1,12 @@ -AUX xmms2-0.8-audio4-p1.patch 4453 BLAKE2B f0accb5aa8cca416edcd18ade3f67a574e819417a670a967ca36274dd6366d643bdec281d0116da186cf8e31f440a2e793c4d5979f1c1e4b73fdad6a4299129d SHA512 4490e0729b2d048da17b0c9537dbd31de240f918f9be1de808609c473365a2f905b5fb3e6912beb500b668b53121764c171ef7978d4ed842d45578c50c7f78c8 -AUX xmms2-0.8-audio4-p2.patch 6192 BLAKE2B 2677db9c953d59d4c2598549163ac7f6d8262e53fe7a83f693c5f388e6049e87995107094684b1360984ab44dec5c254f252512ed5daa248382ea2ff3136b24e SHA512 835184d4cda82ef20f81271e4b64a463bf74688d7e6cd6dc32b1e4e4510202b39314034f690c85d0f009e14b1b347ca47996ea6bfb2a224036f14654c7c90194 -AUX xmms2-0.8-audio4-p3.patch 11107 BLAKE2B aa469b0693fc3c482b89fead1dd62ba3f6322bda422351b8af9157f9000c69dd2fb62497f0b6179d0f54add34901ff5da80d59af78b77662d672523b1d905ff1 SHA512 cf40f6c1b8b501ec3deb9808836abdf2afd03602d77a783b6be1e667c9c2664f4ca25ad9da8c0249f3aee4562ebc86d8156db0a5504ceb786528c37dc6e07d0c -AUX xmms2-0.8-audio4-p4.patch 10088 BLAKE2B e2f34ad84e5d89ea71390f148e2f703ac288b6b20667b82704e4ec135096f8df23ad4029aa3f81953b0634ebc5867ecd784f8951d3144765db06e4188bf5caf4 SHA512 a326eecdf6bb207ce367917f63edffa602bf8817ca2471f7ae1f70afbc86559769c91c6bd3477a236bc5061ba8ff92b566074f92a37541bec523195b6a97f71f -AUX xmms2-0.8-audio4-p5.patch 5021 BLAKE2B b9b380a8974b4a6d306cf43b5427ed90feff4bec628b489f4d7c58caca22b721b683e2a2ba4f9669055978af8aec10424df58f48b050f5659dde0a48f129b7dd SHA512 b6b7ff8fb1f9378c1ded3b56f1d5e4347fa468054d2da5e8862a58e31f1e4233b4cedf52ed6fdbc0121297f8691a7f9aa15ddfd20414bf24f6815ee7e6d1bbac -AUX xmms2-0.8-audio4-p6.patch 3895 BLAKE2B 8acc158d1d2a4f2a5e0f53fa96f326b94d88167943df28acafc000ebf8ae3e0750b0c8bdd0537672f5016ca51af38e09483ce313b8cf9999ef89cbd275aeca30 SHA512 28ba0b69018c9b36ccf66dfcf88ba11105840eb3e688dc1c7da9a2804cc0bb0335d20c48793c9492aa5fcfee514f576a0bce375b0b42858a37ac192bad40d1a5 -AUX xmms2-0.8-audio4-p7.patch 5263 BLAKE2B c72df5f1fbe8a8fde878cdd811878a41cd1186a2cc37431c729d8d431853476bf4a37d0e11309de7f60aaa096403ee5b9fcdb2c34f4ee4b233bb4c0dcdd75877 SHA512 b2e3615b0e2a20490ffbc6de307f3dc0cfc87e913170ef6a94f5673f1bd7ba3e92741a04b24068df7a8746dba52dc558b41f59eed67d9f89890825bb125f263d -AUX xmms2-0.8-cpython.patch 471 BLAKE2B d8d52aca71908edbbc9d3f974c2ff0fab389e0b00aa92e771686489fc446b1ec5d342be226fd15368c5fe22eafd2edfe238f744a9737ea1517e0823b2477f847 SHA512 7beca90f3af10c49399c2b996d7f3b11b2c55232ec2231877c841da31b29b94dfa9dfc2eb91f3529b8a37f9a01c00bc1727af1ba8850fc7d050a94ef841656ca -AUX xmms2-0.8-cython-0.19.1.patch 1726 BLAKE2B ba9441963dfd0a512550cbebac45f4a8458853e579c3844e71c405f14dd2a09ef7de3f6d7c84ff818cd227ddfeeca0f2e6fe0a9472013f737c2589c6041b0869 SHA512 8ecfc40196bf8643bde54aaaf21197746dcc31930da68deb7dce48ff0285640bd57a7218788e7dde937af434080a7aaf7cf900193e129cc1b4f6a077b53a2494 -AUX xmms2-0.8-ffmpeg-0.11.patch 638 BLAKE2B d9ecce414354ab6d5d4ebada404f2bc65f1edc623070d76d1434a2ec840a2c4be7614e01e93e2cb9c49b11cdf1cee2b6c9fce0f57d15b3b4eea62c1fad096bdf SHA512 5b54c9284577f57da5b1ab6f51f620fe20a2815cc38dfca2437aaac9424917ddbba2d174576d619d36c18ec5ffa194dcff7333e1e68c27bf8abe48f3c6a464a7 AUX xmms2-0.8-ffmpeg2.patch 455 BLAKE2B 4009dd67794554c3dd98199944410f435f978d1ea86c3c280678d24cd8b85846e34d73c6a960e5188827d1523300e7869a3c0c1094fd355fc9c77f917a257508 SHA512 6aa567c3d823780c7fc8951735f59bcbe3345989e077d3ea6d8100acedd3ebf30523f05152fb80827c236ff83674bb47ca0917b5d2331c4d79c4502e41b365a3 -AUX xmms2-0.8-libav-9-p2.patch 1823 BLAKE2B 974cb12f7ef6818b7f31640f42281a1c352081b21deb9cca098798647c61a423628bb8bed1cfb01d17c106a81b44690bb6840b010a3a83df34bf7cd3665331f3 SHA512 fef46159dc8d40ee05d091076e78f5ffa8d1c93ee2e476110fa96f4f52f79c05c5177192828258ab6e4ec75118ea382458546325692110c819a5fed3cf2c198c -AUX xmms2-0.8-libav-9.patch 526 BLAKE2B 9b7fa68807447f0ae6804019335da8c0f9ecd230cee31d04bf0cd04ee01cbd90b46d799a7b81ea2844873eb1cb8469cb502a54d340396f097423b6add7f581a1 SHA512 2a6218fb8a27c89321c08025c110425ed1deae0f498bca9a9b306f2848c605a964aef05adcb1f3fd006786fda0b88d8a6d701c4fc8834cb7fb0fe561d8f9e5fb -AUX xmms2-0.8-memset.patch 685 BLAKE2B ef311ce62ddce948a78d6d3945cf0bfab41a36897823a0513e8c28aa283a6a3dc8c77bb4850d8d93d40ba83d1e22b8d0b816edd468d714052065cf4d0a66a66e SHA512 aa45c8f4e04e7b5edae131ac60baad265d2fdbc6297fc2595d2caedc0205956ae551408ea208daec857d1cb44a1698c663f8fc6dcb16d3f1a998b12380a562e4 -AUX xmms2-0.8-modpug.patch 361 BLAKE2B b59a4cf2b12c9fc89c0e8d613d08291229efba41233d81fbd3554cdd8b35a833514468f1a7559e6163c633037c7af08464eec9b0fb3c20f736f226f71003f936 SHA512 a86b764526a82a719751f0cf2a10f22086f75d5efde6e4a1afd19c6dd4132d8770b7db2d6b46c3c7f0b7ff319ab11bef64a812d5a13164438d7f1a4595ec9f49 AUX xmms2-0.8-rtvg.patch 1539 BLAKE2B b359db6f477f0ca6a8e528645f731ccb33ec13067ff4c9fa1ca2ce1f13108c8c42b242562d08bd9997c06845873bb8efaba0f04e23bb2a79cb863c76223a86af SHA512 b8c6b908f48ab239c2c734452eebd2b9a4a2f4f2b98278bb0951d9a97e0d3df03b5443bc3a6bb92ff3133894d7b6239373b3323251f34c6852eee988aae5205f -AUX xmms2-0.8-samba-4.patch 1125 BLAKE2B 783c0e2a98c9d31ef9b13ae6a82dc7946db0b2ccb789cd9f8411902a191c44a116f60fcbb0eebdbc18a27ca56273e22d3e5a66884b34ef9ce0d5b072cca1031e SHA512 f6a3ef39188b077217becc7317253e7ab652d6bd603bf26239a8398d8de6d34c62415f42baed78720fce9048f2499de90f0cca07d7219f281df8a441b16a7e01 AUX xmms2-0.8DrO_o-waflib-fix-perl.patch 1693 BLAKE2B 6057da2c8493ea7887ea03322d16d45ca0726174e7deb1a64f76b289fdeaba02c7659944803a23d7a32a0a74de7a39de1404d5566b43dd3306004a29876af038 SHA512 0f7f86cebd0ff75ed53366776f8c93abb54adf5942f53d7424183a4bd6913b73493882d4d3caadba6a959ddf22da0a22fa53d0fc18ce5b8508eb5670482e8c92 AUX xmms2-0.8_p20161122-be-hash.patch 1075 BLAKE2B 7c9678016751b207a5ef48c0f7963bc0a2e3e99fb461e52b5745bc5e2dde6c329bb358e58802c127aef96d5912e22a7df7a64f719286e9cf7787703765c4b18f SHA512 051e22907315bb6bda201497e1c2ef84d919fc7d39aefac187b3616c5f6c41e768cdd79cfe197fbadfdda3863f9e9c96b5f72fa07d5e1655451328cde8ba5781 AUX xmms2-0.8_p20161122-mac-4.patch 1632 BLAKE2B 5bc5c7d499df5faee2fc6b4307af18269b784360bbbcaef33b1db4b880704f88e8dad06168e3737a43fcdb71ba722da1ffb5ba77f3f61ecf07674e1ad0988f5a SHA512 d2fe5f9a0c59205c787386e7b219c3fa9a334c30787b9a343214cc1c4dbf9f5d47f5dad9b2efd7deac1e96a227c827cc66198215a89b0e788c9d856cff51b16b +AUX xmms2-0.8_p20161122-perl-no-local.patch 697 BLAKE2B 86ab6bb3594fd45e9a9bdbd07d85d3740ed206eea24652161c7fbbdf620c98a6b002b646aba65a3f017e263bb82d6dc7b933fb53540012c2005d65dd2e667b06 SHA512 eb5afb39409c7c199a844d9452ab829a653d2a1ce8f5d9f1361fa995e851914d5a962d25d8116947a265fabc649f8560aa1947a24cf45d954da7743954fc3cd7 AUX xmms2-0.8_p20161122-tarball.patch 2764 BLAKE2B 1d6ea9bc40db3145460a8ef06c732114475087ea05eef65fd837d6c3bf346478579d7c6ab0bf33387d2228a319245e0e4d2562935be75a58abd04e88205d4373 SHA512 5b03d129a55ac14462a68e47ecba29c2817eb83d122a3614c624c743ecc29a7bac066644aa61d5ac74f9cb59808d1a9bac077dc360c507da722c206b948301ac DIST xmms2-0.8DrO_o-949-gca15e830.tar.bz2 1928653 BLAKE2B f34abf0c68f4574593eb706744cc4354bc9b679d005bcaf4a9f03ef90fcb14935428c73d3d74565c41a70efcfa6541af15a455d091b6d17e7ca613229c1c1390 SHA512 affd7fdd259cdb952e972b62f24ab8eb6afd2c87786254a7ae81adffdcfe1454dcf2fb95811a8b90db74dba84918526fd8c920e11582b36aa48725f293c73edb -DIST xmms2-0.8DrO_o.tar.bz2 1670726 BLAKE2B e226f197b09ebc205fa274d6a0024190e222314bc0df2c6cf443061b3961ca622bd0a1834dfee5c128aa2b003d4e703b5c4976ddc038d84d7f05c3e052060b0b SHA512 478103d80264c0cb32912e828f74d0f5b2f10fe310f530a87ebecda7ca547a69e238cd572788f90bda29494494160d459fa6d1356b4fb87c7a8f0bf02e3b75f8 -EBUILD xmms2-0.8-r4.ebuild 7868 BLAKE2B 19b00556972f8950d418314e4a7cc272b47de8a86f7788877c2c813aea81cb66e2bd82ea84e3a6f542de5bb47d04ca053f02e697a17f663adcdd2e41cba27078 SHA512 349c79f729d73c3949e39e9764dea7b2e9adcfbad1a9869c6252de244ddce0681582dd6118ef0410132ad7a1c79fd8fab6505cc5776e0bfa513515cef2c93337 -EBUILD xmms2-0.8_p20161122-r1.ebuild 7559 BLAKE2B b0aec5980e4b9f053eeeb1e44f459011f12f27087d1d81a36d21648951a4e21bbbe54ba3a00858a0463efc3e28e5ac6aa8bbbe8ae406869bd96099dc20260bc0 SHA512 cf8b1fc52341c9a827e70babe502cfcb5a866cd9b4247b5d504ef7232cb8ec03eab4c69e42ea3ab46bb1359be9e05d9334750282a6c8c50a6bf1aa7afcbab17c -EBUILD xmms2-0.8_p20161122-r2.ebuild 7524 BLAKE2B 0fbe36838d441759ac7925b8650c08653e3dfe8f73d87a16c9cfaf3fc69d42c39a30517dcc5d77ffb0962a35ba9c34ff96fd8b8718f3741acbcad7d58754c9a7 SHA512 8e6d588501fbefa20fe62dce06e0b16f0637c1c73fdd6ee2a3e4c4086157800387fabbb922ef502112f378b451dd8f9ff070cd2d3a71ff92708abbdc19ba7a52 EBUILD xmms2-0.8_p20161122-r3.ebuild 7519 BLAKE2B ad7093c0b9af101e3f29ad81b6eda1fac3842cbeaf7dd2322704ed8ff2394038c141d72a9bcc6b4ab14ee12d36d2af3e12b8fc9851fdb2ec17bd5bdb5c107c93 SHA512 3fe26a7e0f1542ef9ec787d87d4ff7ee5c6ad19543c66d1a6c31ceae5d921ad5bd48c20b5d7a546aea69a87b1877e0144d1cdee7ac8c06eba96826185f982185 +EBUILD xmms2-0.8_p20161122-r4.ebuild 7581 BLAKE2B 647c46a016dcb76e7aa383cbd14f26d200680637a9858b9ab17b8dd11755819b644dd1e22d95b515c394336f2f0eabd845ee1133742e12e2a307909405c27e12 SHA512 6fad287e5043fdcf926792425d271b45f8affc371f173db5e58c3c8b1752ddf3bb73370ebe4d4fd56c31488cfef11ae64df1ff90010eef56759b7f116cc1f7f5 EBUILD xmms2-0.8_p20161122.ebuild 7389 BLAKE2B bb82ad9ed821fefab30cb8a3f9a4b77e50ec6cc219b297506e8e2fbe8aba2b347c1da0a1b675d072b8bd97263dd03c47bcb8589daddeea8e3d0e7a85020c44c2 SHA512 2c09816bf4c22b89e885b4c6c64f0bbf42729eba0f77834451d9fc943057aba9a15f0362b81458192d21c48e61918f689d7f9b0fd7dea22e416b96598caa293d MISC metadata.xml 2619 BLAKE2B db882bae1912243670ae3f8a075704ac0398f50a66f0ce990b4283b26b0c99846ea4d491375d9d920b320bb49da9ced1209bcfc86dd341f1e4cbc0a3649bd38d SHA512 f4477bdfc7575b104a7852dfcc789178631c0f0b470a968af7b763c8b7d70ab6cea8a4ff739b3b9adea280838cc5d8cb773337d899b20ecc0797a9d16ef38e97 diff --git a/media-sound/xmms2/files/xmms2-0.8-audio4-p1.patch b/media-sound/xmms2/files/xmms2-0.8-audio4-p1.patch deleted file mode 100644 index 21ed6492a44d..000000000000 --- a/media-sound/xmms2/files/xmms2-0.8-audio4-p1.patch +++ /dev/null @@ -1,123 +0,0 @@ -commit 8831bc77d705c03b3f8081de0520dd10afa85c69 -Author: Uli Franke -Date: Tue Jan 17 23:23:46 2012 +0100 - - BUG(2509): Avoid unaligned reads in avcodec xform. - -diff --git a/src/plugins/avcodec/avcodec.c b/src/plugins/avcodec/avcodec.c -index fe58fc5..1b4a659 100644 ---- a/src/plugins/avcodec/avcodec.c -+++ b/src/plugins/avcodec/avcodec.c -@@ -36,6 +36,9 @@ typedef struct { - guint buffer_size; - gboolean no_demuxer; - -+ gchar *read_out_buffer; -+ gint read_out_buffer_size; -+ - guint channels; - guint samplerate; - xmms_sample_format_t sampleformat; -@@ -107,6 +110,7 @@ xmms_avcodec_destroy (xmms_xform_t *xform) - - avcodec_close (data->codecctx); - av_free (data->codecctx); -+ av_free (data->read_out_buffer); - - g_string_free (data->outbuf, TRUE); - g_free (data->buffer); -@@ -132,6 +136,9 @@ xmms_avcodec_init (xmms_xform_t *xform) - data->buffer_size = AVCODEC_BUFFER_SIZE; - data->codecctx = NULL; - -+ data->read_out_buffer = av_malloc (AVCODEC_MAX_AUDIO_FRAME_SIZE); -+ data->read_out_buffer_size = AVCODEC_MAX_AUDIO_FRAME_SIZE; -+ - xmms_xform_private_data_set (xform, data); - - avcodec_init (); -@@ -196,7 +203,7 @@ xmms_avcodec_init (xmms_xform_t *xform) - } else { - /* A demuxer plugin forgot to give decoder config? */ - xmms_log_error ("Decoder config data not found!"); -- return FALSE; -+ goto err; - } - } - -@@ -220,7 +227,7 @@ xmms_avcodec_init (xmms_xform_t *xform) - - /* some codecs need to have something read before they set - * the samplerate and channels correctly, unfortunately... */ -- if ((ret = xmms_avcodec_read (xform, buf, 42, &error)) > 0) { -+ if ((ret = xmms_avcodec_read (xform, buf, sizeof (buf), &error)) > 0) { - g_string_insert_len (data->outbuf, 0, buf, ret); - } else { - XMMS_DBG ("First read failed, codec is not working..."); -@@ -251,6 +258,9 @@ err: - if (data->codecctx) { - av_free (data->codecctx); - } -+ if (data->read_out_buffer) { -+ av_free (data->read_out_buffer); -+ } - g_string_free (data->outbuf, TRUE); - g_free (data->extradata); - g_free (data); -@@ -263,8 +273,7 @@ xmms_avcodec_read (xmms_xform_t *xform, xmms_sample_t *buf, gint len, - xmms_error_t *error) - { - xmms_avcodec_data_t *data; -- char outbuf[AVCODEC_MAX_AUDIO_FRAME_SIZE]; -- gint outbufsize, bytes_read = 0; -+ gint bytes_read = 0; - guint size; - - data = xmms_xform_private_data_get (xform); -@@ -330,9 +339,9 @@ xmms_avcodec_read (xmms_xform_t *xform, xmms_sample_t *buf, gint len, - packet.data = data->buffer; - packet.size = data->buffer_length; - -- outbufsize = sizeof (outbuf); -- bytes_read = avcodec_decode_audio3 (data->codecctx, (short *) outbuf, -- &outbufsize, &packet); -+ data->read_out_buffer_size = AVCODEC_MAX_AUDIO_FRAME_SIZE; -+ bytes_read = avcodec_decode_audio3 (data->codecctx, (short *) data->read_out_buffer, -+ &data->read_out_buffer_size, &packet); - - /* The DTS decoder of ffmpeg is buggy and always returns - * the input buffer length, get frame length from header */ -@@ -354,8 +363,8 @@ xmms_avcodec_read (xmms_xform_t *xform, xmms_sample_t *buf, gint len, - - data->buffer_length -= bytes_read; - -- if (outbufsize > 0) { -- g_string_append_len (data->outbuf, outbuf, outbufsize); -+ if (data->read_out_buffer_size > 0) { -+ g_string_append_len (data->outbuf, data->read_out_buffer, data->read_out_buffer_size); - } - - size = MIN (data->outbuf->len, len); -@@ -371,8 +380,7 @@ static gint64 - xmms_avcodec_seek (xmms_xform_t *xform, gint64 samples, xmms_xform_seek_mode_t whence, xmms_error_t *err) - { - xmms_avcodec_data_t *data; -- char outbuf[AVCODEC_MAX_AUDIO_FRAME_SIZE]; -- gint outbufsize, bytes_read = 0; -+ gint bytes_read = 0; - gint64 ret = -1; - - g_return_val_if_fail (xform, -1); -@@ -396,9 +404,9 @@ xmms_avcodec_seek (xmms_xform_t *xform, gint64 samples, xmms_xform_seek_mode_t w - packet.data = data->buffer; - packet.size = data->buffer_length; - -- outbufsize = sizeof (outbuf); -- bytes_read = avcodec_decode_audio3 (data->codecctx, (short *) outbuf, -- &outbufsize, &packet); -+ data->read_out_buffer_size = AVCODEC_MAX_AUDIO_FRAME_SIZE; -+ bytes_read = avcodec_decode_audio3 (data->codecctx, (short *) data->read_out_buffer, -+ &data->read_out_buffer_size, &packet); - - if (bytes_read < 0 || bytes_read > data->buffer_length) { - XMMS_DBG ("Error decoding data!"); diff --git a/media-sound/xmms2/files/xmms2-0.8-audio4-p2.patch b/media-sound/xmms2/files/xmms2-0.8-audio4-p2.patch deleted file mode 100644 index 70334587d420..000000000000 --- a/media-sound/xmms2/files/xmms2-0.8-audio4-p2.patch +++ /dev/null @@ -1,171 +0,0 @@ -commit b614459dc1ea353d6c24b4a77c7f92a5577d5bc3 -Author: Uli Franke -Date: Thu Jan 19 11:53:57 2012 +0100 - - BUG(2510): Add more bitrates/samplerates to AAC/ALAC. - -diff --git a/src/plugins/avcodec/avcodec.c b/src/plugins/avcodec/avcodec.c -index 1b4a659..b32de4d 100644 ---- a/src/plugins/avcodec/avcodec.c -+++ b/src/plugins/avcodec/avcodec.c -@@ -60,6 +60,7 @@ static gint xmms_avcodec_read (xmms_xform_t *xform, xmms_sample_t *buf, gint len - xmms_error_t *error); - static gint64 xmms_avcodec_seek (xmms_xform_t *xform, gint64 samples, - xmms_xform_seek_mode_t whence, xmms_error_t *err); -+static xmms_sample_format_t xmms_avcodec_translate_sample_format (enum AVSampleFormat av_sample_format); - - /* - * Plugin header -@@ -168,12 +169,12 @@ xmms_avcodec_init (xmms_xform_t *xform) - data->channels = ret; - } - -- /* bitrate required for WMA files */ -+ /* Required by WMA xform. */ - xmms_xform_auxdata_get_int (xform, - "bitrate", - &data->bitrate); - -- /* ALAC and MAC require bits per sample field to be 16 */ -+ /* Required by tta and apefile xforms. */ - xmms_xform_auxdata_get_int (xform, - "samplebits", - &data->samplebits); -@@ -238,12 +239,17 @@ xmms_avcodec_init (xmms_xform_t *xform) - - data->samplerate = data->codecctx->sample_rate; - data->channels = data->codecctx->channels; -+ data->sampleformat = xmms_avcodec_translate_sample_format (data->codecctx->sample_fmt); -+ if (data->sampleformat == XMMS_SAMPLE_FORMAT_UNKNOWN) { -+ avcodec_close (data->codecctx); -+ goto err; -+ } - - xmms_xform_outdata_type_add (xform, - XMMS_STREAM_TYPE_MIMETYPE, - "audio/pcm", - XMMS_STREAM_TYPE_FMT_FORMAT, -- XMMS_SAMPLE_FORMAT_S16, -+ data->sampleformat, - XMMS_STREAM_TYPE_FMT_CHANNELS, - data->channels, - XMMS_STREAM_TYPE_FMT_SAMPLERATE, -@@ -428,3 +434,23 @@ xmms_avcodec_seek (xmms_xform_t *xform, gint64 samples, xmms_xform_seek_mode_t w - - return ret; - } -+ -+static xmms_sample_format_t -+xmms_avcodec_translate_sample_format (enum AVSampleFormat av_sample_format) -+{ -+ switch (av_sample_format) { -+ case AV_SAMPLE_FMT_U8: -+ return XMMS_SAMPLE_FORMAT_U8; -+ case AV_SAMPLE_FMT_S16: -+ return XMMS_SAMPLE_FORMAT_S16; -+ case AV_SAMPLE_FMT_S32: -+ return XMMS_SAMPLE_FORMAT_S32; -+ case AV_SAMPLE_FMT_FLT: -+ return XMMS_SAMPLE_FORMAT_FLOAT; -+ case AV_SAMPLE_FMT_DBL: -+ return XMMS_SAMPLE_FORMAT_DOUBLE; -+ default: -+ XMMS_DBG ("AVSampleFormat (%i) not supported.", av_sample_format); -+ return XMMS_SAMPLE_FORMAT_UNKNOWN; -+ } -+} -diff --git a/src/plugins/mp4/mp4.c b/src/plugins/mp4/mp4.c -index 7c915c4..3ee9357 100644 ---- a/src/plugins/mp4/mp4.c -+++ b/src/plugins/mp4/mp4.c -@@ -186,9 +186,6 @@ xmms_mp4_init (xmms_xform_t *xform) - xmms_xform_auxdata_set_bin (xform, "decoder_config", tmpbuf, tmpbuflen); - g_free (tmpbuf); - -- /* This is only for ALAC to set 16-bit samples, ignored for AAC */ -- xmms_xform_auxdata_set_int (xform, "samplebits", 16); -- - xmms_mp4_get_mediainfo (xform); - - XMMS_DBG ("MP4 demuxer inited successfully!"); -@@ -288,7 +285,7 @@ xmms_mp4_get_mediainfo (xmms_xform_t *xform) - data = xmms_xform_private_data_get (xform); - g_return_if_fail (data); - -- if ((temp = mp4ff_get_sample_rate (data->mp4ff, data->track)) >= 0) { -+ if ((temp = mp4ff_get_sample_rate (data->mp4ff, data->track)) > 0) { - glong srate = temp; - - if ((temp = mp4ff_get_track_duration_use_offsets (data->mp4ff, -@@ -492,7 +489,7 @@ xmms_mp4_get_track (xmms_xform_t *xform, mp4ff_t *infile) - case 0x69: /* MPEG-2 audio */ - case 0x6B: /* MPEG-1 audio */ - continue; -- case 0xff: -+ case 0xff: /* ALAC */ - chans = mp4ff_get_channel_count (infile, i); - rate = mp4ff_get_sample_rate (infile, i); - if (chans <= 0 || rate <= 0) { -diff --git a/src/plugins/mp4/mp4ff/README.xmms2 b/src/plugins/mp4/mp4ff/README.xmms2 -index c2737c5..8021618 100644 ---- a/src/plugins/mp4/mp4ff/README.xmms2 -+++ b/src/plugins/mp4/mp4ff/README.xmms2 -@@ -12,3 +12,4 @@ Changes: - * Add value_length variable to tag type and use it when adding new item-value pairs, - necessary for cover art since it's binary data and can't be handled as a string - * Add support for Apple Lossless audio files -+ * Add a workaround for supporting higher samplerates. -diff --git a/src/plugins/mp4/mp4ff/mp4ff.c b/src/plugins/mp4/mp4ff/mp4ff.c -index ee7f7fb..b6f0a37 100644 ---- a/src/plugins/mp4/mp4ff/mp4ff.c -+++ b/src/plugins/mp4/mp4ff/mp4ff.c -@@ -32,6 +32,8 @@ - #include - #include "mp4ffint.h" - -+static uint32_t mp4ff_normalize_flawed_sample_rate (uint16_t samplerate); -+ - mp4ff_t *mp4ff_open_read(mp4ff_callback_t *f) - { - mp4ff_t *ff = malloc(sizeof(mp4ff_t)); -@@ -304,12 +306,39 @@ int32_t mp4ff_num_samples(const mp4ff_t *f, const int32_t track) - return total; - } - -+static uint32_t -+mp4ff_normalize_flawed_sample_rate (uint16_t samplerate) -+{ -+ /* A list of common rates can be found at -+ * https://en.wikipedia.org/wiki/Sampling_rate */ -+ uint32_t rates[] = {8000, 11025, 16000, 22050, 32000, 44056, 44100, -+ 47250, 48000, 50000, 50400, 88200, 96000, 176400, -+ 192000, 352800, 384000, 0}; -+ uint32_t* rate; -+ -+ /* First check standard rates. */ -+ for (rate = rates; *rate; rate++) { -+ if (*rate == samplerate) { -+ return *rate; -+ } -+ } -+ -+ /* No standard rates matching - check if sample rate got truncated when -+ * added to MP4 container */ -+ for (rate = rates; *rate; rate++) { -+ if ((*rate & 0x0000FFFF) == samplerate) { -+ return *rate; -+ } -+ } - -+ /* Failed to find a standard rate - we give up returning the original rate */ -+ return samplerate; -+} - - - uint32_t mp4ff_get_sample_rate(const mp4ff_t *f, const int32_t track) - { -- return f->track[track]->sampleRate; -+ return mp4ff_normalize_flawed_sample_rate (f->track[track]->sampleRate); - } - - uint32_t mp4ff_get_channel_count(const mp4ff_t * f,const int32_t track) diff --git a/media-sound/xmms2/files/xmms2-0.8-audio4-p3.patch b/media-sound/xmms2/files/xmms2-0.8-audio4-p3.patch deleted file mode 100644 index a9145c0d3d26..000000000000 --- a/media-sound/xmms2/files/xmms2-0.8-audio4-p3.patch +++ /dev/null @@ -1,388 +0,0 @@ -commit 4d0682030e20a8ed218f4ff924554f93d276d9ee -Author: Anthony Garcia -Date: Thu Apr 22 16:59:37 2010 -0700 - - OTHER: Cleanup - - Re-enabled nellymoser (ffmpeg appears to be okay with it now) - - Fixed possible infinite loop in the code that handles the data (if any) - between the header and tag data. - -diff --git a/src/plugins/avcodec/avcodec.c b/src/plugins/avcodec/avcodec.c -index 6c9fea8..5554056 100644 ---- a/src/plugins/avcodec/avcodec.c -+++ b/src/plugins/avcodec/avcodec.c -@@ -90,7 +90,7 @@ xmms_avcodec_plugin_setup (xmms_xform_plugin_t *xform_plugin) - xmms_magic_add ("A/52 (AC-3) header", "audio/x-ffmpeg-ac3", - "0 beshort 0x0b77", NULL); - xmms_magic_add ("DTS header", "audio/x-ffmpeg-dca", -- "0 belong 0x7ffe8001", NULL); -+ "0 belong 0x7ffe8001", NULL); - - xmms_xform_plugin_indata_add (xform_plugin, - XMMS_STREAM_TYPE_MIMETYPE, -@@ -197,7 +197,8 @@ xmms_avcodec_init (xmms_xform_t *xform) - !strcmp (data->codec_id, "adpcm_swf") || - !strcmp (data->codec_id, "pcm_s16le") || - !strcmp (data->codec_id, "ac3") || -- !strcmp (data->codec_id, "dca")) { -+ !strcmp (data->codec_id, "dca") || -+ !strcmp (data->codec_id, "nellymoser")) { - /* number 1024 taken from libavformat raw.c RAW_PACKET_SIZE */ - data->extradata = g_malloc0 (1024); - data->extradata_size = 1024; -diff --git a/src/plugins/flv/flv.c b/src/plugins/flv/flv.c -index 440010c..266fea6 100644 ---- a/src/plugins/flv/flv.c -+++ b/src/plugins/flv/flv.c -@@ -25,29 +25,41 @@ - * and other info, then data - */ - #define FLV_TAG_SIZE 11 --/* random constant */ - #define FLV_CHUNK_SIZE 4096 - --/* let libavcodec take care of swapping sample bytes */ --static const gchar *mime_pcm_s16le = "audio/x-ffmpeg-pcm_s16le"; --static const gchar *fmt_mime[11] = { -- /* Supported when samples are 8 bit -- * (otherwise there's no way of knowing endianness) -- */ -- "audio/pcm", -- "audio/x-ffmpeg-adpcm_swf", -- "audio/mpeg", -- /* if bps is 8 bit u8 -- * if bps is 16 bit sle16 -- */ -- "audio/pcm", -- /* libavcodec can't handle nelly without dying yet */ -- /*"audio/x-ffmpeg-nellymoser", -- "audio/x-ffmpeg-nellymoser", -- "audio/x-ffmpeg-nellymoser",*/ -- "", "", "", -- "", "", "", -- "audio/aac" -+typedef enum { -+ /* Only u8 bit samples since -+ there's no way to determine endianness -+ */ -+ CODEC_PCM_HOST, -+ CODEC_ADPCM, -+ CODEC_MP3, -+ /* 8 bps: unsigned -+ 16 bps: signed -+ */ -+ CODEC_PCM_LE, -+ CODEC_NELLYMOSER_16K, -+ CODEC_NELLYMOSER_8K, -+ /* Uses the sample rate in -+ the tag as normal -+ */ -+ CODEC_NELLYMOSER, -+ CODEC_AAC = 10 -+} xmms_flv_codec_id; -+ -+struct xmms_flv_codec_table { -+ xmms_flv_codec_id id; -+ const gchar *mime; -+} static flv_codecs[] = { -+ {CODEC_PCM_HOST, "audio/pcm"}, -+ {CODEC_ADPCM, "audio/x-ffmpeg-adpcm_swf"}, -+ {CODEC_MP3, "audio/mpeg"}, -+ /* Will be audio/x-ffmpeg-pcm_s16le if bps is 16 */ -+ {CODEC_PCM_LE, "audio/pcm"}, -+ {CODEC_NELLYMOSER_16K, "audio/x-ffmpeg-nellymoser"}, -+ {CODEC_NELLYMOSER_8K, "audio/x-ffmpeg-nellymoser"}, -+ {CODEC_NELLYMOSER, "audio/x-ffmpeg-nellymoser"}, -+ {CODEC_AAC, "audio/aac"} - }; - - typedef struct { -@@ -111,23 +123,26 @@ static gboolean - xmms_flv_init (xmms_xform_t *xform) - { - xmms_sample_format_t bps; -- gint readret; -+ gint readret, i; - guint8 channels, flags, format; -- guint8 header[FLV_TAG_SIZE + 5]; -- const gchar *mime; -+ guint8 header[FLV_TAG_SIZE + 1]; - guint32 dataoffset, samplerate; - xmms_error_t err; - xmms_flv_data_t *flvdata; -+ struct xmms_flv_codec_table *codec = NULL; -+ -+ flvdata = g_new0 (xmms_flv_data_t, 1); -+ xmms_xform_private_data_set (xform, flvdata); - - readret = xmms_xform_read (xform, header, FLV_HDR_SIZE, &err); - if (readret != FLV_HDR_SIZE) { - xmms_log_error ("Header read error"); -- return FALSE; -+ goto init_err; - } - - if ((header[4] & HAS_AUDIO) != HAS_AUDIO) { - xmms_log_error ("FLV has no audio stream"); -- return FALSE; -+ goto init_err; - } - - dataoffset = get_be32 (&header[5]) - FLV_HDR_SIZE; -@@ -140,7 +155,7 @@ xmms_flv_init (xmms_xform_t *xform) - dataoffset : FLV_HDR_SIZE, &err); - if (readret <= 0) { - xmms_log_error ("Error reading header:tag body gap"); -- return FALSE; -+ goto init_err; - } - - dataoffset -= readret; -@@ -148,86 +163,99 @@ xmms_flv_init (xmms_xform_t *xform) - - if (next_audio_tag (xform) <= 0) { - xmms_log_error ("Can't find first audio tag"); -- return FALSE; -+ goto init_err; - } - -- if (xmms_xform_peek (xform, header, FLV_TAG_SIZE + 5, &err) < FLV_TAG_SIZE + 5) { -+ if (xmms_xform_read (xform, header, FLV_TAG_SIZE + 1, &err) < FLV_TAG_SIZE + 1) { - xmms_log_error ("Can't read first audio tag"); -- return FALSE; -+ goto init_err; - } - -- flags = header[FLV_TAG_SIZE + 4]; -+ flags = header[11]; - XMMS_DBG ("Audio flags: %X", flags); - -- switch (flags&12) { -- case 0: samplerate = 5512; break; -- case 4: samplerate = 11025; break; -- case 8: samplerate = 22050; break; -- case 12: samplerate = 44100; break; -- default: samplerate = 8000; break; -+ format = flags >> 4; -+ for (i = 0; i < G_N_ELEMENTS (flv_codecs); i++) { -+ if (flv_codecs[i].id == format) { -+ codec = &flv_codecs[i]; -+ break; -+ } - } - -- if (flags&2) { -- bps = XMMS_SAMPLE_FORMAT_S16; -+ if (flags & 1) { -+ channels = 2; - } else { -- bps = XMMS_SAMPLE_FORMAT_U8; -+ channels = 1; - } - -- if (flags&1) { -- channels = 2; -+ if (flags & 2) { -+ bps = XMMS_SAMPLE_FORMAT_S16; - } else { -- channels = 1; -+ bps = XMMS_SAMPLE_FORMAT_U8; - } - -- format = flags >> 4; -- mime = (format <= 10)? fmt_mime[format] : NULL; -- switch (format) { -- case 0: -- /* If the flv has an HE PCM audio stream, the -- * samples must be unsigned and 8 bits long -- */ -- if (bps != XMMS_SAMPLE_FORMAT_U8) { -- xmms_log_error ("Only u8 HE PCM is supported"); -- return FALSE; -- } -- break; -- case 3: -- if (bps == XMMS_SAMPLE_FORMAT_S16) { -- mime = mime_pcm_s16le; -- } -- break; -+ switch ((flags & 12) >> 2) { -+ case 0: samplerate = 5512; break; -+ case 1: samplerate = 11025; break; -+ case 2: samplerate = 22050; break; -+ case 3: samplerate = 44100; break; -+ default: samplerate = 8000; break; - } - -- if (mime && *mime) { -- flvdata = g_new0 (xmms_flv_data_t, 1); -+ if (codec) { -+ switch (codec->id) { -+ case CODEC_PCM_HOST: -+ if (bps != XMMS_SAMPLE_FORMAT_U8) { -+ xmms_log_error ("Only u8 HE PCM is supported"); -+ goto init_err; -+ } -+ break; -+ case CODEC_PCM_LE: -+ if (bps == XMMS_SAMPLE_FORMAT_S16) { -+ codec->mime = "audio/x-ffmpeg-pcm_s16le"; -+ } -+ break; -+ case CODEC_NELLYMOSER_16K: -+ samplerate = 16000; -+ break; -+ case CODEC_NELLYMOSER_8K: -+ samplerate = 8000; -+ break; -+ default: -+ break; -+ } -+ - flvdata->format = format; -+ flvdata->last_datasize = get_be24 (&header[1]) - 1; - - XMMS_DBG ("Rate: %d, bps: %d, channels: %d", samplerate, - bps, channels); - -- xmms_xform_private_data_set (xform, flvdata); - xmms_xform_outdata_type_add (xform, - XMMS_STREAM_TYPE_MIMETYPE, -- mime, -- XMMS_STREAM_TYPE_FMT_SAMPLERATE, -- samplerate, -- XMMS_STREAM_TYPE_FMT_FORMAT, -- bps, -- XMMS_STREAM_TYPE_FMT_CHANNELS, -- channels, -- XMMS_STREAM_TYPE_END); -+ codec->mime, -+ XMMS_STREAM_TYPE_FMT_SAMPLERATE, -+ samplerate, -+ XMMS_STREAM_TYPE_FMT_FORMAT, -+ bps, -+ XMMS_STREAM_TYPE_FMT_CHANNELS, -+ channels, -+ XMMS_STREAM_TYPE_END); - return TRUE; - } else { - xmms_log_error ("Unsupported audio format"); -- return FALSE; - } -+ -+init_err: -+ g_free (flvdata); -+ return FALSE; - } - - static gint - xmms_flv_read (xmms_xform_t *xform, xmms_sample_t *buf, gint len, xmms_error_t *err) - { -- gint ret = 0, thismuch = FLV_TAG_SIZE + 5; -- guint8 header[FLV_TAG_SIZE + 6], gap = 1; -+ gint ret = 0, thismuch = FLV_TAG_SIZE + 1; -+ guint8 header[FLV_TAG_SIZE + 1]; - xmms_flv_data_t *data = NULL; - - data = xmms_xform_private_data_get (xform); -@@ -236,12 +264,8 @@ xmms_flv_read (xmms_xform_t *xform, xmms_sample_t *buf, gint len, xmms_error_t * - xmms_xform_auxdata_barrier (xform); - ret = next_audio_tag (xform); - if (ret > 0) { -- if (data->format == 10) { -- thismuch++; -- gap++; -- } - if (xmms_xform_read (xform, header, thismuch, err) == thismuch) { -- data->last_datasize = get_be24 (&header[5]) - gap; -+ data->last_datasize = get_be24 (&header[1]) - 1; - } else { - xmms_log_error ("Need %d bytes", thismuch); - return -1; -@@ -280,40 +304,51 @@ xmms_flv_destroy (xmms_xform_t *xform) - static gint - next_audio_tag (xmms_xform_t *xform) - { -- guint8 header[FLV_TAG_SIZE + 4]; -+ guint8 header[FLV_TAG_SIZE]; - guint8 dumb[FLV_CHUNK_SIZE]; - gint ret = 0; - xmms_error_t err; -- guint32 datasize = 0; -+ xmms_flv_data_t *data; -+ -+ data = xmms_xform_private_data_get (xform); - - do { -- /* there's a last 4 bytes at the end of an FLV giving the final -- * tag's size, this isn't an error -- */ -- ret = xmms_xform_peek (xform, header, FLV_TAG_SIZE + 4, &err); -- if ((ret < FLV_TAG_SIZE) && (ret > -1)) { -- ret = 0; -- break; -- } else if (ret == -1) { -- xmms_log_error ("%s", xmms_error_message_get (&err)); -- break; -- } -+ /* If > 0 assume we're in the middle of a tag's data */ -+ if (!data->last_datasize) { -+ /* There are 4 bytes before an actual tag giving -+ the previous tag's size. The first size in an -+ flv is always 0. -+ */ -+ if (xmms_xform_read (xform, header, 4, &err) != 4) { -+ xmms_log_error ("Couldn't read last tag size"); -+ return -1; -+ } - -- if (header[4] == 8) { -- /* woo audio tag! */ -- break; -- } -+ ret = xmms_xform_peek (xform, header, FLV_TAG_SIZE, &err); -+ if ((ret < FLV_TAG_SIZE) && (ret > -1)) { -+ return 0; -+ } else if (ret == -1) { -+ xmms_log_error ("%s", xmms_error_message_get (&err)); -+ return ret; -+ } -+ -+ if (header[0] == 8) { -+ /* woo audio tag! */ -+ break; -+ } - -- ret = xmms_xform_read (xform, header, FLV_TAG_SIZE + 4, &err); -- if (ret <= 0) { return ret; } -+ if ((ret = xmms_xform_read (xform, header, FLV_TAG_SIZE, &err)) <= 0) { -+ return ret; -+ } - -- datasize = get_be24 (&header[5]); -+ data->last_datasize = get_be24 (&header[1]); -+ } - -- while (datasize) { -+ while (data->last_datasize) { - ret = xmms_xform_read (xform, dumb, -- (datasize < FLV_CHUNK_SIZE) ? -- datasize : FLV_CHUNK_SIZE, -- &err); -+ (data->last_datasize < FLV_CHUNK_SIZE) ? -+ data->last_datasize : FLV_CHUNK_SIZE, -+ &err); - if (ret == 0) { - xmms_log_error ("Data field short!"); - break; -@@ -323,7 +358,7 @@ next_audio_tag (xmms_xform_t *xform) - break; - } - -- datasize -= ret; -+ data->last_datasize -= ret; - } - - } while (ret); diff --git a/media-sound/xmms2/files/xmms2-0.8-audio4-p4.patch b/media-sound/xmms2/files/xmms2-0.8-audio4-p4.patch deleted file mode 100644 index 552f202df19d..000000000000 --- a/media-sound/xmms2/files/xmms2-0.8-audio4-p4.patch +++ /dev/null @@ -1,296 +0,0 @@ -commit 4198d9bf5dff517740ed51b22313367f156107e1 -Author: Erik Massop -Date: Sun Dec 22 17:19:30 2013 +0100 - - OTHER: Split xmms_avcodec_read, remove some duplicate code - -diff --git a/src/plugins/avcodec/avcodec.c b/src/plugins/avcodec/avcodec.c -index 5b9b606..eed7964 100644 ---- a/src/plugins/avcodec/avcodec.c -+++ b/src/plugins/avcodec/avcodec.c -@@ -57,6 +57,9 @@ typedef struct { - static gboolean xmms_avcodec_plugin_setup (xmms_xform_plugin_t *xform_plugin); - static gboolean xmms_avcodec_init (xmms_xform_t *xform); - static void xmms_avcodec_destroy (xmms_xform_t *xform); -+static gint xmms_avcodec_internal_read_some (xmms_xform_t *xform, xmms_avcodec_data_t *data, xmms_error_t *error); -+static gint xmms_avcodec_internal_decode_some (xmms_avcodec_data_t *data); -+static void xmms_avcodec_internal_append (xmms_avcodec_data_t *data); - static gint xmms_avcodec_read (xmms_xform_t *xform, xmms_sample_t *buf, gint len, - xmms_error_t *error); - static gint64 xmms_avcodec_seek (xmms_xform_t *xform, gint64 samples, -@@ -281,101 +284,24 @@ xmms_avcodec_read (xmms_xform_t *xform, xmms_sample_t *buf, gint len, - xmms_error_t *error) - { - xmms_avcodec_data_t *data; -- gint bytes_read = 0; - guint size; - - data = xmms_xform_private_data_get (xform); - g_return_val_if_fail (data, -1); - -- size = MIN (data->outbuf->len, len); -- while (size == 0) { -- AVPacket packet; -- av_init_packet (&packet); -+ while (0 == (size = MIN (data->outbuf->len, len))) { -+ gint res; - - if (data->no_demuxer || data->buffer_length == 0) { -- gint read_total; -- -- bytes_read = xmms_xform_read (xform, -- (gchar *) (data->buffer + data->buffer_length), -- data->buffer_size - data->buffer_length, -- error); -- -- if (bytes_read < 0) { -- XMMS_DBG ("Error while reading data"); -- return bytes_read; -- } else if (bytes_read == 0) { -- XMMS_DBG ("EOF"); -- return 0; -- } -- -- read_total = bytes_read; -- -- /* If we have a demuxer plugin, make sure we read the whole packet */ -- while (read_total == data->buffer_size && !data->no_demuxer) { -- /* multiply the buffer size and try to read again */ -- data->buffer = g_realloc (data->buffer, data->buffer_size * 2); -- bytes_read = xmms_xform_read (xform, -- (gchar *) data->buffer + -- data->buffer_size, -- data->buffer_size, -- error); -- data->buffer_size *= 2; -- -- if (bytes_read < 0) { -- XMMS_DBG ("Error while reading data"); -- return bytes_read; -- } -- -- read_total += bytes_read; -- -- if (read_total < data->buffer_size) { -- /* finally double the buffer size for performance reasons, the -- * hotspot handling likes to fit two frames in the buffer */ -- data->buffer = g_realloc (data->buffer, data->buffer_size * 2); -- data->buffer_size *= 2; -- XMMS_DBG ("Reallocated avcodec internal buffer to be %d bytes", -- data->buffer_size); -- -- break; -- } -- } -- -- /* Update the buffer length */ -- data->buffer_length += read_total; -- } -- -- packet.data = data->buffer; -- packet.size = data->buffer_length; -- -- data->read_out_buffer_size = AVCODEC_MAX_AUDIO_FRAME_SIZE; -- bytes_read = avcodec_decode_audio3 (data->codecctx, (short *) data->read_out_buffer, -- &data->read_out_buffer_size, &packet); -+ gint bytes_read; - -- /* The DTS decoder of ffmpeg is buggy and always returns -- * the input buffer length, get frame length from header */ -- if (!strcmp (data->codec_id, "dca") && bytes_read > 0) { -- bytes_read = ((int)data->buffer[5] << 12) | -- ((int)data->buffer[6] << 4) | -- ((int)data->buffer[7] >> 4); -- bytes_read = (bytes_read & 0x3fff) + 1; -+ bytes_read = xmms_avcodec_internal_read_some (xform, data, error); -+ if (bytes_read <= 0) { return bytes_read; } - } - -- if (bytes_read < 0 || bytes_read > data->buffer_length) { -- XMMS_DBG ("Error decoding data!"); -- return -1; -- } else if (bytes_read != data->buffer_length) { -- g_memmove (data->buffer, -- data->buffer + bytes_read, -- data->buffer_length - bytes_read); -- } -- -- data->buffer_length -= bytes_read; -- -- if (data->read_out_buffer_size > 0) { -- g_string_append_len (data->outbuf, data->read_out_buffer, data->read_out_buffer_size); -- } -- -- size = MIN (data->outbuf->len, len); -+ res = xmms_avcodec_internal_decode_some (data); -+ if (res < 0) { return res; } -+ if (res > 0) { xmms_avcodec_internal_append (data); } - } - - memcpy (buf, data->outbuf->str, size); -@@ -388,7 +314,6 @@ static gint64 - xmms_avcodec_seek (xmms_xform_t *xform, gint64 samples, xmms_xform_seek_mode_t whence, xmms_error_t *err) - { - xmms_avcodec_data_t *data; -- gint bytes_read = 0; - gint64 ret = -1; - - g_return_val_if_fail (xform, -1); -@@ -406,23 +331,11 @@ xmms_avcodec_seek (xmms_xform_t *xform, gint64 samples, xmms_xform_seek_mode_t w - - /* The buggy ape decoder doesn't flush buffers, so we need to finish decoding - * the frame before seeking to avoid segfaults... this hack sucks */ -+ /* FIXME: Is ^^^ still true? */ - while (data->buffer_length > 0) { -- AVPacket packet; -- av_init_packet (&packet); -- packet.data = data->buffer; -- packet.size = data->buffer_length; -- -- data->read_out_buffer_size = AVCODEC_MAX_AUDIO_FRAME_SIZE; -- bytes_read = avcodec_decode_audio3 (data->codecctx, (short *) data->read_out_buffer, -- &data->read_out_buffer_size, &packet); -- -- if (bytes_read < 0 || bytes_read > data->buffer_length) { -- XMMS_DBG ("Error decoding data!"); -+ if (xmms_avcodec_internal_decode_some (data) < 0) { - return -1; - } -- -- data->buffer_length -= bytes_read; -- g_memmove (data->buffer, data->buffer + bytes_read, data->buffer_length); - } - - ret = xmms_xform_seek (xform, samples, whence, err); -@@ -456,3 +369,131 @@ xmms_avcodec_translate_sample_format (enum AVSampleFormat av_sample_format) - return XMMS_SAMPLE_FORMAT_UNKNOWN; - } - } -+ -+/* -+Read some data from our source of data to data->buffer, updating buffer_length -+and buffer_size as needed. -+ -+Returns: on error: negative -+ on EOF: zero -+ otherwise: number of bytes read. -+*/ -+static gint -+xmms_avcodec_internal_read_some (xmms_xform_t *xform, -+ xmms_avcodec_data_t *data, -+ xmms_error_t *error) -+{ -+ gint bytes_read, read_total; -+ -+ bytes_read = xmms_xform_read (xform, -+ (gchar *) (data->buffer + data->buffer_length), -+ data->buffer_size - data->buffer_length, -+ error); -+ -+ if (bytes_read < 0) { -+ XMMS_DBG ("Error while reading data"); -+ return bytes_read; -+ } else if (bytes_read == 0) { -+ XMMS_DBG ("EOF"); -+ return 0; -+ } -+ -+ read_total = bytes_read; -+ -+ /* If we have a demuxer plugin, make sure we read the whole packet */ -+ while (read_total == data->buffer_size && !data->no_demuxer) { -+ /* multiply the buffer size and try to read again */ -+ data->buffer = g_realloc (data->buffer, data->buffer_size * 2); -+ bytes_read = xmms_xform_read (xform, -+ (gchar *) data->buffer + -+ data->buffer_size, -+ data->buffer_size, -+ error); -+ data->buffer_size *= 2; -+ -+ if (bytes_read < 0) { -+ XMMS_DBG ("Error while reading data"); -+ return bytes_read; -+ } -+ -+ read_total += bytes_read; -+ -+ if (read_total < data->buffer_size) { -+ /* finally double the buffer size for performance reasons, the -+ * hotspot handling likes to fit two frames in the buffer */ -+ data->buffer = g_realloc (data->buffer, data->buffer_size * 2); -+ data->buffer_size *= 2; -+ XMMS_DBG ("Reallocated avcodec internal buffer to be %d bytes", -+ data->buffer_size); -+ -+ break; -+ } -+ } -+ -+ /* Update the buffer length */ -+ data->buffer_length += read_total; -+ -+ return read_total; -+} -+ -+/* -+Decode some data from data->buffer[0..data->buffer_length-1] to -+data->read_out_buffer. Number of bytes in data->read_out_buffer -+is stored in data->read_out_buffer_size. -+ -+Returns: on error: negative -+ on no new data produced: zero -+ otherwise: positive -+ -+FIXME: data->buffer should be at least data->buffer_length + -+FF_INPUT_BUFFER_PADDING_SIZE long. -+*/ -+static gint -+xmms_avcodec_internal_decode_some (xmms_avcodec_data_t *data) -+{ -+ gint bytes_read = 0; -+ AVPacket packet; -+ -+ av_init_packet (&packet); -+ packet.data = data->buffer; -+ packet.size = data->buffer_length; -+ -+ data->read_out_buffer_size = AVCODEC_MAX_AUDIO_FRAME_SIZE; -+ bytes_read = avcodec_decode_audio3 (data->codecctx, -+ (short *) data->read_out_buffer, -+ &data->read_out_buffer_size, &packet); -+ -+ /* The DTS decoder of ffmpeg is buggy and always returns -+ * the input buffer length, get frame length from header */ -+ /* FIXME: Is ^^^^ still true? */ -+ if (!strcmp (data->codec_id, "dca") && bytes_read > 0) { -+ bytes_read = ((int)data->buffer[5] << 12) | -+ ((int)data->buffer[6] << 4) | -+ ((int)data->buffer[7] >> 4); -+ bytes_read = (bytes_read & 0x3fff) + 1; -+ } -+ -+ if (bytes_read < 0 || bytes_read > data->buffer_length) { -+ XMMS_DBG ("Error decoding data!"); -+ return -1; -+ } -+ -+ if (bytes_read < data->buffer_length) { -+ data->buffer_length -= bytes_read; -+ g_memmove (data->buffer, -+ data->buffer + bytes_read, -+ data->buffer_length); -+ } else { -+ data->buffer_length = 0; -+ } -+ -+ return data->read_out_buffer_size; -+} -+ -+static void -+xmms_avcodec_internal_append (xmms_avcodec_data_t *data) -+{ -+ g_string_append_len (data->outbuf, -+ (gchar *) data->read_out_buffer, -+ data->read_out_buffer_size); -+} diff --git a/media-sound/xmms2/files/xmms2-0.8-audio4-p5.patch b/media-sound/xmms2/files/xmms2-0.8-audio4-p5.patch deleted file mode 100644 index 8ed5bb4a24a5..000000000000 --- a/media-sound/xmms2/files/xmms2-0.8-audio4-p5.patch +++ /dev/null @@ -1,154 +0,0 @@ -commit d44312fb14bde0ab47ee6de1b3fe7435d4a97c99 -Author: Erik Massop -Date: Sun Dec 22 20:01:18 2013 +0100 - - BUG(2572): Use avcodec_decode_audio4 - -diff --git a/src/plugins/avcodec/avcodec.c b/src/plugins/avcodec/avcodec.c -index 266a607..a41a675 100644 ---- a/src/plugins/avcodec/avcodec.c -+++ b/src/plugins/avcodec/avcodec.c -@@ -37,8 +37,7 @@ typedef struct { - guint buffer_size; - gboolean no_demuxer; - -- gchar *read_out_buffer; -- gint read_out_buffer_size; -+ AVFrame *read_out_frame; - - guint channels; - guint samplerate; -@@ -125,7 +124,7 @@ xmms_avcodec_destroy (xmms_xform_t *xform) - - avcodec_close (data->codecctx); - av_free (data->codecctx); -- av_free (data->read_out_buffer); -+ avcodec_free_frame (&data->read_out_frame); - - g_string_free (data->outbuf, TRUE); - g_free (data->buffer); -@@ -151,8 +150,7 @@ xmms_avcodec_init (xmms_xform_t *xform) - data->buffer_size = AVCODEC_BUFFER_SIZE; - data->codecctx = NULL; - -- data->read_out_buffer = av_malloc (AVCODEC_MAX_AUDIO_FRAME_SIZE); -- data->read_out_buffer_size = AVCODEC_MAX_AUDIO_FRAME_SIZE; -+ data->read_out_frame = avcodec_alloc_frame (); - - xmms_xform_private_data_set (xform, data); - -@@ -233,6 +231,7 @@ xmms_avcodec_init (xmms_xform_t *xform) - data->codecctx->extradata_size = data->extradata_size; - data->codecctx->codec_id = codec->id; - data->codecctx->codec_type = codec->type; -+ data->codecctx->refcounted_frames = 0; - - if (avcodec_open2 (data->codecctx, codec, NULL) < 0) { - XMMS_DBG ("Opening decoder '%s' failed", codec->name); -@@ -279,8 +278,8 @@ err: - if (data->codecctx) { - av_free (data->codecctx); - } -- if (data->read_out_buffer) { -- av_free (data->read_out_buffer); -+ if (data->read_out_frame) { -+ avcodec_free_frame (&data->read_out_frame); - } - g_string_free (data->outbuf, TRUE); - g_free (data->extradata); -@@ -365,17 +364,23 @@ xmms_avcodec_translate_sample_format (enum AVSampleFormat av_sample_format) - { - switch (av_sample_format) { - case AV_SAMPLE_FMT_U8: -+ case AV_SAMPLE_FMT_U8P: - return XMMS_SAMPLE_FORMAT_U8; - case AV_SAMPLE_FMT_S16: -+ case AV_SAMPLE_FMT_S16P: - return XMMS_SAMPLE_FORMAT_S16; - case AV_SAMPLE_FMT_S32: -+ case AV_SAMPLE_FMT_S32P: - return XMMS_SAMPLE_FORMAT_S32; - case AV_SAMPLE_FMT_FLT: -+ case AV_SAMPLE_FMT_FLTP: - return XMMS_SAMPLE_FORMAT_FLOAT; - case AV_SAMPLE_FMT_DBL: -+ case AV_SAMPLE_FMT_DBLP: - return XMMS_SAMPLE_FORMAT_DOUBLE; - default: -- XMMS_DBG ("AVSampleFormat (%i) not supported.", av_sample_format); -+ XMMS_DBG ("AVSampleFormat (%i: %s) not supported.", av_sample_format, -+ av_get_sample_fmt_name (av_sample_format)); - return XMMS_SAMPLE_FORMAT_UNKNOWN; - } - } -@@ -448,8 +453,7 @@ xmms_avcodec_internal_read_some (xmms_xform_t *xform, - - /* - Decode some data from data->buffer[0..data->buffer_length-1] to --data->read_out_buffer. Number of bytes in data->read_out_buffer --is stored in data->read_out_buffer_size. -+data->read_out_frame - - Returns: on error: negative - on no new data produced: zero -@@ -461,6 +465,7 @@ FF_INPUT_BUFFER_PADDING_SIZE long. - static gint - xmms_avcodec_internal_decode_some (xmms_avcodec_data_t *data) - { -+ int got_frame = 0; - gint bytes_read = 0; - AVPacket packet; - -@@ -468,10 +473,10 @@ xmms_avcodec_internal_decode_some (xmms_avcodec_data_t *data) - packet.data = data->buffer; - packet.size = data->buffer_length; - -- data->read_out_buffer_size = AVCODEC_MAX_AUDIO_FRAME_SIZE; -- bytes_read = avcodec_decode_audio3 (data->codecctx, -- (short *) data->read_out_buffer, -- &data->read_out_buffer_size, &packet); -+ avcodec_get_frame_defaults (data->read_out_frame); -+ -+ bytes_read = avcodec_decode_audio4 ( -+ data->codecctx, data->read_out_frame, &got_frame, &packet); - - /* The DTS decoder of ffmpeg is buggy and always returns - * the input buffer length, get frame length from header */ -@@ -497,13 +502,33 @@ xmms_avcodec_internal_decode_some (xmms_avcodec_data_t *data) - data->buffer_length = 0; - } - -- return data->read_out_buffer_size; -+ return got_frame ? 1 : 0; - } - - static void - xmms_avcodec_internal_append (xmms_avcodec_data_t *data) - { -- g_string_append_len (data->outbuf, -- (gchar *) data->read_out_buffer, -- data->read_out_buffer_size); -+ enum AVSampleFormat fmt = (enum AVSampleFormat) data->read_out_frame->format; -+ int samples = data->read_out_frame->nb_samples; -+ int channels = data->codecctx->channels; -+ int bps = av_get_bytes_per_sample (fmt); -+ -+ if (av_sample_fmt_is_planar (fmt)) { -+ /* Convert from planar to packed format */ -+ gint i, j; -+ -+ for (i = 0; i < samples; i++) { -+ for (j = 0; j < channels; j++) { -+ g_string_append_len ( -+ data->outbuf, -+ (gchar *) (data->read_out_frame->extended_data[j] + i*bps), -+ bps -+ ); -+ } -+ } -+ } else { -+ g_string_append_len (data->outbuf, -+ (gchar *) data->read_out_frame->extended_data[0], -+ samples * channels * bps); -+ } - } diff --git a/media-sound/xmms2/files/xmms2-0.8-audio4-p6.patch b/media-sound/xmms2/files/xmms2-0.8-audio4-p6.patch deleted file mode 100644 index b1bc1c5d609b..000000000000 --- a/media-sound/xmms2/files/xmms2-0.8-audio4-p6.patch +++ /dev/null @@ -1,106 +0,0 @@ -commit fc66249e69f53eef709c5210546fdd92e1c89554 -Author: Erik Massop -Date: Sun Dec 22 23:04:08 2013 +0100 - - OTHER: Some compatibility with different avcodec versions - -diff --git a/src/plugins/avcodec/avcodec.c b/src/plugins/avcodec/avcodec.c -index a41a675..023833d 100644 ---- a/src/plugins/avcodec/avcodec.c -+++ b/src/plugins/avcodec/avcodec.c -@@ -124,7 +124,7 @@ xmms_avcodec_destroy (xmms_xform_t *xform) - - avcodec_close (data->codecctx); - av_free (data->codecctx); -- avcodec_free_frame (&data->read_out_frame); -+ av_frame_free (&data->read_out_frame); - - g_string_free (data->outbuf, TRUE); - g_free (data->buffer); -@@ -150,7 +150,7 @@ xmms_avcodec_init (xmms_xform_t *xform) - data->buffer_size = AVCODEC_BUFFER_SIZE; - data->codecctx = NULL; - -- data->read_out_frame = avcodec_alloc_frame (); -+ data->read_out_frame = av_frame_alloc (); - - xmms_xform_private_data_set (xform, data); - -@@ -231,7 +231,6 @@ xmms_avcodec_init (xmms_xform_t *xform) - data->codecctx->extradata_size = data->extradata_size; - data->codecctx->codec_id = codec->id; - data->codecctx->codec_type = codec->type; -- data->codecctx->refcounted_frames = 0; - - if (avcodec_open2 (data->codecctx, codec, NULL) < 0) { - XMMS_DBG ("Opening decoder '%s' failed", codec->name); -@@ -473,7 +472,8 @@ xmms_avcodec_internal_decode_some (xmms_avcodec_data_t *data) - packet.data = data->buffer; - packet.size = data->buffer_length; - -- avcodec_get_frame_defaults (data->read_out_frame); -+ /* clear buffers and reset fields to defaults */ -+ av_frame_unref (data->read_out_frame); - - bytes_read = avcodec_decode_audio4 ( - data->codecctx, data->read_out_frame, &got_frame, &packet); -diff --git a/src/plugins/avcodec/avcodec_compat.h b/src/plugins/avcodec/avcodec_compat.h -index 73ac2ab..e74b3f8 100644 ---- a/src/plugins/avcodec/avcodec_compat.h -+++ b/src/plugins/avcodec/avcodec_compat.h -@@ -83,3 +83,17 @@ typedef struct AVPacket { - # define avcodec_open2(avctx, codec, options) \ - avcodec_open(avctx, codec) - #endif -+ -+/* Map avcodec_free_frame to av_freep if the former doesn't exist. -+ * (This is in versions earlier than 54.28.0 (libav) or 54.59.100 (ffmpeg)) */ -+#if ! HAVE_AVCODEC_FREE_FRAME -+# define avcodec_free_frame av_freep -+#endif -+ -+/* Map av_frame_alloc, av_frame_unref, av_frame_free into their -+ * deprecated versions in versions earlier than 55.28.1 */ -+#if LIBAVCODEC_VERSION_INT < 0x371c01 -+# define av_frame_alloc avcodec_alloc_frame -+# define av_frame_unref avcodec_get_frame_defaults -+# define av_frame_free avcodec_free_frame -+#endif -diff --git a/src/plugins/avcodec/wscript b/src/plugins/avcodec/wscript -index 03ba7d8..d367816 100644 ---- a/src/plugins/avcodec/wscript -+++ b/src/plugins/avcodec/wscript -@@ -1,10 +1,33 @@ - from waftools.plugin import plugin - -+## Code fragments for configuration -+avcodec_free_frame_fragment = """ -+#ifdef HAVE_LIBAVCODEC_AVCODEC_H -+# include "libavcodec/avcodec.h" -+#else -+# include "avcodec.h" -+#endif -+int main(void) { -+ AVFrame *frame; -+ -+ avcodec_free_frame (&frame); -+ -+ return 0; -+} -+""" -+ - def plugin_configure(conf): - conf.check_cfg(package="libavcodec", uselib_store="avcodec", - args="--cflags --libs") - conf.check_cc(header_name="avcodec.h", uselib="avcodec", type="cshlib", mandatory=False) - conf.check_cc(header_name="libavcodec/avcodec.h", uselib="avcodec", type="cshlib", mandatory=False) - -+ # non-mandatory function avcodec_free_frame since -+ # * ffmpeg: commit 46a3595, lavc 54.59.100, release 1.0 -+ # * libav: commit a42aada, lavc 54.28.0, release 9 -+ conf.check_cc(fragment=avcodec_free_frame_fragment, uselib="avcodec", -+ uselib_store="avcodec_free_frame", -+ msg="Checking for function avcodec_free_frame", mandatory=False) -+ - configure, build = plugin('avcodec', configure=plugin_configure, - libs=["avcodec"]) diff --git a/media-sound/xmms2/files/xmms2-0.8-audio4-p7.patch b/media-sound/xmms2/files/xmms2-0.8-audio4-p7.patch deleted file mode 100644 index 2d4bafd95a7d..000000000000 --- a/media-sound/xmms2/files/xmms2-0.8-audio4-p7.patch +++ /dev/null @@ -1,147 +0,0 @@ -commit f460440b3f2a9db1a9deef3faf7dae6e626dd7b5 -Author: Erik Massop -Date: Sun Dec 22 23:34:12 2013 +0100 - - OTHER: Require avcodec_decode_audio4 - - This was introduced in versions 53.40.0 (ffmpeg) and 53.25.0 (libav) of - avcodec. Hence we drop compatibility for earlier versions. - -diff --git a/src/plugins/avcodec/avcodec.c b/src/plugins/avcodec/avcodec.c -index 023833d..6d0b667 100644 ---- a/src/plugins/avcodec/avcodec.c -+++ b/src/plugins/avcodec/avcodec.c -@@ -154,7 +154,6 @@ xmms_avcodec_init (xmms_xform_t *xform) - - xmms_xform_private_data_set (xform, data); - -- avcodec_init (); - avcodec_register_all (); - - mimetype = xmms_xform_indata_get_str (xform, -@@ -225,7 +224,7 @@ xmms_avcodec_init (xmms_xform_t *xform) - data->codecctx->sample_rate = data->samplerate; - data->codecctx->channels = data->channels; - data->codecctx->bit_rate = data->bitrate; -- CONTEXT_BPS (data->codecctx) = data->samplebits; -+ data->codecctx->bits_per_coded_sample = data->samplebits; - data->codecctx->block_align = data->block_align; - data->codecctx->extradata = data->extradata; - data->codecctx->extradata_size = data->extradata_size; -diff --git a/src/plugins/avcodec/avcodec_compat.h b/src/plugins/avcodec/avcodec_compat.h -index e74b3f8..b50fa4b 100644 ---- a/src/plugins/avcodec/avcodec_compat.h -+++ b/src/plugins/avcodec/avcodec_compat.h -@@ -21,69 +21,6 @@ - # include "avcodec.h" - #endif - --/* Map avcodec_decode_audio2 into the deprecated version -- * avcodec_decode_audio in versions earlier than 51.28 */ --#if LIBAVCODEC_VERSION_INT < 0x331c00 --# define avcodec_decode_audio2 avcodec_decode_audio --#endif -- --/* Handle API change that happened in libavcodec 52.00 */ --#if LIBAVCODEC_VERSION_INT < 0x340000 --# define CONTEXT_BPS(codecctx) (codecctx)->bits_per_sample --#else --# define CONTEXT_BPS(codecctx) (codecctx)->bits_per_coded_sample --#endif -- --/* Before 52.23 AVPacket was defined in avformat.h which we -- * do not want to depend on, so we define part of it manually -- * on versions smaller than 52.23 (this makes me cry) */ --#if LIBAVCODEC_VERSION_INT < 0x341700 --typedef struct AVPacket { -- uint8_t *data; -- int size; --} AVPacket; --#endif -- --/* Same thing as above for av_init_packet and version 52.25 */ --#if LIBAVCODEC_VERSION_INT < 0x341900 --# define av_init_packet(pkt) do { \ -- (pkt)->data = NULL; \ -- (pkt)->size = 0; \ -- } while(0) --#endif -- --/* Map avcodec_decode_audio3 into the deprecated version -- * avcodec_decode_audio2 in versions earlier than 52.26 */ --#if LIBAVCODEC_VERSION_INT < 0x341a00 --# define avcodec_decode_audio3(avctx, samples, frame_size_ptr, avpkt) \ -- avcodec_decode_audio2(avctx, samples, frame_size_ptr, \ -- (avpkt)->data, (avpkt)->size) --#endif -- --/* Handle API change that happened in libavcodec 52.64 */ --#if LIBAVCODEC_VERSION_INT < 0x344000 --# define AVMEDIA_TYPE_AUDIO CODEC_TYPE_AUDIO --#endif -- --/* Calling avcodec_init is not necessary after 53.04 (ffmpeg 0.9) */ --#if LIBAVCODEC_VERSION_INT >= 0x350400 --# define avcodec_init() --#endif -- --/* Map avcodec_alloc_context3 into the deprecated version -- * avcodec_alloc_context in versions earlier than 53.04 (ffmpeg 0.9) */ --#if LIBAVCODEC_VERSION_INT < 0x350400 --# define avcodec_alloc_context3(codec) \ -- avcodec_alloc_context() --#endif -- --/* Map avcodec_open2 into the deprecated version -- * avcodec_open in versions earlier than 53.04 (ffmpeg 0.9) */ --#if LIBAVCODEC_VERSION_INT < 0x350400 --# define avcodec_open2(avctx, codec, options) \ -- avcodec_open(avctx, codec) --#endif -- - /* Map avcodec_free_frame to av_freep if the former doesn't exist. - * (This is in versions earlier than 54.28.0 (libav) or 54.59.100 (ffmpeg)) */ - #if ! HAVE_AVCODEC_FREE_FRAME -diff --git a/src/plugins/avcodec/wscript b/src/plugins/avcodec/wscript -index d367816..00b182b 100644 ---- a/src/plugins/avcodec/wscript -+++ b/src/plugins/avcodec/wscript -@@ -1,6 +1,24 @@ - from waftools.plugin import plugin - - ## Code fragments for configuration -+avcodec_decode_audio4_fragment = """ -+#ifdef HAVE_LIBAVCODEC_AVCODEC_H -+# include "libavcodec/avcodec.h" -+#else -+# include "avcodec.h" -+#endif -+int main(void) { -+ AVCodecContext *ctx; -+ AVFrame *frame; -+ int got_frame; -+ AVPacket *pkt; -+ -+ avcodec_decode_audio4 (ctx, frame, &got_frame, pkt); -+ -+ return 0; -+} -+""" -+ - avcodec_free_frame_fragment = """ - #ifdef HAVE_LIBAVCODEC_AVCODEC_H - # include "libavcodec/avcodec.h" -@@ -22,6 +40,13 @@ def plugin_configure(conf): - conf.check_cc(header_name="avcodec.h", uselib="avcodec", type="cshlib", mandatory=False) - conf.check_cc(header_name="libavcodec/avcodec.h", uselib="avcodec", type="cshlib", mandatory=False) - -+ # mandatory function avcodec_decode_audio4 available since -+ # * ffmpeg: commit e4de716, lavc 53.40.0, release 0.9 -+ # * libav: commit 0eea212, lavc 53.25.0, release 0.8 -+ conf.check_cc(fragment=avcodec_decode_audio4_fragment, uselib="avcodec", -+ uselib_store="avcodec_decode_audio4", -+ msg="Checking for function avcodec_decode_audio4", mandatory=True) -+ - # non-mandatory function avcodec_free_frame since - # * ffmpeg: commit 46a3595, lavc 54.59.100, release 1.0 - # * libav: commit a42aada, lavc 54.28.0, release 9 diff --git a/media-sound/xmms2/files/xmms2-0.8-cpython.patch b/media-sound/xmms2/files/xmms2-0.8-cpython.patch deleted file mode 100644 index 58227ba5db85..000000000000 --- a/media-sound/xmms2/files/xmms2-0.8-cpython.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff --git a/src/clients/lib/python/cython_include/cxmmsclient.pxd b/src/clients/lib/python/cython_include/cxmmsclient.pxd -index 66390a7..629bc7f 100644 ---- a/src/clients/lib/python/cython_include/cxmmsclient.pxd -+++ b/src/clients/lib/python/cython_include/cxmmsclient.pxd -@@ -30,3 +30,3 @@ cdef extern from "xmmsc/xmmsc_idnumbers.h": - -- ctypedef enum xmmsc_collection_changed_actions_t: -+ ctypedef enum xmms_collection_changed_actions_t: - XMMS_COLLECTION_CHANGED_ADD diff --git a/media-sound/xmms2/files/xmms2-0.8-cython-0.19.1.patch b/media-sound/xmms2/files/xmms2-0.8-cython-0.19.1.patch deleted file mode 100644 index 1d6e59f6c830..000000000000 --- a/media-sound/xmms2/files/xmms2-0.8-cython-0.19.1.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 6d6d7a7ee38c8e3f57242f2510e06a03f4e7e249 Mon Sep 17 00:00:00 2001 -From: Sergei Trofimovich -Date: Mon, 5 Aug 2013 22:29:46 +0300 -Subject: [PATCH] unbreak xmms2 building on cython-0.19.1 - -Error compiling Cython file: ------------------------------------------------------------- -... - def medialib_path_import(self, path, cb = None, encoded=False): - """ - @deprecated - Use medialib_import_path(path, ...) instead - """ - return self.medialib_import_path(self, path, cb=cb, encoded=encoded) - ^ - -Reported-by: ChunFeng -Signed-off-by: Sergei Trofimovich ---- - src/clients/lib/python/xmmsapi.pyx | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/clients/lib/python/xmmsapi.pyx b/src/clients/lib/python/xmmsapi.pyx -index 501a068..863db88 100644 ---- a/src/clients/lib/python/xmmsapi.pyx -+++ b/src/clients/lib/python/xmmsapi.pyx -@@ -1364,7 +1364,7 @@ cdef class XmmsApi(XmmsCore): - @deprecated - Use medialib_import_path(path, ...) instead - """ -- return self.medialib_import_path(self, path, cb=cb, encoded=encoded) -+ return self.medialib_import_path(path, cb=cb, encoded=encoded) - - @deprecated - def medialib_path_import_encoded(self, path, cb = None): -@@ -1372,7 +1372,7 @@ cdef class XmmsApi(XmmsCore): - @deprecated - Use medialib_import_path(path, ..., encoded=True) instead - """ -- return self.medialib_import_path(self, path, cb=cb, encoded=True) -+ return self.medialib_import_path(path, cb=cb, encoded=True) - - cpdef XmmsResult medialib_property_set(self, int id, key, value, source=None, cb=None): - """ --- -1.8.3.2 - diff --git a/media-sound/xmms2/files/xmms2-0.8-ffmpeg-0.11.patch b/media-sound/xmms2/files/xmms2-0.8-ffmpeg-0.11.patch deleted file mode 100644 index bac2fba7e9fd..000000000000 --- a/media-sound/xmms2/files/xmms2-0.8-ffmpeg-0.11.patch +++ /dev/null @@ -1,18 +0,0 @@ -commit 8743e0c3a4f06053d89b74e40a362ba4949ed53c -Author: Juho Vähä-Herttua -Date: Fri Jun 8 09:30:47 2012 +0300 - - OTHER: Quick fix to make XMMS2 compile on ffmpeg 0.11 - -diff --git a/src/plugins/avcodec/avcodec_compat.h b/src/plugins/avcodec/avcodec_compat.h -index df87b27..f1b1af7 100644 ---- a/src/plugins/avcodec/avcodec_compat.h -+++ b/src/plugins/avcodec/avcodec_compat.h -@@ -65,3 +65,7 @@ typedef struct AVPacket { - # define AVMEDIA_TYPE_AUDIO CODEC_TYPE_AUDIO - #endif - -+/* Calling avcodec_init is not necessary after 53.04 (ffmpeg 0.9) */ -+#if LIBAVCODEC_VERSION_INT >= 0x350400 -+# define avcodec_init() -+#endif diff --git a/media-sound/xmms2/files/xmms2-0.8-libav-9-p2.patch b/media-sound/xmms2/files/xmms2-0.8-libav-9-p2.patch deleted file mode 100644 index db55bc8a6933..000000000000 --- a/media-sound/xmms2/files/xmms2-0.8-libav-9-p2.patch +++ /dev/null @@ -1,50 +0,0 @@ -commit 4781c507be338fe151e08af7d13267a24cbd7572 -Author: Juho Vähä-Herttua -Date: Fri Jun 8 09:47:03 2012 +0300 - - OTHER: Fix some deprecated warnings in libavcodec - -diff --git a/src/plugins/avcodec/avcodec.c b/src/plugins/avcodec/avcodec.c -index 242e333..c846d64 100644 ---- a/src/plugins/avcodec/avcodec.c -+++ b/src/plugins/avcodec/avcodec.c -@@ -208,7 +208,7 @@ xmms_avcodec_init (xmms_xform_t *xform) - } - } - -- data->codecctx = avcodec_alloc_context (); -+ data->codecctx = avcodec_alloc_context3 (codec); - data->codecctx->sample_rate = data->samplerate; - data->codecctx->channels = data->channels; - data->codecctx->bit_rate = data->bitrate; -@@ -219,7 +219,7 @@ xmms_avcodec_init (xmms_xform_t *xform) - data->codecctx->codec_id = codec->id; - data->codecctx->codec_type = codec->type; - -- if (avcodec_open (data->codecctx, codec) < 0) { -+ if (avcodec_open2 (data->codecctx, codec, NULL) < 0) { - XMMS_DBG ("Opening decoder '%s' failed", codec->name); - goto err; - } else { -diff --git a/src/plugins/avcodec/avcodec_compat.h b/src/plugins/avcodec/avcodec_compat.h -index f1b1af7..bc770f2 100644 ---- a/src/plugins/avcodec/avcodec_compat.h -+++ b/src/plugins/avcodec/avcodec_compat.h -@@ -69,3 +69,17 @@ typedef struct AVPacket { - #if LIBAVCODEC_VERSION_INT >= 0x350400 - # define avcodec_init() - #endif -+ -+/* Map avcodec_alloc_context3 into the deprecated version -+ * avcodec_alloc_context in versions earlier than 53.04 (ffmpeg 0.9) */ -+#if LIBAVCODEC_VERSION_INT < 0x350400 -+# define avcodec_alloc_context3(codec) \ -+ avcodec_alloc_context() -+#endif -+ -+/* Map avcodec_open2 into the deprecated version -+ * avcodec_open in versions earlier than 53.04 (ffmpeg 0.9) */ -+#if LIBAVCODEC_VERSION_INT < 0x350400 -+# define avcodec_open2(avctx, codec, options) \ -+ avcodec_open(avctx, codec) -+#endif diff --git a/media-sound/xmms2/files/xmms2-0.8-libav-9.patch b/media-sound/xmms2/files/xmms2-0.8-libav-9.patch deleted file mode 100644 index 9c13ec41e025..000000000000 --- a/media-sound/xmms2/files/xmms2-0.8-libav-9.patch +++ /dev/null @@ -1,20 +0,0 @@ -commit d61dbc522f4024debb1f99de758de9e5cc7c0936 -Author: Diego Biurrun -Date: Sun Nov 25 17:33:02 2012 +0100 - - OTHER: Support for newer libavcodec versions - - Add missing #include - -diff --git a/src/plugins/avcodec/avcodec.c b/src/plugins/avcodec/avcodec.c -index c846d64..114d7df 100644 ---- a/src/plugins/avcodec/avcodec.c -+++ b/src/plugins/avcodec/avcodec.c -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - - #include "avcodec_compat.h" - diff --git a/media-sound/xmms2/files/xmms2-0.8-memset.patch b/media-sound/xmms2/files/xmms2-0.8-memset.patch deleted file mode 100644 index 6f8377d9f928..000000000000 --- a/media-sound/xmms2/files/xmms2-0.8-memset.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit 00f4736bbb8ebc88a08e24e98d384b43d5afbbe4 -Author: Raphaël Bois -Date: Sun Feb 12 16:39:46 2012 +0100 - - OTHER: fix erroneous sizeof usage - -diff --git a/src/plugins/daap/daap_md5.c b/src/plugins/daap/daap_md5.c -index d4d8d74..69c84a5 100644 ---- a/src/plugins/daap/daap_md5.c -+++ b/src/plugins/daap/daap_md5.c -@@ -191,7 +191,7 @@ OpenDaap_MD5Final (MD5_CTX *ctx, - MD5Transform (ctx->buf, (guint32 *) ctx->in, ctx->version); - byteReverse ((unsigned char *) ctx->buf, 4); - memcpy (digest, ctx->buf, 16); -- memset (ctx, 0, sizeof (ctx)); /* In case it's sensitive */ -+ memset (ctx, 0, sizeof (*ctx)); /* In case it's sensitive */ - - return; - } diff --git a/media-sound/xmms2/files/xmms2-0.8-modpug.patch b/media-sound/xmms2/files/xmms2-0.8-modpug.patch deleted file mode 100644 index ce401279c14c..000000000000 --- a/media-sound/xmms2/files/xmms2-0.8-modpug.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/plugins/modplug/modplug.c 2011-10-20 20:26:08.000000000 +0000 -+++ b/src/plugins/modplug/modplug.c 2015-01-08 19:52:43.889787624 +0000 -@@ -9,7 +9,7 @@ - #include "xmms/xmms_sample.h" - #include "xmms/xmms_medialib.h" - #include "xmms/xmms_log.h" --#include -+#include - - #include - #include diff --git a/media-sound/xmms2/files/xmms2-0.8-samba-4.patch b/media-sound/xmms2/files/xmms2-0.8-samba-4.patch deleted file mode 100644 index 937f3d75bea9..000000000000 --- a/media-sound/xmms2/files/xmms2-0.8-samba-4.patch +++ /dev/null @@ -1,30 +0,0 @@ -commit 86ea5e2d2ac2d8c8c1aee484e8c264440fafcb6a -Author: Daniel P. Chokola -Date: Wed Jan 1 14:57:35 2014 -0500 - - BUG(2573): Samba 4.0 uses pkg-config. Find libsmbclient.h properly. - -diff --git a/src/plugins/samba/wscript b/src/plugins/samba/wscript -index 8398169..77d7cda 100644 ---- a/src/plugins/samba/wscript -+++ b/src/plugins/samba/wscript -@@ -1,8 +1,17 @@ - from waftools.plugin import plugin -+from waflib import Errors - - def plugin_configure(conf): -- conf.check_cc(header_name="libsmbclient.h") -- conf.check(lib="smbclient", uselib_store="smbclient") -+ try: -+ conf.check_cfg(package="smbclient", uselib_store="smbclient", -+ args="--cflags --libs") -+ except Errors.ConfigurationError: -+ conf.check_cc(header_name="libsmbclient.h", -+ uselib="smbclient", -+ type="cshlib") -+ conf.check(lib="smbclient", uselib_store="smbclient", -+ uselib="smbclient", -+ type="cshlib") - - configure, build = plugin("samba", configure=plugin_configure, - libs=["smbclient"]) diff --git a/media-sound/xmms2/files/xmms2-0.8_p20161122-perl-no-local.patch b/media-sound/xmms2/files/xmms2-0.8_p20161122-perl-no-local.patch new file mode 100644 index 000000000000..af18825ac007 --- /dev/null +++ b/media-sound/xmms2/files/xmms2-0.8_p20161122-perl-no-local.patch @@ -0,0 +1,17 @@ +Install perl modules into /usr, not /usr/local. + +$ perl -MConfig -e 'print "$Config{archlib}\n"' +/usr/lib64/perl5/5.24.3/x86_64-linux +$ perl -MConfig -e 'print "$Config{sitearch}\n"' +/usr/local/lib64/perl5/5.24.3/x86_64-linux +--- a/waflib/Tools/perl.py ++++ b/waflib/Tools/perl.py +@@ -75,7 +75,7 @@ def check_perl_ext_devel(self): + env.EXTUTILS_TYPEMAP=cfg_lst('$Config{privlib}/ExtUtils/typemap') + env.XSUBPP=find_xsubpp() + if not getattr(Options.options,'perlarchdir',None): +- env.ARCHDIR_PERL=cfg_str('$Config{sitearch}') ++ env.ARCHDIR_PERL=cfg_str('$Config{archlib}') + else: + env.ARCHDIR_PERL=getattr(Options.options,'perlarchdir') + env.perlext_PATTERN='%s.'+cfg_str('$Config{dlext}') diff --git a/media-sound/xmms2/xmms2-0.8-r4.ebuild b/media-sound/xmms2/xmms2-0.8-r4.ebuild deleted file mode 100644 index 907d0fb1d869..000000000000 --- a/media-sound/xmms2/xmms2-0.8-r4.ebuild +++ /dev/null @@ -1,296 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -# waf fails on python3_5: AttributeError: Can't pickle local object 'Context.__init__..node_class' -PYTHON_COMPAT=( python{2_7,3_4} ) -USE_RUBY="ruby22 ruby23" - -inherit eutils multiprocessing python-single-r1 ruby-single toolchain-funcs - -MY_P="${P}DrO_o" - -DESCRIPTION="X(cross)platform Music Multiplexing System. Next generation of the XMMS player" -HOMEPAGE="https://xmms2.org/wiki/Main_Page" -SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2" -LICENSE="GPL-2 LGPL-2.1" - -SLOT="0" -KEYWORDS="alpha amd64 ppc x86" - -IUSE="aac airplay +alsa ao asf cdda curl cxx ffmpeg flac gvfs ices -jack mac mlib-update mms +mad modplug mp3 mp4 musepack ofa oss -perl phonehome pulseaudio python ruby samba +server sid sndfile speex -test valgrind +vorbis vocoder wavpack xml zeroconf" - -RDEPEND="server? ( - >=dev-db/sqlite-3.3.4 - - aac? ( >=media-libs/faad2-2.0 ) - airplay? ( dev-libs/openssl:0= ) - alsa? ( media-libs/alsa-lib ) - ao? ( media-libs/libao ) - cdda? ( dev-libs/libcdio-paranoia - >=media-libs/libdiscid-0.1.1 - >=media-sound/cdparanoia-3.9.8 ) - curl? ( >=net-misc/curl-7.15.1 ) - ffmpeg? ( virtual/ffmpeg ) - flac? ( media-libs/flac ) - gvfs? ( gnome-base/gnome-vfs ) - ices? ( media-libs/libogg - media-libs/libshout - media-libs/libvorbis ) - jack? ( >=media-sound/jack-audio-connection-kit-0.101.1 ) - mac? ( media-sound/mac ) - mms? ( virtual/ffmpeg - >=media-libs/libmms-0.3 ) - modplug? ( media-libs/libmodplug ) - mad? ( media-libs/libmad ) - mp3? ( >=media-sound/mpg123-1.5.1 ) - musepack? ( media-sound/musepack-tools ) - ofa? ( media-libs/libofa ) - pulseaudio? ( media-sound/pulseaudio ) - samba? ( >=net-fs/samba-4.2 ) - sid? ( media-sound/sidplay - media-libs/resid ) - sndfile? ( media-libs/libsndfile ) - speex? ( media-libs/speex - media-libs/libogg ) - vorbis? ( media-libs/libvorbis ) - vocoder? ( sci-libs/fftw:3.0= media-libs/libsamplerate ) - wavpack? ( media-sound/wavpack ) - xml? ( dev-libs/libxml2 ) - zeroconf? ( net-dns/avahi[mdnsresponder-compat] ) - ) - - >=dev-libs/glib-2.12.9 - cxx? ( >=dev-libs/boost-1.32 ) - perl? ( >=dev-lang/perl-5.8.8 ) - python? ( ${PYTHON_DEPS} ) - ruby? ( ${RUBY_DEPS} ) -" - -DEPEND="${RDEPEND} - dev-lang/python - virtual/pkgconfig - perl? ( dev-perl/Module-Build - virtual/perl-Module-Metadata ) - python? ( >=dev-python/cython-0.15.1 - dev-python/pyrex ) - test? ( dev-util/cunit - valgrind? ( dev-util/valgrind ) ) -" - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - # used both for building xmms2 and - # optionally linking client library - # against python - python-single-r1_pkg_setup -} - -# use_enable() is taken as proto -# $1 - useflag -# $2 - xmms2 option/plugin name (equals to $1 if not set) - -xmms2_flag() { - [[ -z $1 ]] && eerror "!!! empty arg. usage: xmms2_flag []." - - local UWORD=${2:-$1} - - case $1 in - ENABLED) - echo ",${UWORD}" - ;; - DISABLED) - ;; - *) - use $1 && echo ",${UWORD}" - ;; - esac -} - -src_prepare() { - ./waf # inflate waf - cd .waf* || die - epatch "${FILESDIR}/${PN}"-0.8DrO_o-waflib-fix-perl.patch #578778 - cd "${S}" - epatch "${FILESDIR}/${P}"-ffmpeg-0.11.patch #443256 - epatch "${FILESDIR}/${P}"-libav-9-p2.patch #443256 - epatch "${FILESDIR}/${P}"-libav-9.patch #443256 - epatch "${FILESDIR}/${P}"-cython-0.19.1.patch - epatch "${FILESDIR}/${P}"-memset.patch - epatch "${FILESDIR}/${P}"-ffmpeg2.patch #536232 - epatch "${FILESDIR}/${P}"-cpython.patch - epatch "${FILESDIR}/${P}"-modpug.patch #536046 - epatch "${FILESDIR}/${P}"-audio4-p1.patch #540890 - epatch "${FILESDIR}/${P}"-audio4-p2.patch - epatch "${FILESDIR}/${P}"-audio4-p3.patch - epatch "${FILESDIR}/${P}"-audio4-p4.patch - epatch "${FILESDIR}/${P}"-audio4-p5.patch - epatch "${FILESDIR}/${P}"-audio4-p6.patch - epatch "${FILESDIR}/${P}"-audio4-p7.patch - epatch "${FILESDIR}/${P}"-rtvg.patch #424377 - epatch "${FILESDIR}/${P}"-samba-4.patch - - if has_version dev-libs/libcdio-paranoia; then - sed -i -e 's:cdio/cdda.h:cdio/paranoia/cdda.h:' src/plugins/cdda/cdda.c || die - fi - epatch_user -} - -src_configure() { - # ./configure alike options. - local waf_params="--prefix=/usr \ - --libdir=/usr/$(get_libdir) \ - --with-target-platform=${CHOST} \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --datadir=/usr/share \ - --sysconfdir=/etc \ - --localstatedir=/var/lib" - - local optionals="" - local plugins="" - if ! use server ; then - waf_params+=" --without-xmms2d" - else - # some fun static mappings: - local option_map=( # USE # sorted xmms2 option flag (same, as USE if empty) - "phonehome et" - "ENABLED launcher" - "mlib-update medialib-updater" - "ENABLED nycli" - " perl" - "ENABLED pixmaps" - " python" - " ruby" - "DISABLED tests" - "DISABLED vistest" - "cxx xmmsclient++" - "cxx xmmsclient++-glib" - "DISABLED xmmsclient-cf" - "DISABLED xmmsclient-ecore" # not in tree - - "test tests" - ) - - local plugin_map=( # USE # sorted xmms2 plugin flag (same, as USE if empty) - " alsa" - " airplay" - " ao" - "ffmpeg apefile" - "ffmpeg avcodec" - " asf" - "ENABLED asx" - " cdda" - "DISABLED coreaudio" # MacOS only? - " curl" - "ENABLED cue" - "zeroconf daap" - "ENABLED diskwrite" - "ENABLED equalizer" - "aac faad" - "ENABLED file" - " flac" - "ffmpeg flv" - "ffmpeg tta" - "DISABLED gme" # not in tree - " gvfs" - "ENABLED html" - " ices" - "ENABLED icymetaint" - "ENABLED id3v2" - " jack" - "ENABLED karaoke" - "ENABLED m3u" - " mac" - " mms" - " mad" - " mp4" # bug #387961 (aac, mp3, ape can sit there) - "mp3 mpg123" - " modplug" - " musepack" - "DISABLED nms" # not in tree - "ENABLED normalize" - "ENABLED null" - "ENABLED nulstripper" - " ofa" - " oss" - "ENABLED pls" - "pulseaudio pulse" - "ENABLED replaygain" - "xml rss" - " samba" - "DISABLED sc68" #not in tree - " sid" - " sndfile" - " speex" - "DISABLED sun" # {Open,Net}BSD only - "DISABLED tremor" # not in tree - " vorbis" - " vocoder" - "ffmpeg tta" - "ENABLED wave" - "DISABLED waveout" # windows only - " wavpack" - "xml xspf" - "ENABLED xml" - ) - - local option - for option in "${option_map[@]}"; do - optionals+=$(xmms2_flag $option) - done - - local plugin - for plugin in "${plugin_map[@]}"; do - plugins+=$(xmms2_flag $plugin) - done - fi # ! server - - # pass them explicitely even if empty as we try to avoid magic deps - waf_params+=" --with-optionals=${optionals:1}" # skip first ',' if yet - waf_params+=" --with-plugins=${plugins:1}" - waf_params+=" $(use_with valgrind)" - - CC="$(tc-getCC)" \ - CPP="$(tc-getCPP)" \ - AR="$(tc-getAR)" \ - RANLIB="$(tc-getRANLIB)" \ - CXX="$(tc-getCXX)" \ - ./waf configure ${waf_params} || die "'waf configure' failed" -} - -src_compile() { - # waf is very keen to run tests in build phase (bug #424377) but - # it does not bother running tests twice, so the hack below works: - ./waf --verbose build || ./waf --verbose build || die "waf build failed" -} - -src_test() { - # rerun tests - ./waf --alltests || die "waf --alltests failed" -} - -src_install() { - ./waf --without-ldconfig --destdir="${D}" install || die "'waf install' failed" - dodoc AUTHORS TODO -} - -pkg_postinst() { - elog "This version is built on experimental development code" - elog "If you encounter any errors report them at https://bugs.xmms2.org" - elog "and visit #xmms2 at irc://irc.freenode.net" - if use phonehome ; then - einfo "" - einfo "The phone-home client xmms2-et was activated" - einfo "This client sends anonymous usage-statistics to the xmms2" - einfo "developers which may help finding bugs" - einfo "Disable the phonehome useflag if you don't like that" - fi -} diff --git a/media-sound/xmms2/xmms2-0.8_p20161122-r1.ebuild b/media-sound/xmms2/xmms2-0.8_p20161122-r1.ebuild deleted file mode 100644 index fc89616d993e..000000000000 --- a/media-sound/xmms2/xmms2-0.8_p20161122-r1.ebuild +++ /dev/null @@ -1,297 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) -USE_RUBY="ruby22 ruby23" - -inherit eutils multiprocessing python-single-r1 ruby-single toolchain-funcs - -# generated as 'python2 ./utils/gen-tarball.py' from clean git tree -MY_P="${P%_p*}DrO_o-949-gca15e830" - -DESCRIPTION="X(cross)platform Music Multiplexing System. Next generation of the XMMS player" -HOMEPAGE="https://xmms2.org/wiki/Main_Page" -#SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2" -SRC_URI="https://dev.gentoo.org/~slyfox/distfiles/${MY_P}.tar.bz2" -LICENSE="GPL-2 LGPL-2.1" - -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~ppc ~x86" - -IUSE="aac airplay +alsa ao asf cdda curl cxx ffmpeg flac fluidsynth gvfs ices -jack mac mlib-update mms +mad modplug mp3 mp4 musepack ofa opus oss -perl phonehome pulseaudio python ruby samba +server sid sndfile speex -test valgrind +vorbis vocoder wavpack xml zeroconf" - -RDEPEND="server? ( - >=dev-db/sqlite-3.3.4 - - aac? ( >=media-libs/faad2-2.0 ) - airplay? ( dev-libs/openssl:0= ) - alsa? ( media-libs/alsa-lib ) - ao? ( media-libs/libao ) - cdda? ( dev-libs/libcdio-paranoia - >=media-libs/libdiscid-0.1.1 - >=media-sound/cdparanoia-3.9.8 ) - curl? ( >=net-misc/curl-7.15.1 ) - ffmpeg? ( virtual/ffmpeg ) - flac? ( media-libs/flac ) - fluidsynth? ( media-sound/fluidsynth ) - gvfs? ( gnome-base/gnome-vfs ) - ices? ( media-libs/libogg - media-libs/libshout - media-libs/libvorbis ) - jack? ( >=media-sound/jack-audio-connection-kit-0.101.1 ) - mac? ( media-sound/mac ) - mms? ( virtual/ffmpeg - >=media-libs/libmms-0.3 ) - modplug? ( media-libs/libmodplug ) - mad? ( media-libs/libmad ) - mp3? ( >=media-sound/mpg123-1.5.1 ) - musepack? ( media-sound/musepack-tools ) - ofa? ( media-libs/libofa ) - opus? ( media-libs/opus - media-libs/opusfile ) - pulseaudio? ( media-sound/pulseaudio ) - samba? ( >=net-fs/samba-4.2 ) - sid? ( media-sound/sidplay - media-libs/resid ) - sndfile? ( media-libs/libsndfile ) - speex? ( media-libs/speex - media-libs/libogg ) - vorbis? ( media-libs/libvorbis ) - vocoder? ( sci-libs/fftw:3.0= media-libs/libsamplerate ) - wavpack? ( media-sound/wavpack ) - xml? ( dev-libs/libxml2 ) - zeroconf? ( net-dns/avahi[mdnsresponder-compat] ) - ) - - >=dev-libs/glib-2.12.9 - cxx? ( >=dev-libs/boost-1.32 ) - perl? ( >=dev-lang/perl-5.8.8 ) - python? ( ${PYTHON_DEPS} ) - ruby? ( ${RUBY_DEPS} ) -" - -DEPEND="${RDEPEND} - dev-lang/python - virtual/pkgconfig - perl? ( dev-perl/Module-Build - virtual/perl-Module-Metadata ) - python? ( >=dev-python/cython-0.15.1 - dev-python/pyrex ) - test? ( dev-util/cunit - valgrind? ( dev-util/valgrind ) ) -" - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - # used both for building xmms2 and - # optionally linking client library - # against python - python-single-r1_pkg_setup -} - -# use_enable() is taken as proto -# $1 - useflag -# $2 - xmms2 option/plugin name (equals to $1 if not set) - -xmms2_flag() { - [[ -z $1 ]] && eerror "!!! empty arg. usage: xmms2_flag []." - - local UWORD=${2:-$1} - - case $1 in - ENABLED) - echo ",${UWORD}" - ;; - DISABLED) - ;; - *) - use $1 && echo ",${UWORD}" - ;; - esac -} - -src_prepare() { - ./waf # inflate waf - cd .waf* || die - # needs port - #epatch "${FILESDIR}/${PN}"-0.8DrO_o-waflib-fix-perl.patch #578778 - cd "${S}" - - eapply "${FILESDIR}/${PN}"-0.8-ffmpeg2.patch #536232 - - eapply "${FILESDIR}/${PN}"-0.8-rtvg.patch #424377 - - # required to build tarball from git tree - eapply "${FILESDIR}/${P}"-tarball.patch - - # fix hash to be the same on LE/BE platforms - eapply "${FILESDIR}/${P}"-be-hash.patch - - # handle mac-3 -> -4 API change - eapply "${FILESDIR}/${P}"-mac-4.patch - - eapply_user -} - -src_configure() { - # ./configure alike options. - local waf_params="--prefix=/usr \ - --libdir=/usr/$(get_libdir) \ - --with-target-platform=${CHOST} \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --datadir=/usr/share \ - --sysconfdir=/etc \ - --localstatedir=/var/lib" - - local optionals="" - local plugins="" - if ! use server ; then - waf_params+=" --without-xmms2d" - else - # some fun static mappings: - local option_map=( # USE # sorted xmms2 option flag (same, as USE if empty) - "phonehome et" - "ENABLED launcher" - "mlib-update medialib-updater" - "ENABLED nycli" - " perl" - "ENABLED pixmaps" - " python" - " ruby" - "DISABLED tests" - "DISABLED vistest" - "cxx xmmsclient++" - "cxx xmmsclient++-glib" - "DISABLED xmmsclient-cf" - "DISABLED xmmsclient-ecore" # not in tree - - "test tests" - ) - - local plugin_map=( # USE # sorted xmms2 plugin flag (same, as USE if empty) - " alsa" - " airplay" - " ao" - "ffmpeg apefile" - "ffmpeg avcodec" - " asf" - "ENABLED asx" - " cdda" - "DISABLED coreaudio" # MacOS only? - " curl" - "ENABLED cue" - "zeroconf daap" - "ENABLED diskwrite" - "ENABLED equalizer" - "aac faad" - "ENABLED file" - " flac" - " fluidsynth" - "ffmpeg flv" - "ffmpeg tta" - "DISABLED gme" # not in tree - " gvfs" - "ENABLED html" - " ices" - "ENABLED icymetaint" - "ENABLED id3v2" - " jack" - "ENABLED karaoke" - "ENABLED m3u" - " mac" - " mms" - " mad" - "ENABLED midsquash" - " mp4" # bug #387961 (aac, mp3, ape can sit there) - "mp3 mpg123" - " modplug" - " musepack" - "DISABLED nms" # not in tree - "ENABLED normalize" - "ENABLED null" - "ENABLED nulstripper" - " ofa" - " opus" - " oss" - "ENABLED pls" - "pulseaudio pulse" - "ENABLED replaygain" - "xml rss" - " samba" - "DISABLED sc68" #not in tree - " sid" - " sndfile" - " speex" - "DISABLED sun" # {Open,Net}BSD only - "DISABLED tremor" # not in tree - " vorbis" - " vocoder" - "ffmpeg tta" - "ENABLED wave" - "DISABLED waveout" # windows only - " wavpack" - "xml xspf" - "ENABLED xml" - ) - - local option - for option in "${option_map[@]}"; do - optionals+=$(xmms2_flag $option) - done - - local plugin - for plugin in "${plugin_map[@]}"; do - plugins+=$(xmms2_flag $plugin) - done - fi # ! server - - # pass them explicitely even if empty as we try to avoid magic deps - waf_params+=" --with-optionals=${optionals:1}" # skip first ',' if yet - waf_params+=" --with-plugins=${plugins:1}" - waf_params+=" $(use_with valgrind)" - - CC="$(tc-getCC)" \ - CPP="$(tc-getCPP)" \ - AR="$(tc-getAR)" \ - RANLIB="$(tc-getRANLIB)" \ - CXX="$(tc-getCXX)" \ - ./waf configure ${waf_params} || die "'waf configure' failed" -} - -src_compile() { - # waf is very keen to run tests in build phase (bug #424377) but - # it does not bother running tests twice, so the hack below works: - ./waf --verbose build || ./waf --verbose build || die "waf build failed" -} - -src_test() { - # rerun tests - ./waf --alltests || die "waf --alltests failed" -} - -src_install() { - ./waf --without-ldconfig --destdir="${D}" install || die "'waf install' failed" - dodoc AUTHORS TODO -} - -pkg_postinst() { - elog "This version is built on experimental development code" - elog "If you encounter any errors report them at https://bugs.xmms2.org" - elog "and visit #xmms2 at irc://irc.freenode.net" - if use phonehome ; then - einfo "" - einfo "The phone-home client xmms2-et was activated" - einfo "This client sends anonymous usage-statistics to the xmms2" - einfo "developers which may help finding bugs" - einfo "Disable the phonehome useflag if you don't like that" - fi -} diff --git a/media-sound/xmms2/xmms2-0.8_p20161122-r2.ebuild b/media-sound/xmms2/xmms2-0.8_p20161122-r2.ebuild deleted file mode 100644 index 88646ec634ed..000000000000 --- a/media-sound/xmms2/xmms2-0.8_p20161122-r2.ebuild +++ /dev/null @@ -1,297 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) -USE_RUBY="ruby22 ruby23" - -inherit eutils multiprocessing python-single-r1 ruby-single toolchain-funcs - -# generated as 'python2 ./utils/gen-tarball.py' from clean git tree -MY_P="${P%_p*}DrO_o-949-gca15e830" - -DESCRIPTION="X(cross)platform Music Multiplexing System. Next generation of the XMMS player" -HOMEPAGE="https://xmms2.org/wiki/Main_Page" -#SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2" -SRC_URI="https://dev.gentoo.org/~slyfox/distfiles/${MY_P}.tar.bz2" -LICENSE="GPL-2 LGPL-2.1" - -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~ppc ~x86" - -IUSE="aac airplay +alsa ao asf cdda curl cxx ffmpeg flac fluidsynth gvfs ices -jack mac mlib-update mms +mad modplug mp3 mp4 musepack ofa opus oss -perl phonehome pulseaudio python ruby samba +server sid sndfile speex -test valgrind +vorbis vocoder wavpack xml zeroconf" - -RDEPEND="server? ( - >=dev-db/sqlite-3.3.4 - - aac? ( >=media-libs/faad2-2.0 ) - airplay? ( dev-libs/openssl:0= ) - alsa? ( media-libs/alsa-lib ) - ao? ( media-libs/libao ) - cdda? ( dev-libs/libcdio-paranoia - >=media-libs/libdiscid-0.1.1 - >=media-sound/cdparanoia-3.9.8 ) - curl? ( >=net-misc/curl-7.15.1 ) - ffmpeg? ( virtual/ffmpeg ) - flac? ( media-libs/flac ) - fluidsynth? ( media-sound/fluidsynth ) - gvfs? ( gnome-base/gnome-vfs ) - ices? ( media-libs/libogg - media-libs/libshout - media-libs/libvorbis ) - jack? ( virtual/jack ) - mac? ( media-sound/mac ) - mms? ( virtual/ffmpeg - >=media-libs/libmms-0.3 ) - modplug? ( media-libs/libmodplug ) - mad? ( media-libs/libmad ) - mp3? ( >=media-sound/mpg123-1.5.1 ) - musepack? ( media-sound/musepack-tools ) - ofa? ( media-libs/libofa ) - opus? ( media-libs/opus - media-libs/opusfile ) - pulseaudio? ( media-sound/pulseaudio ) - samba? ( >=net-fs/samba-4.2 ) - sid? ( media-sound/sidplay - media-libs/resid ) - sndfile? ( media-libs/libsndfile ) - speex? ( media-libs/speex - media-libs/libogg ) - vorbis? ( media-libs/libvorbis ) - vocoder? ( sci-libs/fftw:3.0= media-libs/libsamplerate ) - wavpack? ( media-sound/wavpack ) - xml? ( dev-libs/libxml2 ) - zeroconf? ( net-dns/avahi[mdnsresponder-compat] ) - ) - - >=dev-libs/glib-2.12.9 - cxx? ( >=dev-libs/boost-1.32 ) - perl? ( >=dev-lang/perl-5.8.8 ) - python? ( ${PYTHON_DEPS} ) - ruby? ( ${RUBY_DEPS} ) -" - -DEPEND="${RDEPEND} - dev-lang/python - virtual/pkgconfig - perl? ( dev-perl/Module-Build - virtual/perl-Module-Metadata ) - python? ( >=dev-python/cython-0.15.1 - dev-python/pyrex ) - test? ( dev-util/cunit - valgrind? ( dev-util/valgrind ) ) -" - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - # used both for building xmms2 and - # optionally linking client library - # against python - python-single-r1_pkg_setup -} - -# use_enable() is taken as proto -# $1 - useflag -# $2 - xmms2 option/plugin name (equals to $1 if not set) - -xmms2_flag() { - [[ -z $1 ]] && eerror "!!! empty arg. usage: xmms2_flag []." - - local UWORD=${2:-$1} - - case $1 in - ENABLED) - echo ",${UWORD}" - ;; - DISABLED) - ;; - *) - use $1 && echo ",${UWORD}" - ;; - esac -} - -src_prepare() { - ./waf # inflate waf - cd .waf* || die - # needs port - #epatch "${FILESDIR}/${PN}"-0.8DrO_o-waflib-fix-perl.patch #578778 - cd "${S}" - - eapply "${FILESDIR}/${PN}"-0.8-ffmpeg2.patch #536232 - - eapply "${FILESDIR}/${PN}"-0.8-rtvg.patch #424377 - - # required to build tarball from git tree - eapply "${FILESDIR}/${P}"-tarball.patch - - # fix hash to be the same on LE/BE platforms - eapply "${FILESDIR}/${P}"-be-hash.patch - - # handle mac-3 -> -4 API change - eapply "${FILESDIR}/${P}"-mac-4.patch - - eapply_user -} - -src_configure() { - # ./configure alike options. - local waf_params="--prefix=/usr \ - --libdir=/usr/$(get_libdir) \ - --with-target-platform=${CHOST} \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --datadir=/usr/share \ - --sysconfdir=/etc \ - --localstatedir=/var/lib" - - local optionals="" - local plugins="" - if ! use server ; then - waf_params+=" --without-xmms2d" - else - # some fun static mappings: - local option_map=( # USE # sorted xmms2 option flag (same, as USE if empty) - "phonehome et" - "ENABLED launcher" - "mlib-update medialib-updater" - "ENABLED nycli" - " perl" - "ENABLED pixmaps" - " python" - " ruby" - "DISABLED tests" - "DISABLED vistest" - "cxx xmmsclient++" - "cxx xmmsclient++-glib" - "DISABLED xmmsclient-cf" - "DISABLED xmmsclient-ecore" # not in tree - - "test tests" - ) - - local plugin_map=( # USE # sorted xmms2 plugin flag (same, as USE if empty) - " alsa" - " airplay" - " ao" - "ffmpeg apefile" - "ffmpeg avcodec" - " asf" - "ENABLED asx" - " cdda" - "DISABLED coreaudio" # MacOS only? - " curl" - "ENABLED cue" - "zeroconf daap" - "ENABLED diskwrite" - "ENABLED equalizer" - "aac faad" - "ENABLED file" - " flac" - " fluidsynth" - "ffmpeg flv" - "ffmpeg tta" - "DISABLED gme" # not in tree - " gvfs" - "ENABLED html" - " ices" - "ENABLED icymetaint" - "ENABLED id3v2" - " jack" - "ENABLED karaoke" - "ENABLED m3u" - " mac" - " mms" - " mad" - "ENABLED midsquash" - " mp4" # bug #387961 (aac, mp3, ape can sit there) - "mp3 mpg123" - " modplug" - " musepack" - "DISABLED nms" # not in tree - "ENABLED normalize" - "ENABLED null" - "ENABLED nulstripper" - " ofa" - " opus" - " oss" - "ENABLED pls" - "pulseaudio pulse" - "ENABLED replaygain" - "xml rss" - " samba" - "DISABLED sc68" #not in tree - " sid" - " sndfile" - " speex" - "DISABLED sun" # {Open,Net}BSD only - "DISABLED tremor" # not in tree - " vorbis" - " vocoder" - "ffmpeg tta" - "ENABLED wave" - "DISABLED waveout" # windows only - " wavpack" - "xml xspf" - "ENABLED xml" - ) - - local option - for option in "${option_map[@]}"; do - optionals+=$(xmms2_flag $option) - done - - local plugin - for plugin in "${plugin_map[@]}"; do - plugins+=$(xmms2_flag $plugin) - done - fi # ! server - - # pass them explicitely even if empty as we try to avoid magic deps - waf_params+=" --with-optionals=${optionals:1}" # skip first ',' if yet - waf_params+=" --with-plugins=${plugins:1}" - waf_params+=" $(use_with valgrind)" - - CC="$(tc-getCC)" \ - CPP="$(tc-getCPP)" \ - AR="$(tc-getAR)" \ - RANLIB="$(tc-getRANLIB)" \ - CXX="$(tc-getCXX)" \ - ./waf configure ${waf_params} || die "'waf configure' failed" -} - -src_compile() { - # waf is very keen to run tests in build phase (bug #424377) but - # it does not bother running tests twice, so the hack below works: - ./waf --verbose build || ./waf --verbose build || die "waf build failed" -} - -src_test() { - # rerun tests - ./waf --alltests || die "waf --alltests failed" -} - -src_install() { - ./waf --without-ldconfig --destdir="${D}" install || die "'waf install' failed" - dodoc AUTHORS TODO -} - -pkg_postinst() { - elog "This version is built on experimental development code" - elog "If you encounter any errors report them at https://bugs.xmms2.org" - elog "and visit #xmms2 at irc://irc.freenode.net" - if use phonehome ; then - einfo "" - einfo "The phone-home client xmms2-et was activated" - einfo "This client sends anonymous usage-statistics to the xmms2" - einfo "developers which may help finding bugs" - einfo "Disable the phonehome useflag if you don't like that" - fi -} diff --git a/media-sound/xmms2/xmms2-0.8_p20161122-r4.ebuild b/media-sound/xmms2/xmms2-0.8_p20161122-r4.ebuild new file mode 100644 index 000000000000..44013523f07d --- /dev/null +++ b/media-sound/xmms2/xmms2-0.8_p20161122-r4.ebuild @@ -0,0 +1,297 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) +USE_RUBY="ruby23 ruby24 ruby25" + +inherit eutils multiprocessing python-single-r1 ruby-single toolchain-funcs + +# generated as 'python2 ./utils/gen-tarball.py' from clean git tree +MY_P="${P%_p*}DrO_o-949-gca15e830" + +DESCRIPTION="X(cross)platform Music Multiplexing System. Next generation of the XMMS player" +HOMEPAGE="https://xmms2.org/wiki/Main_Page" +#SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2" +SRC_URI="https://dev.gentoo.org/~slyfox/distfiles/${MY_P}.tar.bz2" +LICENSE="GPL-2 LGPL-2.1" + +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ppc ~x86" + +IUSE="aac airplay +alsa ao asf cdda curl cxx ffmpeg flac fluidsynth ices +jack mac mlib-update mms +mad modplug mp3 mp4 musepack ofa opus oss +perl phonehome pulseaudio python ruby samba +server sid sndfile speex +test valgrind +vorbis vocoder wavpack xml zeroconf" + +RDEPEND="server? ( + >=dev-db/sqlite-3.3.4 + + aac? ( >=media-libs/faad2-2.0 ) + airplay? ( dev-libs/openssl:0= ) + alsa? ( media-libs/alsa-lib ) + ao? ( media-libs/libao ) + cdda? ( dev-libs/libcdio-paranoia + >=media-libs/libdiscid-0.1.1 + >=media-sound/cdparanoia-3.9.8 ) + curl? ( >=net-misc/curl-7.15.1 ) + ffmpeg? ( virtual/ffmpeg ) + flac? ( media-libs/flac ) + fluidsynth? ( media-sound/fluidsynth ) + ices? ( media-libs/libogg + media-libs/libshout + media-libs/libvorbis ) + jack? ( virtual/jack ) + mac? ( media-sound/mac ) + mms? ( virtual/ffmpeg + >=media-libs/libmms-0.3 ) + modplug? ( media-libs/libmodplug ) + mad? ( media-libs/libmad ) + mp3? ( >=media-sound/mpg123-1.5.1 ) + musepack? ( media-sound/musepack-tools ) + ofa? ( media-libs/libofa ) + opus? ( media-libs/opus + media-libs/opusfile ) + pulseaudio? ( media-sound/pulseaudio ) + samba? ( >=net-fs/samba-4.2 ) + sid? ( media-sound/sidplay + media-libs/resid ) + sndfile? ( media-libs/libsndfile ) + speex? ( media-libs/speex + media-libs/libogg ) + vorbis? ( media-libs/libvorbis ) + vocoder? ( sci-libs/fftw:3.0= media-libs/libsamplerate ) + wavpack? ( media-sound/wavpack ) + xml? ( dev-libs/libxml2 ) + zeroconf? ( net-dns/avahi[mdnsresponder-compat] ) + ) + + >=dev-libs/glib-2.12.9 + cxx? ( >=dev-libs/boost-1.32 ) + perl? ( >=dev-lang/perl-5.8.8 ) + python? ( ${PYTHON_DEPS} ) + ruby? ( ${RUBY_DEPS} ) +" + +DEPEND="${RDEPEND} + dev-lang/python + virtual/pkgconfig + perl? ( dev-perl/Module-Build + virtual/perl-Module-Metadata ) + python? ( >=dev-python/cython-0.15.1 + dev-python/pyrex ) + test? ( dev-util/cunit + valgrind? ( dev-util/valgrind ) ) +" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + # used both for building xmms2 and + # optionally linking client library + # against python + python-single-r1_pkg_setup +} + +# use_enable() is taken as proto +# $1 - useflag +# $2 - xmms2 option/plugin name (equals to $1 if not set) + +xmms2_flag() { + [[ -z $1 ]] && eerror "!!! empty arg. usage: xmms2_flag []." + + local UWORD=${2:-$1} + + case $1 in + ENABLED) + echo ",${UWORD}" + ;; + DISABLED) + ;; + *) + use $1 && echo ",${UWORD}" + ;; + esac +} + +src_prepare() { + ./waf # inflate waf + cd .waf* || die + # needs port + #epatch "${FILESDIR}/${PN}"-0.8DrO_o-waflib-fix-perl.patch #578778 + eapply "${FILESDIR}/${PN}"-0.8_p20161122-perl-no-local.patch + cd "${S}" + + eapply "${FILESDIR}/${PN}"-0.8-ffmpeg2.patch #536232 + + eapply "${FILESDIR}/${PN}"-0.8-rtvg.patch #424377 + + # required to build tarball from git tree + eapply "${FILESDIR}/${P}"-tarball.patch + + # fix hash to be the same on LE/BE platforms + eapply "${FILESDIR}/${P}"-be-hash.patch + + # handle mac-3 -> -4 API change + eapply "${FILESDIR}/${P}"-mac-4.patch + + eapply_user +} + +src_configure() { + # ./configure alike options. + local waf_params="--prefix=/usr \ + --libdir=/usr/$(get_libdir) \ + --with-target-platform=${CHOST} \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --datadir=/usr/share \ + --sysconfdir=/etc \ + --localstatedir=/var/lib" + + local optionals="" + local plugins="" + if ! use server ; then + waf_params+=" --without-xmms2d" + else + # some fun static mappings: + local option_map=( # USE # sorted xmms2 option flag (same, as USE if empty) + "phonehome et" + "ENABLED launcher" + "mlib-update medialib-updater" + "ENABLED nycli" + " perl" + "ENABLED pixmaps" + " python" + " ruby" + "DISABLED tests" + "DISABLED vistest" + "cxx xmmsclient++" + "cxx xmmsclient++-glib" + "DISABLED xmmsclient-cf" + "DISABLED xmmsclient-ecore" # not in tree + + "test tests" + ) + + local plugin_map=( # USE # sorted xmms2 plugin flag (same, as USE if empty) + " alsa" + " airplay" + " ao" + "ffmpeg apefile" + "ffmpeg avcodec" + " asf" + "ENABLED asx" + " cdda" + "DISABLED coreaudio" # MacOS only? + " curl" + "ENABLED cue" + "zeroconf daap" + "ENABLED diskwrite" + "ENABLED equalizer" + "aac faad" + "ENABLED file" + " flac" + " fluidsynth" + "ffmpeg flv" + "ffmpeg tta" + "DISABLED gme" # not in tree + "DISABLED gvfs" # obsolete #647604 + "ENABLED html" + " ices" + "ENABLED icymetaint" + "ENABLED id3v2" + " jack" + "ENABLED karaoke" + "ENABLED m3u" + " mac" + " mms" + " mad" + "ENABLED midsquash" + " mp4" # bug #387961 (aac, mp3, ape can sit there) + "mp3 mpg123" + " modplug" + " musepack" + "DISABLED nms" # not in tree + "ENABLED normalize" + "ENABLED null" + "ENABLED nulstripper" + " ofa" + " opus" + " oss" + "ENABLED pls" + "pulseaudio pulse" + "ENABLED replaygain" + "xml rss" + " samba" + "DISABLED sc68" #not in tree + " sid" + " sndfile" + " speex" + "DISABLED sun" # {Open,Net}BSD only + "DISABLED tremor" # not in tree + " vorbis" + " vocoder" + "ffmpeg tta" + "ENABLED wave" + "DISABLED waveout" # windows only + " wavpack" + "xml xspf" + "ENABLED xml" + ) + + local option + for option in "${option_map[@]}"; do + optionals+=$(xmms2_flag $option) + done + + local plugin + for plugin in "${plugin_map[@]}"; do + plugins+=$(xmms2_flag $plugin) + done + fi # ! server + + # pass them explicitely even if empty as we try to avoid magic deps + waf_params+=" --with-optionals=${optionals:1}" # skip first ',' if yet + waf_params+=" --with-plugins=${plugins:1}" + waf_params+=" $(use_with valgrind)" + + CC="$(tc-getCC)" \ + CPP="$(tc-getCPP)" \ + AR="$(tc-getAR)" \ + RANLIB="$(tc-getRANLIB)" \ + CXX="$(tc-getCXX)" \ + ./waf configure ${waf_params} || die "'waf configure' failed" +} + +src_compile() { + # waf is very keen to run tests in build phase (bug #424377) but + # it does not bother running tests twice, so the hack below works: + ./waf --verbose build || ./waf --verbose build || die "waf build failed" +} + +src_test() { + # rerun tests + ./waf --alltests || die "waf --alltests failed" +} + +src_install() { + ./waf --without-ldconfig --destdir="${D}" install || die "'waf install' failed" + dodoc AUTHORS TODO +} + +pkg_postinst() { + elog "This version is built on experimental development code" + elog "If you encounter any errors report them at https://bugs.xmms2.org" + elog "and visit #xmms2 at irc://irc.freenode.net" + if use phonehome ; then + einfo "" + einfo "The phone-home client xmms2-et was activated" + einfo "This client sends anonymous usage-statistics to the xmms2" + einfo "developers which may help finding bugs" + einfo "Disable the phonehome useflag if you don't like that" + fi +} -- cgit v1.2.3