summaryrefslogtreecommitdiff
path: root/net-libs/libsrtp
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/libsrtp')
-rw-r--r--net-libs/libsrtp/Manifest30
-rw-r--r--net-libs/libsrtp/files/libsrtp-1.4.4-invalid-index.patch11
-rw-r--r--net-libs/libsrtp/files/libsrtp-1.4.4-shared.patch52
-rw-r--r--net-libs/libsrtp/files/libsrtp-1.4.4_p20121108-shared.patch55
-rw-r--r--net-libs/libsrtp/files/libsrtp-1.5.2-bindir.patch19
-rw-r--r--net-libs/libsrtp/files/libsrtp-1.5.2-fix-make-install.patch13
-rw-r--r--net-libs/libsrtp/files/libsrtp-2.1.0-pcap-automagic-r0.patch17
-rw-r--r--net-libs/libsrtp/files/libsrtp-CVE-2013-2139.diff46
-rw-r--r--net-libs/libsrtp/files/libsrtp-pcap-automagic-r0.patch19
-rw-r--r--net-libs/libsrtp/libsrtp-1.4.4-r1.ebuild75
-rw-r--r--net-libs/libsrtp/libsrtp-1.4.4-r2.ebuild74
-rw-r--r--net-libs/libsrtp/libsrtp-1.4.4_p20121108-r1.ebuild76
-rw-r--r--net-libs/libsrtp/libsrtp-1.4.4_p20121108.ebuild73
-rw-r--r--net-libs/libsrtp/libsrtp-1.5.2-r1.ebuild79
-rw-r--r--net-libs/libsrtp/libsrtp-1.5.2.ebuild75
-rw-r--r--net-libs/libsrtp/libsrtp-1.5.4-r1.ebuild83
-rw-r--r--net-libs/libsrtp/libsrtp-1.5.4.ebuild77
-rw-r--r--net-libs/libsrtp/libsrtp-1.6.0.ebuild83
-rw-r--r--net-libs/libsrtp/libsrtp-2.0.0-r1.ebuild75
-rw-r--r--net-libs/libsrtp/libsrtp-2.0.0.ebuild73
-rw-r--r--net-libs/libsrtp/libsrtp-2.1.0.ebuild73
-rw-r--r--net-libs/libsrtp/metadata.xml24
22 files changed, 1202 insertions, 0 deletions
diff --git a/net-libs/libsrtp/Manifest b/net-libs/libsrtp/Manifest
new file mode 100644
index 000000000000..1113b87e347c
--- /dev/null
+++ b/net-libs/libsrtp/Manifest
@@ -0,0 +1,30 @@
+AUX libsrtp-1.4.4-invalid-index.patch 412 SHA256 afef97d3da04d4d00ebc9aef598f32dce959a64e94da48c54f4201dfc5a0667c SHA512 eda02d691be19de883d061031c0c7070e375da3581f4294a7c8fa30f498c4c7aaa306c291230171d0391e226b624277ae09b4337dd14aa2625a9cb6bb4884764 WHIRLPOOL 3b0ecc41a920550efe935a647de469a67b2fa8784be4842c323d3efbbb237f8f0a706343f14fc6795bf53b35b8153f02eafb99e5ccacbeff80fe99312708f067
+AUX libsrtp-1.4.4-shared.patch 1670 SHA256 76bbfa40334c17327331f3532f45a6b83139dc94cc4eee9e4a48db4ece63961c SHA512 c9005c00fd81cf13243897f2803d1528812bd83849aa318c5cbabfb3fd7cd3870b94cf5d6ad6eaab5b181b2e439be6cdfe9a9a38338632bbf34647a18d120a69 WHIRLPOOL cbc5a2a44069326a64dc50080cc2f897ec706f414dd55e9c1565ded0a428693144f94bd84b992da669711a92691ea9366949e9cd0c39989ec9f28d1c1cc2b5f0
+AUX libsrtp-1.4.4_p20121108-shared.patch 1821 SHA256 8fc8c716c03e56f7211b85359211abb13c97c56a7670fa5236b8ed9e6b9894c4 SHA512 594b2e5e6efc74a93162e299fe4247ae6dfbd1864c02435bab2bcc2788716bd5afc6513d3842ea87260182ffd2de0abcab4577b13a26dcd75c5008a849bec709 WHIRLPOOL b5625fdf1c29725061d4523699d34b01f2b62afa5f6131642dbedc2a1de3c78ecceeddadfff00aebcf33296ab53efcfb124fa5f5a4b9840228a1c5c5266b9a6c
+AUX libsrtp-1.5.2-bindir.patch 879 SHA256 4a2b0d34cde1ff80efb6b9d115d1bdb9ef57f67908032502f01d7f878bace361 SHA512 d3eb6362dd9c79a3c670582435ba260965116fa1a57304b796498a9d4085e24044634bdcd8ba7f7b7b9f6df1b25db01ff1cad828228a823a03904b7f13d6d46f WHIRLPOOL e3cf54faac4c6163797bec8e9848b79546efcc29ca06e5192d2780fa7d15ddb4c36d41cb1f52acec708b216deaec06039ba18d6109ee64469797288cd04866ad
+AUX libsrtp-1.5.2-fix-make-install.patch 582 SHA256 38d8295cc6e706b694fbe88369e2c8e77e832456bf71729829d5b0d540a7c2c1 SHA512 09bbcc378ccc01fd396fe49bc874b7f6c42f7af7173b108cde89efa90bc407086ebc6b791343ddfd609cb108364d818ac327766404acc953d81b14d9c3babb1f WHIRLPOOL 830a145403f235448632c3b99074ac3f01cfa5418588764c4bafe75c5b45084378ed1a5e164a71f68c54cfa36ca3979788cd6e26ccae1d46e335fc8dbbdcd1be
+AUX libsrtp-2.1.0-pcap-automagic-r0.patch 692 SHA256 883db49d1db0619971d4db9bab531f98bfffd6b772abc21b4a47f42d470f897d SHA512 ac5ffa640d61332fcdb41e99895e2934e19211809011a9a8250a1e15dcc565072f7e2a6b4b24602769bf7c70a98ec3606832ef9ab2225bfa9fded2970b07d5fa WHIRLPOOL 861d657ff476002ebb2af7e90b0bf289d737f37e8238f121948a918116a078dc8d06edafd10f5f9f9516238f35c40c22c0f2bf7325f702c0911f0b7548b232ac
+AUX libsrtp-CVE-2013-2139.diff 1996 SHA256 185a89fc68bce34308b0ce0fd3f016d3a1506f092d75d0cb4ff232751dba1c01 SHA512 ea944ec993b8e923e2cb91a77336b5f898851f6948f6b5df45610f7528afdb7ad54706cee4acd49146b18c45f52fa5588f43e4fbc745b56df3c558d6bbf5b49b WHIRLPOOL a143d3e8278027b2bf97904fef1eff4ff09d52d60181495ea942527c64272bad46f71f3fbdde617cf39b4d5a3a542c66a00fd71663f69a0051d1237263e56c4f
+AUX libsrtp-pcap-automagic-r0.patch 615 SHA256 16615bc073bbb6da142d183b65a07c59ea961746b5daba91e749e29df7a81f7d SHA512 ee55bdf6f9c77ebacd7469db92f42ed09728fe91a81496ff425c07ad8610e9998fec2a8992b4fafd7c684bb06989837b0244172ed96483984d1c2e6ff6c0dc0c WHIRLPOOL 0ffdbad99bf94d8e23ba4176a859014421199f2b3b14531a01441054e92c3a33537b9c396e08b951527ceb40a7e5cb3a9c09103ce7c5264b5d712d606553d499
+DIST libsrtp-1.5.2.tar.gz 1690272 SHA256 86e1efe353397c0751f6bdd709794143bd1b76494412860f16ff2b6d9c304eda SHA512 fb09252edaca6da5b579fae34d3b6382ee0cf61a706e38283158ef10c879b9a0f80cfd0c354852e771b4649288dd5cc41158a4e046e8073cf26a586dfd41b024 WHIRLPOOL 973f27db06b725ca641a5c13184083926dbe0fd99ab18604b1d2d40fa0ab5118e9b978d729502a32bc25d05d6264ee501ff94f72e6dafd46588092f678f0a4c5
+DIST libsrtp-1.5.4.tar.gz 1646184 SHA256 56a7b521c25134f48faff26b0b1e3d4378a14986a2d3d7bc6fefb48987304ff0 SHA512 fcf6a36a0f687a6aa2b245e4055332ae892c953e19ebe3bfb7d091da0a7afbfcb804d9f602bd2d849235b559d3ca7924ee00c7f0da419c23b053b096ef4ccd19 WHIRLPOOL 7f4ee1f705efeeb635bc88845f094a49a7b447736799c8fd81d8cab4aa9c75f837f7dfb01295b2497f483ba033636cc5075258144a9afb87cea48c7bf57bb463
+DIST libsrtp-1.6.0.tar.gz 1648862 SHA256 1a3e7904354d55e45b3c5c024ec0eab1b8fa76fdbf4dd2ea2625dad2b3c6edde SHA512 5ac712d0d343c3b63ed248503cc7d33c637895a274c4434c91f513be117836f27cd5daba83088b4647bbd9c82d841e216e6346af8d485cb9ddcd35dee21d4887 WHIRLPOOL 833df06814810de1eef7e08d723e7e9f6bc2abe542d8835b86603d2df96f05f664ab8364a7d726bee57b4422d262f4595bcfe5800879490283cc15f15e2cebba
+DIST libsrtp-2.0.0.tar.gz 265564 SHA256 2296d132fd8cadd691d1fffeabbc1b9c42ec09e9e780a0d9bd8234a98e63a5a1 SHA512 61bba9aba9bb3e888c2bbc150411d0b3d583ed71ca455c5a3d4d6d06ecd383fdd61f86ad1979fb9c04da1b824e3fb9bb63f0d97e50b4a469d56907fb9dbc42d6 WHIRLPOOL 1ff2b9305d19e49f976708a885642fedb16c1775da1be5c977de6629cb705a3944402c54dd2b7e00ee67cac5ded828e457ac21e9e93178908a03177e203873ec
+DIST libsrtp-2.1.0.tar.gz 306090 SHA256 0302442ed97d34a77abf84617b657e77674bdd8e789d649f1cac0c5f0d0cf5ee SHA512 60f4eb6fd37517eb96df80ab8a9c6fd79dfc89d969bdb04673cd98364f7108fbc703a64b1898056f9220a55315574b6f3f796b6814086360f6fd143e3b20fb3f WHIRLPOOL 07f3716215cbbac9f91c8804c7df1298ae8aa4f9e48ae03c21194161e8e2d4dc7805bd825b70b2744239b883211dca4204bfaf135931cef39d34c35316a226e5
+DIST srtp-1.4.4.tgz 502890 SHA256 d9c2cbb1c95172ed2dc963eff0d6ce1072326dc81cb1dd38414e9f0e430af314 SHA512 951bfec212f579daae4a5a7fc9eded163dd6790da2e3840629dbeac36d7d960f95a1f1b844505629c7815816515f0784bf9b6e1c47f2986416ec04ec9d4b7564 WHIRLPOOL 82b01ce07de0c7b82d5f99b2fda6c72653e2927c3838a15dd1bb7e36725846599f2a96675dcf5ddfd7dcab9210f554b30fcf9bcb3806a60aa732d56926a4c07f
+DIST srtp-1.4.4_p20121108.tar.gz 485875 SHA256 ebc0b7b27f5ab669a058c82f62b1c96298a961d54633d7041e776bca19a4f295 SHA512 a6bf2674babed512bd90fd11d63adecf4ddf357d26652f321651fcc42d932d3d9f8713ecab4bdcddb026106a2d5bfbac0a626938f70822f5b1ee05881bb823d9 WHIRLPOOL 27296c776d60688dfa3c655999b6a87828036f9a71cff7a9ea9d1f0c6c5afa787eb625fb4ec9254b0eda459769fc0ca41cf4c1eaa38053cd365243c101f444bd
+EBUILD libsrtp-1.4.4-r1.ebuild 2064 SHA256 3a1e8d46ef8fa91ed8c7303210d80a8aa412c5838b4eeb89572bf5f4463d906d SHA512 da09ff91bc7bde76d985636e32536683023fb7b34342a295a24088b859f2635e4619c78f0dc9afb3c351d1d6147c04bdf49806b1b95bde31ad2c4546af55ce93 WHIRLPOOL b414a48b5c4dc0d9dd7f52199fed7cdf2e2131051646607956b6a3b6d644955f6f3a5998e15cb6067ef217fefcdd48edbbfcb8be058d26ee766e53cbe72eb7e8
+EBUILD libsrtp-1.4.4-r2.ebuild 2148 SHA256 3e0331dc2f054e47713f4d295e40a0a8da64026961b35abb2cac82ddfc07940f SHA512 c80c98621c1e8109ff42000e69d26eff5c336675f22e6b47c92363196f989a8f990ac9b2f286219d4d5f8866bc5380aa4bbbe0f71e25c80762a797fc60e8199d WHIRLPOOL 8f83756be5806c27aebefb15db96baadd3a12da4eaafb216cfc9e89a8c99b56144153e94347a625fcbdafdb815907c7e7289ffbd0c8d98c7c98c723ddc535195
+EBUILD libsrtp-1.4.4_p20121108-r1.ebuild 2155 SHA256 ad85b1a6e61bd30bf1ef85130b7a9df6a162a2ecb1ced6e286c9a9c4922a5944 SHA512 c8bdfa24074f95d245c7c07c077dcbeac210de8d3188d4ae307731d5cfb6087751ff50909153a10d0032320c568e9a036be626557d89458c5e57ea6deac58d9a WHIRLPOOL 8aefedd205b849a488b65de7e14fde42272a34e7c86676df70bffc372f30dcc7b1fa1f668e5439c5d33241ca0402743544327a26e2ddaa6d994621eb373ccda2
+EBUILD libsrtp-1.4.4_p20121108.ebuild 2113 SHA256 32e64e09d48f5d4df5a5aa68d871387574adf78f1dc09b4da1746c7e7476c328 SHA512 2a5770493f2aed583760c82d4dc210ee039a58b5eed52e5c2e6ea0f67591aa3f42201d3e703404899386b99ba0cfc6f606633302f4e9ad6409abfcf2b5f6bf70 WHIRLPOOL 6f009adcb55351443601d87fb80d22336e873bdba2452771a753da0dc09425f38eeca6b617f74c0ee04154add3df9fd37ff21c47380334e9feacd1060edab39f
+EBUILD libsrtp-1.5.2-r1.ebuild 2127 SHA256 1087729183941e36ebd563b5b0c292df16bc29d3347d3380f5f91c49c373fac7 SHA512 45515b72f71ad743925d051cb24118eb7e2be8d338dbb4660beb4849a7437183a16750b50900b018158d578b0ce1bdee3afd82a0be01b51bcdea9a4eacf208fe WHIRLPOOL c3df9be7ba57475f6eb5b0bf9c6b64793e2b63ce6a509b0dd1f455a32e9a6d01a19042f6a84ea137fd40c617ef671ff020ec306119d31828cc386d2377e6a90c
+EBUILD libsrtp-1.5.2.ebuild 2005 SHA256 472ed5f165d2c3b010da0d3d56605651011724a6b101a506a37c283cf6e33735 SHA512 481461a38a83e1cf8e98335cca602f488b09f4c3a235c7359522008c020f2e33686c0d8821813090a8f4942f8cfd755409b7b911c05d3b69966c38e9670e83de WHIRLPOOL 33734d1162c02e5670d0a38dab200b5b0e5e636e02ecee1f22de7fb0484d3d490e47a5a43459cb89193bcf7037e321a517d168cd2f55e6cbcdc08c249713b634
+EBUILD libsrtp-1.5.4-r1.ebuild 2184 SHA256 6ac294e94b98f47ad1558e0f2ba3f511a36dea2316e3cc4116425d90921a4271 SHA512 f0342c040eef97cb493ffc34ddc6b43a69ea8a2d464fc18db88e541eaaf4140322a56a59a129ee46bb55d8be51cee152e0561f1a8e64cfbefaae8426ccfb6323 WHIRLPOOL 4fe73348eb26a202870f4f2d5eb2f718addc20cc11eb4a204053ad892589a3fb20af8541379457e50c3b11fb1f6ed64f153da6531219f94739422f15e7b1f866
+EBUILD libsrtp-1.5.4.ebuild 1875 SHA256 c8a8ac9595cbc8ca898140e99ad040c29f13d9a2ac20a5906d0d826dccc4a4c4 SHA512 bd6823d4229558fbd9d0091646efa45b57b1366ed4bf59ad764139ccd8a0c34b024945e5db48790c91e2053f503cbae4cbcd628a89ac982a006bf4b12f4a414a WHIRLPOOL 6600657edd7f2869c2b2183753bc639c28e8fa8c36c5c18319c782d3777c13fc7352f7cb7aef35af4dde91add8bce11411133c5aa3398229af418a2263f7a20b
+EBUILD libsrtp-1.6.0.ebuild 2184 SHA256 6ac294e94b98f47ad1558e0f2ba3f511a36dea2316e3cc4116425d90921a4271 SHA512 f0342c040eef97cb493ffc34ddc6b43a69ea8a2d464fc18db88e541eaaf4140322a56a59a129ee46bb55d8be51cee152e0561f1a8e64cfbefaae8426ccfb6323 WHIRLPOOL 4fe73348eb26a202870f4f2d5eb2f718addc20cc11eb4a204053ad892589a3fb20af8541379457e50c3b11fb1f6ed64f153da6531219f94739422f15e7b1f866
+EBUILD libsrtp-2.0.0-r1.ebuild 1911 SHA256 e17ac6ce6f8f9d7dc92a8a71dc058356ce8bbcc79281d90547c2587005ba746a SHA512 8ee91195f444de10b1fcce602943d099ecf7ef4b2e4cae9d92c41fb71842db6395ec572bd298669069138f4525ae4008480c36000525d02f16ce8fe7ff5e757f WHIRLPOOL 62f37083c3929ec651e75137eb5ff13781b0c81050c2036ffa89308e80d487bb228d979ae7857b8c3be118e2e7930200b3e125d4220c9aaa60207224e053a92b
+EBUILD libsrtp-2.0.0.ebuild 1711 SHA256 8eba43f461b8052efdbf050a29f2b474b1d359e60b2bce01da922deef01281c6 SHA512 68343d3a4f86f72f6881e885a89110360e7e342ae65fac94706c0e08fcd6af7a0d00bf3cdff91f11cb77482e86ddbe7b041df7c4a9a59b54caa79e2346fa9c62 WHIRLPOOL 4e0a2efee6b2cf749ef314a4e86b99fc4e77e3b59f5c123e884365bc39f9472e15d118f7543520a81ad23c284e463b40e6d610854a6c6b539d80fb69cb3bf4cd
+EBUILD libsrtp-2.1.0.ebuild 1850 SHA256 523060ce5fbdb0f0816ae96adc92fb5638882fb1587f9e1c3f683518104ec22a SHA512 801ca4e6cc10549d56ecd6395d1a2e66f2a73624fc5502b9fc07bcf19f50f8f1c9bdea2d1463637d07c163b2ce2c598593925163aad10eaa9a76956b53442128 WHIRLPOOL c02ca82756b0f53ba49b555020811eae2b6c3d84142282c5a20b7e9b3ec8e68a50e85ea623ac1e8ae506075ad88c6ad878e672574b8b0f86cb6e6315102f6dd1
+MISC ChangeLog 4155 SHA256 c16fdf6c36cb4f618eced337c931b4b464eb897d33c6433ab1a24afad1b08c2c SHA512 0f2f8dcceb21edb8da9c86dab6d36cef79c732755d39241ab6684ba7041204797b18ebf67c11f06965218c2b2491bcfffd62d96ae63fc3122f42eebd41dec391 WHIRLPOOL 07bd8f6189abd30619b6bd5c6d0cc2ee938b04f1ee90abf39205de4e8c14a3ad8bbdf317fed75ef3f07de4b8184ec0e146363a94c640ca0741dfcb297fe6def6
+MISC ChangeLog-2015 5629 SHA256 f6250e0193dbdb9278677d602dccea797527d684477f5d9167a2508aeba7417e SHA512 433bb7ad601fed0ae84d5ae710322062263a5dec396c4267532cb869e1fbba69b77d7851dbe3eed42e5171681add453354b90be640e31ff9fedffaea9c39436b WHIRLPOOL 17093fd648972758ced3b0cf678a6d48cbd5067a1b88070353bf025cda50433693af16e5d226c208b49303c5b686aea0953970cc6b24ba7df42334cede2f31e2
+MISC metadata.xml 785 SHA256 40ae66bca7a05ddd83c0bd492b8146cf1a0cd5e95534b83698c21fe35a4d021f SHA512 3c23a7d6242dc7d42e34681850ad861bb67a5c44c5113ef5a82201127900e66bfbe03d065f60410d5652ed2abada24b1ac373a6c061392b48afb97080caa718d WHIRLPOOL 28ad2e7cec31ca8e870a5f64a3bd08bc272c9c2785fcf363832d61e95477cfe99ece961a866d0d276b3cb3b74e9171a71d4c907632ae36943fb5f5784f5e66af
diff --git a/net-libs/libsrtp/files/libsrtp-1.4.4-invalid-index.patch b/net-libs/libsrtp/files/libsrtp-1.4.4-invalid-index.patch
new file mode 100644
index 000000000000..90a8f019fd43
--- /dev/null
+++ b/net-libs/libsrtp/files/libsrtp-1.4.4-invalid-index.patch
@@ -0,0 +1,11 @@
+--- srtp/crypto/replay/rdb.c.orig 2012-03-20 14:52:32.890017830 +0100
++++ srtp/crypto/replay/rdb.c 2012-03-20 14:56:31.670017835 +0100
+@@ -115,7 +115,7 @@
+
+ /* shift the window forward by delta bits*/
+ v128_left_shift(&rdb->bitmask, delta);
+- v128_set_bit(&rdb->bitmask, rdb_bits_in_bitmask-delta);
++ v128_set_bit(&rdb->bitmask, rdb_bits_in_bitmask-1);
+ rdb->window_start += delta;
+
+ }
diff --git a/net-libs/libsrtp/files/libsrtp-1.4.4-shared.patch b/net-libs/libsrtp/files/libsrtp-1.4.4-shared.patch
new file mode 100644
index 000000000000..43b8843603c1
--- /dev/null
+++ b/net-libs/libsrtp/files/libsrtp-1.4.4-shared.patch
@@ -0,0 +1,52 @@
+--- srtp/Makefile.in
++++ srtp/Makefile.in
+@@ -65,11 +65,11 @@
+
+
+ # implicit rules for object files and test apps
+
+ %.o: %.c
+- $(COMPILE) -c $< -o $@
++ $(COMPILE) -fPIC -c $< -o $@
+
+ %$(EXE): %.c
+ $(COMPILE) $(LDFLAGS) $< -o $@ $(SRTPLIB) $(LIBS)
+
+
+@@ -103,10 +103,16 @@
+
+ libsrtp.a: $(srtpobj) $(cryptobj) $(gdoi)
+ ar cr libsrtp.a $^
+ $(RANLIB) libsrtp.a
+
++libsrtp.so: $(srtpobj) $(cryptobj) $(gdoi)
++ $(CC) $(LDFLAGS) -shared -Wl,-soname,libsrtp.so.1 -o libsrtp.so.1.0 $^
++
++libsrtp.dylib: $(srtpobj) $(cryptobj) $(gdoi)
++ $(CC) $(LDFLAGS) -dynamiclib -install_name $(libdir)/libsrtp.1.dylib -o libsrtp.1.0.dylib $^
++
+ # libcryptomath.a contains general-purpose routines that are used to
+ # generate tables and verify cryptoalgorithm implementations - this
+ # library is not meant to be included in production code
+
+ cryptomath = crypto/math/math.o crypto/math/gf2_8.o
+@@ -195,10 +198,20 @@
+ $(INSTALL) -d $(DESTDIR)$(includedir)/srtp
+ $(INSTALL) -d $(DESTDIR)$(libdir)
+ cp include/*.h $(DESTDIR)$(includedir)/srtp
+ cp crypto/include/*.h $(DESTDIR)$(includedir)/srtp
+ if [ -f libsrtp.a ]; then cp libsrtp.a $(DESTDIR)$(libdir)/; fi
++ if [ -f libsrtp.so.1.0 ]; then \
++ cp libsrtp.so.1.0 $(DESTDIR)$(libdir)/; \
++ ln -s libsrtp.so.1.0 $(DESTDIR)$(libdir)/libsrtp.so.1; \
++ ln -s libsrtp.so.1.0 $(DESTDIR)$(libdir)/libsrtp.so; \
++ fi
++ if [ -f libsrtp.1.0.dylib ]; then \
++ cp libsrtp.1.0.dylib $(DESTDIR)$(libdir)/; \
++ ln -s libsrtp.1.0.dylib $(DESTDIR)$(libdir)/libsrtp.1.dylib; \
++ ln -s libsrtp.1.0.dylib $(DESTDIR)$(libdir)/libsrtp.dylib; \
++ fi
+
+ uninstall:
+ rm -rf $(DESTDIR)$(includedir)/srtp
+ rm -rf $(DESTDIR)$(libdir)/libsrtp.a
diff --git a/net-libs/libsrtp/files/libsrtp-1.4.4_p20121108-shared.patch b/net-libs/libsrtp/files/libsrtp-1.4.4_p20121108-shared.patch
new file mode 100644
index 000000000000..4e70a0ddd34e
--- /dev/null
+++ b/net-libs/libsrtp/files/libsrtp-1.4.4_p20121108-shared.patch
@@ -0,0 +1,55 @@
+Description: Hack build routines to compile shared library
+Author: loki_val and solar
+Origin: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-libs/libsrtp/files/libsrtp-1.4.4-shared.patch
+Last-Update: 2010-03-19
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -15,7 +15,7 @@
+
+ .PHONY: all test build_table_apps
+
+-all: test
++all: libsrtp.so test
+
+ runtest: build_table_apps test
+ @echo "running libsrtp test applications..."
+@@ -67,7 +67,7 @@
+ # implicit rules for object files and test apps
+
+ %.o: %.c
+- $(COMPILE) -c $< -o $@
++ $(COMPILE) -fPIC -c $< -o $@
+
+ %$(EXE): %.c
+ $(COMPILE) $(LDFLAGS) $< -o $@ $(SRTPLIB) $(LIBS)
+@@ -105,6 +105,9 @@
+ ar cr libsrtp.a $^
+ $(RANLIB) libsrtp.a
+
++libsrtp.so: $(srtpobj) $(cryptobj) $(gdoi)
++ $(CC) $(LDFLAGS) -shared -Wl,-soname,libsrtp.so.0 -o libsrtp.so.0.0 $^
++
+ # libcryptomath.a contains general-purpose routines that are used to
+ # generate tables and verify cryptoalgorithm implementations - this
+ # library is not meant to be included in production code
+@@ -198,6 +201,11 @@
+ cp $(srcdir)/crypto/include/*.h $(DESTDIR)$(includedir)/srtp
+ if [ "$(srcdir)" != "." ]; then cp crypto/include/*.h $(DESTDIR)$(includedir)/srtp; fi
+ if [ -f libsrtp.a ]; then cp libsrtp.a $(DESTDIR)$(libdir)/; fi
++ if [ -f libsrtp.so.0.0 ]; then \
++ cp libsrtp.so.0.0 $(DESTDIR)$(libdir)/; \
++ ln -s libsrtp.so.0.0 $(DESTDIR)$(libdir)/libsrtp.so.0; \
++ ln -s libsrtp.so.0.0 $(DESTDIR)$(libdir)/libsrtp.so; \
++ fi
+
+ uninstall:
+ rm -f $(DESTDIR)$(includedir)/srtp/*.h
+@@ -206,7 +214,7 @@
+
+ clean:
+ rm -rf $(cryptobj) $(srtpobj) $(cryptomath) TAGS \
+- libcryptomath.a libsrtp.a core *.core test/core
++ libcryptomath.a libsrtp.a libsrtp.so.0.0 core *.core test/core
+ for a in * */* */*/*; do \
+ if [ -f "$$a~" ] ; then rm -f $$a~; fi; \
+ done;
diff --git a/net-libs/libsrtp/files/libsrtp-1.5.2-bindir.patch b/net-libs/libsrtp/files/libsrtp-1.5.2-bindir.patch
new file mode 100644
index 000000000000..2c71faf48ba9
--- /dev/null
+++ b/net-libs/libsrtp/files/libsrtp-1.5.2-bindir.patch
@@ -0,0 +1,19 @@
+diff --git a/Makefile.in b/Makefile.in
+index 1a40de2..02f090c 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -252,13 +252,13 @@ libsrtpdoc:
+ install:
+ $(INSTALL) -d $(DESTDIR)$(includedir)/srtp
+ $(INSTALL) -d $(DESTDIR)$(libdir)
+- $(INSTALL) -d $(DESTDIR)$(bindir)
+ cp $(srcdir)/include/*.h $(DESTDIR)$(includedir)/srtp
+ cp $(srcdir)/crypto/include/*.h $(DESTDIR)$(includedir)/srtp
+ if [ "$(srcdir)" != "." ]; then cp crypto/include/*.h $(DESTDIR)$(includedir)/srtp; fi
+ if [ -f libsrtp.a ]; then cp libsrtp.a $(DESTDIR)$(libdir)/; fi
+ if [ -f libsrtp.dll.a ]; then cp libsrtp.dll.a $(DESTDIR)$(libdir)/; fi
+ if [ -f libsrtp.$(SHAREDLIBSUFFIX) ]; then \
++ $(INSTALL) -d $(DESTDIR)$(SHAREDLIB_DIR); \
+ cp libsrtp.$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR)/; \
+ ln -sfn libsrtp.$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR)/libsrtp.$(SHAREDLIBSUFFIXNOVER); \
+ fi
diff --git a/net-libs/libsrtp/files/libsrtp-1.5.2-fix-make-install.patch b/net-libs/libsrtp/files/libsrtp-1.5.2-fix-make-install.patch
new file mode 100644
index 000000000000..f3f1f0e5c1ae
--- /dev/null
+++ b/net-libs/libsrtp/files/libsrtp-1.5.2-fix-make-install.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.in b/Makefile.in
+index 002d25d..1a40de2 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -260,7 +260,7 @@ install:
+ if [ -f libsrtp.dll.a ]; then cp libsrtp.dll.a $(DESTDIR)$(libdir)/; fi
+ if [ -f libsrtp.$(SHAREDLIBSUFFIX) ]; then \
+ cp libsrtp.$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR)/; \
+- cp libsrtp.$(SHAREDLIBSUFFIXNOVER) $(DESTDIR)$(SHAREDLIB_DIR)/; \
++ ln -sfn libsrtp.$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR)/libsrtp.$(SHAREDLIBSUFFIXNOVER); \
+ fi
+ if [ "$(pkgconfig_DATA)" != "" ]; then \
+ $(INSTALL) -d $(DESTDIR)$(pkgconfigdir); \
diff --git a/net-libs/libsrtp/files/libsrtp-2.1.0-pcap-automagic-r0.patch b/net-libs/libsrtp/files/libsrtp-2.1.0-pcap-automagic-r0.patch
new file mode 100644
index 000000000000..b29fa1ba4f95
--- /dev/null
+++ b/net-libs/libsrtp/files/libsrtp-2.1.0-pcap-automagic-r0.patch
@@ -0,0 +1,17 @@
+diff -uNr libsrtp-2.1.0.ORIG/configure.in libsrtp-2.1.0/configure.in
+--- libsrtp-2.1.0.ORIG/configure.in 2017-09-18 23:53:18.241631991 +0100
++++ libsrtp-2.1.0/configure.in 2017-09-18 23:55:30.077635461 +0100
+@@ -272,10 +272,13 @@
+ AC_SUBST([HMAC_OBJS])
+
+ dnl Checking for PCAP
++AC_ARG_ENABLE([pcap], AS_HELP_STRING([--disable-pcap], [Build without `pcap' library (-lpcap)]))
++AS_IF([test "x$enable_pcap" != "xno"], [
+ AC_CHECK_LIB([pcap], [pcap_create],
+ [LIBS="-lpcap $LIBS"
+ AC_DEFINE([HAVE_PCAP], [1], [Define to 1 if you have the `pcap' library (-lpcap)])
+ AC_SUBST([HAVE_PCAP], [1])])
++])
+
+ AC_MSG_CHECKING([whether to redirect logging to stdout])
+ AC_ARG_ENABLE([log-stdout],
diff --git a/net-libs/libsrtp/files/libsrtp-CVE-2013-2139.diff b/net-libs/libsrtp/files/libsrtp-CVE-2013-2139.diff
new file mode 100644
index 000000000000..dcafe177638b
--- /dev/null
+++ b/net-libs/libsrtp/files/libsrtp-CVE-2013-2139.diff
@@ -0,0 +1,46 @@
+diff --git a/srtp/srtp.c b/srtp/srtp.c
+index 839c1ee..7fd19e6 100644
+--- a/srtp/srtp.c
++++ b/srtp/srtp.c
+@@ -2063,23 +2063,18 @@ static inline int base_key_length(const cipher_type_t *cipher, int key_length)
+ switch(profile) {
+ case srtp_profile_aes128_cm_sha1_80:
+ crypto_policy_set_aes_cm_128_hmac_sha1_80(policy);
+- crypto_policy_set_aes_cm_128_hmac_sha1_80(policy);
+ break;
+ case srtp_profile_aes128_cm_sha1_32:
+ crypto_policy_set_aes_cm_128_hmac_sha1_32(policy);
+- crypto_policy_set_aes_cm_128_hmac_sha1_80(policy);
+ break;
+ case srtp_profile_null_sha1_80:
+ crypto_policy_set_null_cipher_hmac_sha1_80(policy);
+- crypto_policy_set_null_cipher_hmac_sha1_80(policy);
+ break;
+ case srtp_profile_aes256_cm_sha1_80:
+ crypto_policy_set_aes_cm_256_hmac_sha1_80(policy);
+- crypto_policy_set_aes_cm_256_hmac_sha1_80(policy);
+ break;
+ case srtp_profile_aes256_cm_sha1_32:
+ crypto_policy_set_aes_cm_256_hmac_sha1_32(policy);
+- crypto_policy_set_aes_cm_256_hmac_sha1_80(policy);
+ break;
+ /* the following profiles are not (yet) supported */
+ case srtp_profile_null_sha1_32:
+@@ -2100,6 +2095,8 @@ static inline int base_key_length(const cipher_type_t *cipher, int key_length)
+ crypto_policy_set_aes_cm_128_hmac_sha1_80(policy);
+ break;
+ case srtp_profile_aes128_cm_sha1_32:
++ /* We do not honor the 32-bit auth tag request since
++ * this is not compliant with RFC 3711 */
+ crypto_policy_set_aes_cm_128_hmac_sha1_80(policy);
+ break;
+ case srtp_profile_null_sha1_80:
+@@ -2109,6 +2106,8 @@ static inline int base_key_length(const cipher_type_t *cipher, int key_length)
+ crypto_policy_set_aes_cm_256_hmac_sha1_80(policy);
+ break;
+ case srtp_profile_aes256_cm_sha1_32:
++ /* We do not honor the 32-bit auth tag request since
++ * this is not compliant with RFC 3711 */
+ crypto_policy_set_aes_cm_256_hmac_sha1_80(policy);
+ break;
+ /* the following profiles are not (yet) supported */
diff --git a/net-libs/libsrtp/files/libsrtp-pcap-automagic-r0.patch b/net-libs/libsrtp/files/libsrtp-pcap-automagic-r0.patch
new file mode 100644
index 000000000000..12c677e2e5aa
--- /dev/null
+++ b/net-libs/libsrtp/files/libsrtp-pcap-automagic-r0.patch
@@ -0,0 +1,19 @@
+--- a/configure.in 2015-03-25 15:37:31.953386365 +0000
++++ b/configure.in 2015-03-25 15:39:49.192183689 +0000
+@@ -182,6 +182,8 @@
+ AC_SUBST(HMAC_OBJS)
+
+ dnl Checking for PCAP
++AC_ARG_ENABLE([pcap], AS_HELP_STRING([--disable-pcap], [Build without `pcap' library (-lpcap)]))
++AS_IF([test "x$enable_pcap" != "xno"], [
+ AC_CHECK_LIB([pcap],[pcap_create],
+ [PCAP=1
+ LIBS="-lpcap $LIBS"
+@@ -189,6 +191,7 @@
+ AC_DEFINE(HAVE_PCAP, 1, [Define to 1 if you have the `pcap' library (-lpcap)])
+ AC_SUBST(HAVE_PCAP)
+ ])
++])
+
+ AC_MSG_CHECKING(whether to use syslog for error reporting)
+ AC_ARG_ENABLE(syslog,
diff --git a/net-libs/libsrtp/libsrtp-1.4.4-r1.ebuild b/net-libs/libsrtp/libsrtp-1.4.4-r1.ebuild
new file mode 100644
index 000000000000..a1cf69cf69c6
--- /dev/null
+++ b/net-libs/libsrtp/libsrtp-1.4.4-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+inherit eutils multilib
+
+MY_PN="srtp"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)"
+HOMEPAGE="http://srtp.sourceforge.net/srtp.html"
+SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 ~hppa ia64 ppc ppc64 -sparc x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="aesicm console debug doc syslog"
+
+S=${WORKDIR}/${MY_PN}
+
+src_prepare() {
+ # generate a shared lib
+ epatch "${FILESDIR}"/${P}-shared.patch
+}
+
+src_configure() {
+ # stdout: default error output for messages in debug
+ # kernel-linux: breaks the build
+ # gdoi: disabled by upstream and breaks the build
+ econf \
+ --enable-stdout \
+ --disable-kernel-linux \
+ --disable-gdoi \
+ $(use_enable aesicm generic-aesicm) \
+ $(use_enable console) \
+ $(use_enable debug) \
+ $(use_enable syslog)
+}
+
+src_compile() {
+ # target all is building test
+ emake ${PN}.a ${PN}$(get_libname) || die "emake failed"
+}
+
+src_test() {
+ # getopt returns an int, not a char
+ sed -i -e "s/char q/int q/" \
+ test/rdbx_driver.c test/srtp_driver.c test/dtls_srtp_driver.c \
+ || die "fixing getopt errors failed"
+
+ # test/rtpw_test.sh is assuming . is in $PATH
+ sed -i -e "s:\$RTPW :./\$RTPW :" test/rtpw_test.sh \
+ || die "patching test/rtpw_test.sh failed"
+
+ # test/rtpw.c is using /usr/share/dict/words assuming it exists
+ # using test/rtpw.c guaratees the file exists in any case
+ sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c \
+ || die "patching test/rtpw.c failed"
+
+ emake test || die "building test failed"
+ emake -j1 runtest || die "tests failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ dodoc CHANGES README TODO || die "dodoc failed"
+
+ if use doc; then
+ # libsrtp.pdf can also be generated with doxygen
+ # but it would be a waste of time as an up-to-date version is built
+ dodoc doc/*.txt doc/${PN}.pdf || die "dodoc failed"
+ fi
+}
diff --git a/net-libs/libsrtp/libsrtp-1.4.4-r2.ebuild b/net-libs/libsrtp/libsrtp-1.4.4-r2.ebuild
new file mode 100644
index 000000000000..403cd47ab0c9
--- /dev/null
+++ b/net-libs/libsrtp/libsrtp-1.4.4-r2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit base multilib
+
+MY_PN="srtp"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)"
+HOMEPAGE="http://srtp.sourceforge.net/srtp.html"
+SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="aesicm console debug doc static-libs syslog"
+PATCHES=( "${FILESDIR}/${P}-shared.patch"
+ "${FILESDIR}/${P}-invalid-index.patch" )
+
+S=${WORKDIR}/${MY_PN}
+
+src_configure() {
+ # stdout: default error output for messages in debug
+ # kernel-linux: breaks the build
+ # gdoi: disabled by upstream and breaks the build
+ econf \
+ --enable-stdout \
+ --disable-kernel-linux \
+ --disable-gdoi \
+ $(use_enable aesicm generic-aesicm) \
+ $(use_enable console) \
+ $(use_enable debug) \
+ $(use_enable syslog)
+}
+
+src_compile() {
+ if use static-libs; then
+ emake ${PN}.a || die "Failed to build static library"
+ fi
+ emake ${PN}$(get_libname) || die "Failed to build dynamic library"
+}
+
+src_test() {
+ # getopt returns an int, not a char
+ sed -i -e "s/char q/int q/" \
+ test/rdbx_driver.c test/srtp_driver.c test/dtls_srtp_driver.c \
+ || die "fixing getopt errors failed"
+
+ # test/rtpw_test.sh is assuming . is in $PATH
+ sed -i -e "s:\$RTPW :./\$RTPW :" test/rtpw_test.sh \
+ || die "patching test/rtpw_test.sh failed"
+
+ # test/rtpw.c is using /usr/share/dict/words assuming it exists
+ # using test/rtpw.c guaratees the file exists in any case
+ sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c \
+ || die "patching test/rtpw.c failed"
+
+ emake test || die "building test failed"
+ emake -j1 runtest || die "tests failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ dodoc CHANGES README TODO || die "dodoc failed"
+
+ if use doc; then
+ # libsrtp.pdf can also be generated with doxygen
+ # but it would be a waste of time as an up-to-date version is built
+ dodoc doc/*.txt doc/${PN}.pdf || die "dodoc failed"
+ fi
+}
diff --git a/net-libs/libsrtp/libsrtp-1.4.4_p20121108-r1.ebuild b/net-libs/libsrtp/libsrtp-1.4.4_p20121108-r1.ebuild
new file mode 100644
index 000000000000..506809717b15
--- /dev/null
+++ b/net-libs/libsrtp/libsrtp-1.4.4_p20121108-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit base multilib
+
+MY_PN="srtp"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)"
+HOMEPAGE="http://srtp.sourceforge.net/srtp.html"
+SRC_URI="https://dev.gentoo.org/~phajdan.jr/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~hppa ia64 ppc ppc64 -sparc x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="aesicm console debug doc static-libs syslog"
+PATCHES=(
+ "${FILESDIR}/${P}-shared.patch"
+ "${FILESDIR}/${PN}-CVE-2013-2139.diff"
+ )
+
+S=${WORKDIR}/${MY_PN}
+
+src_configure() {
+ # stdout: default error output for messages in debug
+ # kernel-linux: breaks the build
+ # gdoi: disabled by upstream and breaks the build
+ econf \
+ --enable-stdout \
+ --disable-kernel-linux \
+ --disable-gdoi \
+ $(use_enable aesicm generic-aesicm) \
+ $(use_enable console) \
+ $(use_enable debug) \
+ $(use_enable syslog)
+}
+
+src_compile() {
+ if use static-libs; then
+ emake ${PN}.a || die "Failed to build static library"
+ fi
+ emake ${PN}$(get_libname) || die "Failed to build dynamic library"
+}
+
+src_test() {
+ # getopt returns an int, not a char
+ sed -i -e "s/char q/int q/" \
+ test/rdbx_driver.c test/srtp_driver.c test/dtls_srtp_driver.c \
+ || die "fixing getopt errors failed"
+
+ # test/rtpw_test.sh is assuming . is in $PATH
+ sed -i -e "s:\$RTPW :./\$RTPW :" test/rtpw_test.sh \
+ || die "patching test/rtpw_test.sh failed"
+
+ # test/rtpw.c is using /usr/share/dict/words assuming it exists
+ # using test/rtpw.c guaratees the file exists in any case
+ sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c \
+ || die "patching test/rtpw.c failed"
+
+ emake test || die "building test failed"
+ emake -j1 runtest || die "tests failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ dodoc CHANGES README TODO || die "dodoc failed"
+
+ if use doc; then
+ # libsrtp.pdf can also be generated with doxygen
+ # but it would be a waste of time as an up-to-date version is built
+ dodoc doc/*.txt doc/${PN}.pdf || die "dodoc failed"
+ fi
+}
diff --git a/net-libs/libsrtp/libsrtp-1.4.4_p20121108.ebuild b/net-libs/libsrtp/libsrtp-1.4.4_p20121108.ebuild
new file mode 100644
index 000000000000..516523cd0a82
--- /dev/null
+++ b/net-libs/libsrtp/libsrtp-1.4.4_p20121108.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit base multilib
+
+MY_PN="srtp"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)"
+HOMEPAGE="http://srtp.sourceforge.net/srtp.html"
+SRC_URI="https://dev.gentoo.org/~phajdan.jr/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~hppa ia64 ppc ppc64 -sparc x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="aesicm console debug doc static-libs syslog"
+PATCHES=( "${FILESDIR}/${P}-shared.patch" )
+
+S=${WORKDIR}/${MY_PN}
+
+src_configure() {
+ # stdout: default error output for messages in debug
+ # kernel-linux: breaks the build
+ # gdoi: disabled by upstream and breaks the build
+ econf \
+ --enable-stdout \
+ --disable-kernel-linux \
+ --disable-gdoi \
+ $(use_enable aesicm generic-aesicm) \
+ $(use_enable console) \
+ $(use_enable debug) \
+ $(use_enable syslog)
+}
+
+src_compile() {
+ if use static-libs; then
+ emake ${PN}.a || die "Failed to build static library"
+ fi
+ emake ${PN}$(get_libname) || die "Failed to build dynamic library"
+}
+
+src_test() {
+ # getopt returns an int, not a char
+ sed -i -e "s/char q/int q/" \
+ test/rdbx_driver.c test/srtp_driver.c test/dtls_srtp_driver.c \
+ || die "fixing getopt errors failed"
+
+ # test/rtpw_test.sh is assuming . is in $PATH
+ sed -i -e "s:\$RTPW :./\$RTPW :" test/rtpw_test.sh \
+ || die "patching test/rtpw_test.sh failed"
+
+ # test/rtpw.c is using /usr/share/dict/words assuming it exists
+ # using test/rtpw.c guaratees the file exists in any case
+ sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c \
+ || die "patching test/rtpw.c failed"
+
+ emake test || die "building test failed"
+ emake -j1 runtest || die "tests failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ dodoc CHANGES README TODO || die "dodoc failed"
+
+ if use doc; then
+ # libsrtp.pdf can also be generated with doxygen
+ # but it would be a waste of time as an up-to-date version is built
+ dodoc doc/*.txt doc/${PN}.pdf || die "dodoc failed"
+ fi
+}
diff --git a/net-libs/libsrtp/libsrtp-1.5.2-r1.ebuild b/net-libs/libsrtp/libsrtp-1.5.2-r1.ebuild
new file mode 100644
index 000000000000..306208cfa010
--- /dev/null
+++ b/net-libs/libsrtp/libsrtp-1.5.2-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit autotools eutils
+
+DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)"
+HOMEPAGE="https://github.com/cisco/libsrtp"
+SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/1"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="aesicm console debug doc openssl static-libs syslog test"
+
+DEPEND="openssl? ( dev-libs/openssl:0 )"
+RDEPEND="${DEPEND}"
+
+DOCS=( CHANGES README TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-pcap-automagic-r0.patch"
+ epatch "${FILESDIR}/${P}-fix-make-install.patch"
+ epatch "${FILESDIR}/${P}-bindir.patch"
+
+ # getopt returns an int, not a char
+ sed -i -e "s/char q/int q/" \
+ test/rdbx_driver.c test/srtp_driver.c test/dtls_srtp_driver.c || die
+
+ # test/rtpw_test.sh is assuming . is in $PATH
+ sed -i -e "s:\$RTPW :./\$RTPW :" test/rtpw_test.sh || die
+
+ # test/rtpw.c is using /usr/share/dict/words assuming it exists
+ # using test/rtpw.c guaratees the file exists in any case
+ sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # stdout: default error output for messages in debug
+ # kernel-linux: breaks the build
+ # gdoi: disabled by upstream and breaks the build
+ # pcap: seems to be test-only
+ econf \
+ --enable-stdout \
+ --disable-kernel-linux \
+ --disable-gdoi \
+ --disable-pcap \
+ $(use_enable aesicm generic-aesicm) \
+ $(use_enable console) \
+ $(use_enable debug) \
+ $(use_enable openssl) \
+ $(use_enable syslog)
+}
+
+src_compile() {
+ use static-libs && emake ${PN}.a
+ emake shared_library
+ use test && emake test
+}
+
+src_test() {
+ LD_LIBRARY_PATH="${S}" emake -j1 runtest
+
+ # Makefile.in has '$(testapp): libsrtp.a'
+ if use !static-libs; then
+ rm libsrtp.a || die
+ fi
+}
+
+src_install() {
+ default
+
+ # libsrtp.pdf can also be generated with doxygen
+ # but it would be a waste of time as an up-to-date version is built
+ use doc && dodoc doc/*.txt doc/${PN}.pdf
+}
diff --git a/net-libs/libsrtp/libsrtp-1.5.2.ebuild b/net-libs/libsrtp/libsrtp-1.5.2.ebuild
new file mode 100644
index 000000000000..d13db21b9984
--- /dev/null
+++ b/net-libs/libsrtp/libsrtp-1.5.2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit autotools base multilib
+
+DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)"
+HOMEPAGE="https://github.com/cisco/libsrtp"
+SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="aesicm console debug doc openssl static-libs syslog"
+
+DEPEND="openssl? ( dev-libs/openssl:0 )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-pcap-automagic-r0.patch"
+ eautoreconf || die
+}
+
+src_configure() {
+ # stdout: default error output for messages in debug
+ # kernel-linux: breaks the build
+ # gdoi: disabled by upstream and breaks the build
+ # pcap: seems to be test-only
+ econf \
+ --enable-stdout \
+ --disable-kernel-linux \
+ --disable-gdoi \
+ --disable-pcap \
+ $(use_enable aesicm generic-aesicm) \
+ $(use_enable console) \
+ $(use_enable debug) \
+ $(use_enable openssl) \
+ $(use_enable syslog)
+}
+
+src_compile() {
+ if use static-libs; then
+ emake ${PN}.a || die
+ fi
+ emake shared_library || die
+}
+
+src_test() {
+ # getopt returns an int, not a char
+ sed -i -e "s/char q/int q/" \
+ test/rdbx_driver.c test/srtp_driver.c test/dtls_srtp_driver.c || die
+
+ # test/rtpw_test.sh is assuming . is in $PATH
+ sed -i -e "s:\$RTPW :./\$RTPW :" test/rtpw_test.sh || die
+
+ # test/rtpw.c is using /usr/share/dict/words assuming it exists
+ # using test/rtpw.c guaratees the file exists in any case
+ sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c || die
+
+ emake test || die
+ emake -j1 runtest || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+
+ dodoc CHANGES README TODO || die
+
+ if use doc; then
+ # libsrtp.pdf can also be generated with doxygen
+ # but it would be a waste of time as an up-to-date version is built
+ dodoc doc/*.txt doc/${PN}.pdf || die
+ fi
+}
diff --git a/net-libs/libsrtp/libsrtp-1.5.4-r1.ebuild b/net-libs/libsrtp/libsrtp-1.5.4-r1.ebuild
new file mode 100644
index 000000000000..01c124760188
--- /dev/null
+++ b/net-libs/libsrtp/libsrtp-1.5.4-r1.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)"
+HOMEPAGE="https://github.com/cisco/libsrtp"
+SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="aesicm console debug doc libressl openssl static-libs syslog test"
+
+RDEPEND="
+ openssl? (
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ )
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( CHANGES README TODO )
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/srtp/config.h
+)
+PATCHES=( "${FILESDIR}/${PN}-pcap-automagic-r0.patch" )
+
+src_prepare() {
+ default
+
+ # test/rtpw.c is using /usr/share/dict/words assuming it exists
+ # using test/rtpw.c guaratees the file exists in any case
+ sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c || die
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ # stdout: default error output for messages in debug
+ # kernel-linux: breaks the build
+ # gdoi: disabled by upstream and breaks the build
+ # pcap: seems to be test-only
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-stdout \
+ --disable-kernel-linux \
+ --disable-gdoi \
+ --disable-pcap \
+ $(use_enable aesicm generic-aesicm) \
+ $(use_enable console) \
+ $(use_enable debug) \
+ $(use_enable openssl) \
+ $(use_enable syslog)
+}
+
+multilib_src_compile() {
+ use static-libs && emake ${PN}.a
+ emake shared_library
+ use test && emake test
+}
+
+multilib_src_test() {
+ # work-around tests that do not like out-of-source builds
+ cp "${S}"/test/{getopt_s,rtpw}.c "${BUILD_DIR}"/test/ || die
+
+ LD_LIBRARY_PATH="${BUILD_DIR}" emake -j1 runtest
+
+ # Makefile.in has '$(testapp): libsrtp.a'
+ if use !static-libs; then
+ rm libsrtp.a || die
+ fi
+}
+
+multilib_src_install_all() {
+ # libsrtp.pdf can also be generated with doxygen
+ # but it would be a waste of time as an up-to-date version is built
+ use doc && DOCS+=( doc/*.txt doc/${PN}.pdf )
+ einstalldocs
+}
diff --git a/net-libs/libsrtp/libsrtp-1.5.4.ebuild b/net-libs/libsrtp/libsrtp-1.5.4.ebuild
new file mode 100644
index 000000000000..2cea7278e552
--- /dev/null
+++ b/net-libs/libsrtp/libsrtp-1.5.4.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)"
+HOMEPAGE="https://github.com/cisco/libsrtp"
+SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="aesicm console debug doc libressl openssl static-libs syslog test"
+
+RDEPEND="
+ openssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( CHANGES README TODO )
+
+PATCHES=( "${FILESDIR}/${PN}-pcap-automagic-r0.patch" )
+
+src_prepare() {
+ default
+
+ # test/rtpw.c is using /usr/share/dict/words assuming it exists
+ # using test/rtpw.c guaratees the file exists in any case
+ sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # stdout: default error output for messages in debug
+ # kernel-linux: breaks the build
+ # gdoi: disabled by upstream and breaks the build
+ # pcap: seems to be test-only
+ econf \
+ --enable-stdout \
+ --disable-kernel-linux \
+ --disable-gdoi \
+ --disable-pcap \
+ $(use_enable aesicm generic-aesicm) \
+ $(use_enable console) \
+ $(use_enable debug) \
+ $(use_enable openssl) \
+ $(use_enable syslog)
+}
+
+src_compile() {
+ use static-libs && emake ${PN}.a
+ emake shared_library
+ use test && emake test
+}
+
+src_test() {
+ LD_LIBRARY_PATH="${S}" emake -j1 runtest
+
+ # Makefile.in has '$(testapp): libsrtp.a'
+ if use !static-libs; then
+ rm libsrtp.a || die
+ fi
+}
+
+src_install() {
+ # libsrtp.pdf can also be generated with doxygen
+ # but it would be a waste of time as an up-to-date version is built
+ use doc && DOCS+=( doc/*.txt doc/${PN}.pdf )
+
+ default
+}
diff --git a/net-libs/libsrtp/libsrtp-1.6.0.ebuild b/net-libs/libsrtp/libsrtp-1.6.0.ebuild
new file mode 100644
index 000000000000..01c124760188
--- /dev/null
+++ b/net-libs/libsrtp/libsrtp-1.6.0.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)"
+HOMEPAGE="https://github.com/cisco/libsrtp"
+SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="aesicm console debug doc libressl openssl static-libs syslog test"
+
+RDEPEND="
+ openssl? (
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ )
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( CHANGES README TODO )
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/srtp/config.h
+)
+PATCHES=( "${FILESDIR}/${PN}-pcap-automagic-r0.patch" )
+
+src_prepare() {
+ default
+
+ # test/rtpw.c is using /usr/share/dict/words assuming it exists
+ # using test/rtpw.c guaratees the file exists in any case
+ sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c || die
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ # stdout: default error output for messages in debug
+ # kernel-linux: breaks the build
+ # gdoi: disabled by upstream and breaks the build
+ # pcap: seems to be test-only
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-stdout \
+ --disable-kernel-linux \
+ --disable-gdoi \
+ --disable-pcap \
+ $(use_enable aesicm generic-aesicm) \
+ $(use_enable console) \
+ $(use_enable debug) \
+ $(use_enable openssl) \
+ $(use_enable syslog)
+}
+
+multilib_src_compile() {
+ use static-libs && emake ${PN}.a
+ emake shared_library
+ use test && emake test
+}
+
+multilib_src_test() {
+ # work-around tests that do not like out-of-source builds
+ cp "${S}"/test/{getopt_s,rtpw}.c "${BUILD_DIR}"/test/ || die
+
+ LD_LIBRARY_PATH="${BUILD_DIR}" emake -j1 runtest
+
+ # Makefile.in has '$(testapp): libsrtp.a'
+ if use !static-libs; then
+ rm libsrtp.a || die
+ fi
+}
+
+multilib_src_install_all() {
+ # libsrtp.pdf can also be generated with doxygen
+ # but it would be a waste of time as an up-to-date version is built
+ use doc && DOCS+=( doc/*.txt doc/${PN}.pdf )
+ einstalldocs
+}
diff --git a/net-libs/libsrtp/libsrtp-2.0.0-r1.ebuild b/net-libs/libsrtp/libsrtp-2.0.0-r1.ebuild
new file mode 100644
index 000000000000..c15b98e7a291
--- /dev/null
+++ b/net-libs/libsrtp/libsrtp-2.0.0-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)"
+HOMEPAGE="https://github.com/cisco/libsrtp"
+SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="2/1"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="aesicm console debug doc libressl openssl static-libs syslog test"
+
+RDEPEND="
+ openssl? (
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ )
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( CHANGES README TODO )
+
+PATCHES=( "${FILESDIR}/${PN}-pcap-automagic-r0.patch" )
+
+src_prepare() {
+ default
+
+ # test/rtpw.c is using /usr/share/dict/words assuming it exists
+ # using test/rtpw.c guaratees the file exists in any case
+ sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c || die
+
+ eautoreconf
+
+ # sadly, tests are too broken to even consider using work-arounds
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # stdout: default error output for messages in debug
+ # pcap: seems to be test-only
+ # openssl-kdf: OpenSSL 1.1.0+
+ econf \
+ --enable-stdout \
+ --disable-pcap \
+ --disable-openssl-kdf \
+ $(use_enable aesicm generic-aesicm) \
+ $(use_enable console) \
+ $(use_enable debug) \
+ $(use_enable openssl)
+}
+
+multilib_src_compile() {
+ use static-libs && emake ${PN}.a
+ emake shared_library
+ use test && emake test
+}
+
+multilib_src_test() {
+ LD_LIBRARY_PATH="${BUILD_DIR}" emake -j1 runtest
+
+ # Makefile.in has '$(testapp): libsrtp2.a'
+ if use !static-libs; then
+ rm libsrtp2.a || die
+ fi
+}
+
+multilib_src_install_all() {
+ # libsrtp.pdf can be generated with doxygen, but it seems to be broken.
+ use doc && DOCS+=( doc/*.txt )
+ einstalldocs
+}
diff --git a/net-libs/libsrtp/libsrtp-2.0.0.ebuild b/net-libs/libsrtp/libsrtp-2.0.0.ebuild
new file mode 100644
index 000000000000..828aec3146b7
--- /dev/null
+++ b/net-libs/libsrtp/libsrtp-2.0.0.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)"
+HOMEPAGE="https://github.com/cisco/libsrtp"
+SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="2/1"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="aesicm console debug doc libressl openssl static-libs syslog test"
+
+RDEPEND="
+ openssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( CHANGES README TODO )
+
+PATCHES=( "${FILESDIR}/${PN}-pcap-automagic-r0.patch" )
+
+src_prepare() {
+ default
+
+ # test/rtpw.c is using /usr/share/dict/words assuming it exists
+ # using test/rtpw.c guaratees the file exists in any case
+ sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # stdout: default error output for messages in debug
+ # pcap: seems to be test-only
+ # openssl-kdf: OpenSSL 1.1.0+
+ econf \
+ --enable-stdout \
+ --disable-pcap \
+ --disable-openssl-kdf \
+ $(use_enable aesicm generic-aesicm) \
+ $(use_enable console) \
+ $(use_enable debug) \
+ $(use_enable openssl)
+}
+
+src_compile() {
+ use static-libs && emake ${PN}.a
+ emake shared_library
+ use test && emake test
+}
+
+src_test() {
+ LD_LIBRARY_PATH="${S}" emake -j1 runtest
+
+ # Makefile.in has '$(testapp): libsrtp2.a'
+ if use !static-libs; then
+ rm libsrtp2.a || die
+ fi
+}
+
+src_install() {
+ # libsrtp.pdf can be generated with doxygen, but it seems to be broken.
+ use doc && DOCS+=( doc/*.txt )
+
+ default
+}
diff --git a/net-libs/libsrtp/libsrtp-2.1.0.ebuild b/net-libs/libsrtp/libsrtp-2.1.0.ebuild
new file mode 100644
index 000000000000..2321a7cd5f48
--- /dev/null
+++ b/net-libs/libsrtp/libsrtp-2.1.0.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)"
+HOMEPAGE="https://github.com/cisco/libsrtp"
+SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="2/1"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="aesicm console debug doc libressl openssl static-libs syslog test"
+
+RDEPEND="
+ openssl? (
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ )
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( CHANGES )
+
+PATCHES=( "${FILESDIR}/${P}-pcap-automagic-r0.patch" )
+
+src_prepare() {
+ default
+
+ # test/rtpw.c is using /usr/share/dict/words assuming it exists
+ # using test/rtpw.c guaratees the file exists in any case
+ sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c || die
+
+ eautoreconf
+
+ # sadly, tests are too broken to even consider using work-arounds
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # stdout: default error output for messages in debug
+ # pcap: seems to be test-only
+ # openssl-kdf: OpenSSL 1.1.0+
+ econf \
+ --enable-log-stdout \
+ --disable-pcap \
+ --disable-openssl-kdf \
+ $(use_enable debug debug-logging) \
+ $(use_enable openssl)
+}
+
+multilib_src_compile() {
+ use static-libs && emake ${PN}.a
+ emake shared_library
+ use test && emake test
+}
+
+multilib_src_test() {
+ LD_LIBRARY_PATH="${BUILD_DIR}" emake -j1 runtest
+
+ # Makefile.in has '$(testapp): libsrtp2.a'
+ if use !static-libs; then
+ rm libsrtp2.a || die
+ fi
+}
+
+multilib_src_install_all() {
+ # libsrtp.pdf can be generated with doxygen, but it seems to be broken.
+ use doc && DOCS+=( doc/*.txt )
+ einstalldocs
+}
diff --git a/net-libs/libsrtp/metadata.xml b/net-libs/libsrtp/metadata.xml
new file mode 100644
index 000000000000..452aeee73ceb
--- /dev/null
+++ b/net-libs/libsrtp/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>chromium@gentoo.org</email>
+ <name>Chromium in Gentoo Project</name>
+ </maintainer>
+ <use>
+ <flag name="aesicm">Use AES ICM cryptographic algorithm</flag>
+ <flag name="console">
+ Use /dev/console instead of stdout for error messages
+ </flag>
+ <flag name="openssl">Use OpenSSL crypto primitives</flag>
+ <flag name="syslog">Use syslog for error messages</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">cisco/libsrtp</remote-id>
+ <remote-id type="sourceforge">srtp</remote-id>
+ </upstream>
+</pkgmetadata>