diff options
Diffstat (limited to 'dev-libs/jemalloc')
23 files changed, 800 insertions, 0 deletions
diff --git a/dev-libs/jemalloc/Manifest b/dev-libs/jemalloc/Manifest new file mode 100644 index 000000000000..05e52a6829cd --- /dev/null +++ b/dev-libs/jemalloc/Manifest @@ -0,0 +1,30 @@ +AUX jemalloc-2.2.1-no-pprof.patch 702 SHA256 8e5a36505a90eab85bf746d4eb5a27d473ce25396104a0dd01d25368dd0c099d SHA512 bf06dc0f8a1f3106778425ba1ac817934a5473f77490e33dad5a2254ccb1de312f1712e1e71d1ddeeab0c2abc5bd99778c0b6b4f18656a9e32d67bee21476d89 WHIRLPOOL b7c8b9fda1e3e223e6be3b56fbd1922a5961a95753e6d62e2b2c37eb6d0d4b008421f4d894e55f13f5b668707d59ed5bb4926b1040968ce6dcbae4ab93b0c3a0 +AUX jemalloc-2.2.5_fix_html_install.patch 235 SHA256 900a9c546d56b9a52b4dae9678f62a621c1053357972ce986281da3f44b36d18 SHA512 007b42157afa6727465a939de6da5e579f91196d1491f77eceaebe8c5fd674c08f3b51a05ab7935f8bcf641f2e11a0764ccd9654de926bdde6bc854bd86f9e5c WHIRLPOOL 0d14abd8ee1e6e4dfe09b7a68097d81adde535adb4dcac48260e72c9b7050d59e28bc14184a69b56986c078944ebe75dfeddfe9b4ca4c82dcd27ee2c7a3c6e5a +AUX jemalloc-3.0.0-no-pprof.patch 823 SHA256 63ae4515df9291d8a9407ca91de687347868a0d283fe382397bb0369e34ec995 SHA512 c9d9b9d527ae8b25ec39bb5a562c8b94979d1fd7401dc6ada2c2daf552289b1914573cc7ea709644b8e01717bec3a0d071b4356c566947367c516ed92bf1a4f8 WHIRLPOOL 5ec7739061daf84bda2265f0d67bd333b8034671f79b53c0b55e8c2689604ad87dd17befb538ecd40521c14e6997543fe703989887cfb63d24a48fa894906bfc +AUX jemalloc-3.0.0-strip-optimization.patch 864 SHA256 8937eabe6c24a45decce015a67671ad3e94098a7e0b5be1ab1f27211c50b371c SHA512 d4a1feda1fdceca0a0b58b1719e36286730f35269ee188549055ec435ceabd52ad06c6096542ac9fc3ff38b91db113f1abf89c881481f2131453cd28131ce301 WHIRLPOOL 300f27dbb961c8c7dba8ad7fd1505455c3b2cb0fec69268f8b942bcdb8c8847ccb30efc504087945bac0bd1dfb4b5bcde87ea5dd0d1e29e77e08116a0ac6038c +AUX jemalloc-3.0.0_fix_html_install.patch 333 SHA256 859aa0ca3e04afc0f17a9d4c74e6ad61d0be8984a526be789ebd22637e4f51e8 SHA512 21d7df34ab45796c22ce3a9164dbaec5a6fca407295211d0403f2d4a163fbdeb1452e385ae844fd4c1e25cb20e055e848bfa0d51dd96f1af966d9761185f946f WHIRLPOOL 44f918888921b8eb15168ce8fb1ff38db4e96bd7583547efb2d502f8892808e52de6e6fc971fd653005a4b727a58c5457866a2678a7f150565836f0d3f973ca3 +AUX jemalloc-3.5.1-no-pprof.patch 822 SHA256 41858870b20554a2548482cff92a5daeac6a2f2ab940228f2a835e1fd12e642b SHA512 1560154337302c7a56d79af21822d27b5d5bfd64afa4af3753306ca0d0a307b5abb9b240be168c7591d858a9c4be15e8d6571fd52da2d6732c472755dffa545f WHIRLPOOL b4ed0dc44d70a97787767babc5f9e7ebd8d7b46ccb1d6174110236bd94c0da7b22d188555382ecfde7b95c7a2f1480b69279f9df21a0277a1cc0999b285c0ff0 +AUX jemalloc-3.5.1-strip-optimization.patch 886 SHA256 e92fe09b12766d8b3dddd9f26f6c581e43f4c71ba0ee2c1048752f2ef30e3443 SHA512 5835c534ccb04b47216d3678b08d663a09a93e60fb651e9c0b489fb747ca5f32060c89da3dc0f44b45964ffbffbd8da32b75a842198c180a79179266565b204a WHIRLPOOL 6e2a2caaf7c29d4fa9a797c6eabb5d930124cf96c8bd7ac36dc989d1b9488dbfb58e21ecfaf610ce559db9b001210c93f08b37196747fff8287fa17afc183f63 +AUX jemalloc-3.5.1_fix_html_install.patch 356 SHA256 e4b5f3d2cd085bc4584ef7cfbab05415be4d5b9953659e653c15975f1159fa1f SHA512 d5ad9e7c9b93f2b0311a43bdd963cea6f32f2e5a53a916ce52b89918d3d76e0306158239cf2a7b508f102607fa550374a9ec8463f2b3a064015cf7bb2ce852cd WHIRLPOOL a166c08abd0459f175fd366fd7c26cbdb2b026a6a72e4ff1b03a7de12317083a8cebca314826366807f19401c37e2be82eccc05bc3b688513c950fb8cff54c25 +AUX jemalloc-4.1-fix_stack_corruption.patch 2313 SHA256 8130ca02b70e89d84c9d278d3b81fc98b70803b7eb53d1915e749e1fcf2dedc2 SHA512 3c3f91c9906db1c562d6df5f43f4c24a2d842568875930a47f90a107bb6f71a2e6465c8ea9db07017a9268a39bcadf1c7c8f3317e1465a7be9ec41f53eadf909 WHIRLPOOL feedeac2118786b0247b9c55102eb8a13f6c0ccaaab852bbcdf900faaf9d61e3e6b1b3a3f7fa6e8ff3500010e683a1d084f75ebbfe0a4bb55a9d419f36129990 +AUX jemalloc-4.2-issue_399.patch 744 SHA256 9ac50a3e4e654fa61a9645aa8e1ab3c99962684a36a51da964c965780a8d7859 SHA512 a09fec3c779f25434d0824a892406aec7a1895515d33c36606a484a54bfc04aa35ef2610cf10bb0bf298eea3f89802e2e32dfbbb6c99bc50b8705523851c2468 WHIRLPOOL b6e355d49ad947101d3a88547eca52f78e44e2da18f715ee4abe71196b4e266b3164dd3f3c66c673be1630e3088a263fd151b438b4fe19db93693c4b3068cfb4 +AUX jemalloc-4.2-issue_443.patch 1595 SHA256 d98179f3f0d3544e5a2e51c311b97776fed0ef54fd43323152dfc7465bdd8248 SHA512 352086ddca04c321feab39212e6824a64a7f43bfbe3f9f4c34b2fc36b62dec1b84d2c6b6767e477be04b6e6c06a3083d01a15661b27fabab39b070a3f69ec159 WHIRLPOOL 1fc5f9136f1e6f7c825cb8af1386114b9b1f139b882899f663ca614e48b9c76149cfeac7a9841fd42bf6baeec1a421e019855b83cdc3017e46dfa31e69378f6e +AUX jemalloc-4.5.0-fix_html_install.patch 581 SHA256 6847526a2bf7c47bda7ac78f01c3aa5518918100b218278f6a501e48d51eecf2 SHA512 ce210e9c9394a9ba5a16b5524322f1e477a140e55c076543a1f4dcfb1c8491f7839cb49fba433088773b24d2656b821c3072e729c0c7e41cb90dc131ad6828ff WHIRLPOOL ccc503257220d8926b8feef095b2ad0bdcd7dad1cf78df97d5d6f04ceb0d1e8b24ec952f2bb91eb14be98b1b0e1fac136be7e3a72f77be6b4bc1ab829a535599 +AUX jemalloc-4.5.0-strip-optimization.patch 880 SHA256 7e5a7b0ec1a1142495becbdbaba9fb9e23adc1f3a8cbd3cfbd948bad72a99faf SHA512 6c6dd0a99fe58ad0f6cb6306e14e2724dcd39d372e91c01540aebb31e8228b33d17ba0819e6a5c9cb7a3009eedb8f3a58319f0cde322cdf31c2c1cb47f98ff41 WHIRLPOOL 4a00120df62c7604b696794edd55207add7d5922cac84925e2ebb89d0fdc7413f7c893bd48b88c3c2a4fa9b7c919a4fae86b42f57d5ed9f9d71f373af6b61144 +AUX jemalloc-5.0.1-strip-optimization.patch 685 SHA256 c07f2b9aba9548f5895f024e38bdf7bda3343968c8f0e8c0db86b18814214628 SHA512 dd4452feea0004b3f61d664a63da0751179a4be8095e76d94938034045114a68b32e0fe9872cb4810c2f3fc927963ef1b1886d210dc558b3c5a3f5eb9ef4240e WHIRLPOOL f4918e20eb81cbc3ece5f23e33ed0e6c197826fbfcc45f0346e2a65add78f1988a3e6afdf33146bb683d6ff8a26f199b1ce9c89516706c8577822b225a07b404 +AUX jemalloc-strip-optimization.patch 800 SHA256 a14ee193968e87d0d87a8146050dcad5a33042af119070dbfbac7d4eba9923ce SHA512 cff5130387c25bf1e047103eb6c371d96105acd962c62c58bb6bc72f1bfec071f05b7f2cf54170264f38ce7102004e97bc705a6b08f5f398bbc461b17e61e3c9 WHIRLPOOL 6d5d507a876b76a4b76a9e13a60636d7f042e4b0c4de2030d34195fc426f16794a561c09ce0c4d682f92c5fc798cf14abee3585c748538538eff5610fc7c5b95 +DIST jemalloc-2.2.5.tar.bz2 224118 SHA256 efcc9636757bd7f53a0fde084c2988bfe26f2868e435447f2d41ac42c0b3521e SHA512 56a29dc7dca66c41d2934731c4bc756de5b58bf707dc2ebcf8515be400ce25e372af6526035117cad5b1964b9ba040ab7178f4c28c1649e86dcb53c3ec884a9d WHIRLPOOL e88fc56ac9db024483196d62e870fe4981d1d02fbf5e3819da504568cc58c8f246df668bb3dfe70ad2d551671577c18d5e6432e60bb3107296e6faad7cd8595c +DIST jemalloc-3.3.1.tar.bz2 252997 SHA256 35c433cc1df5cdf9eb58b7980338552fc1d7aa64f89fe5643a972ccedb7cf20a SHA512 32814e8678af4954e26c0c0a0e5d06aba8f3844205fe212c5e41929dfab6a94ff11127a9238b5c18d72749827c467ecb874b8f3a9bc161cf1afdf4ea84c58690 WHIRLPOOL 35e8948e18ea7111ae830a8245be995b35f44ed2c2f687f706ee6941c78350c2cfaabefba223c4433069de47a9f92d621feaf176ec0c728e513e5f076e5fc874 +DIST jemalloc-3.6.0.tar.bz2 338964 SHA256 e16c2159dd3c81ca2dc3b5c9ef0d43e1f2f45b04548f42db12e7c12d7bdf84fe SHA512 ebe7c64558a87a735b5906d5cb7527c241664eeae7328538675a12eabe7a1004be0f8766a3bd2a78e61334b196ca7ffc0ee8b8ff59167922a35f126cd1e76e43 WHIRLPOOL d5452005951b10d9d529349481779d79361ec8d8ac1f36f4b54408b5e0184f35d79fee8378188d98f1b8e41ae13557a2cf41ab849b68856ba69f33870fe6e980 +DIST jemalloc-4.4.0.tar.bz2 440144 SHA256 a7aea63e9718d2f1adf81d87e3df3cb1b58deb86fc77bad5d702c4c59687b033 SHA512 2f88fb17ede3bf87e334e9c80949870e0dd85b5adcdd89a1750ccf6df5240f35293159ac0a360d3a29cf0b1d17edf86dcc7997c6bf3190ae7da7442d3a3cc14e WHIRLPOOL 1485ce6cf08ee2233117e281d1a61f376d2b6c73f28c68f2cc1956471bcb56a4eef045c0011de141b669d94d7339de5e79860f6b21bfbeffab821d5eb528759c +DIST jemalloc-4.5.0.tar.bz2 449992 SHA256 9409d85664b4f135b77518b0b118c549009dc10f6cba14557d170476611f6780 SHA512 76953363fe1007952232220afa1a91da4c1c33c02369b5ad239d8dd1d0792141197c15e8489a8f4cd301b08494e65cadd8ecd34d025cb0285700dd78d7248821 WHIRLPOOL 33dc51258d6d27942b656fc355cdde24becf0cd50a507375dd51b2fa6c55a6444ff21bcdae0ebe4fae8d2e95fa31989f5cf8bd435a7a59385ebb225a0a4441fe +DIST jemalloc-5.0.1.tar.bz2 499300 SHA256 4814781d395b0ef093b21a08e8e6e0bd3dab8762f9935bbfb71679b0dea7c3e9 SHA512 8cb5957a5724eb2bbad120cf0028ea8b2b14b4a416c1751b7c967351a7fd51135058ea0d3c4dc1d127c86f3aa7e9fd5ef101857110aabfdb7789427791c432c3 WHIRLPOOL 7bbaa407b1e403ef3bb5ecf6289dcf7f3cc9e31d8077d6e9b10e434e8f02e8e8c45ec890b67bcf39f8b7419ffcae893b4aa256f1a05750b196fcfbfadbd8696a +EBUILD jemalloc-2.2.5-r1.ebuild 908 SHA256 b8427cbeab2b57094f60772fa17eea51f50597b9061302db32017a5f12018756 SHA512 7d046cb6f169e188cbe432aede49f2b9c8973cfc13aa9d159debabb3cdddfbef8f98f91ba5fa649350639b86f737aaf0d4da0415e96a0c09dd3012e08e488a4a WHIRLPOOL f9b16226784e872ce27d1920c1091a005449e85f0f7523a6a482724a0459cc7ce88a627647bb276d6b2890709af684fbba3d51a4e7997adb2938bc917d17e5f9 +EBUILD jemalloc-3.3.1.ebuild 1049 SHA256 c67ca1f5ca9db036933f4dae95f58ac55a1a66d484657117b851bf727e2ec8be SHA512 a5a0bed33a86fe3783cdcadefe3cd0929bc1fbcffd24ef5ce5bd4cfc51b03d70f77c5161deabb80a36fef30c45c02d6683d49c266e354b9722d8919c6e3c275b WHIRLPOOL c8529f6078e2aded778404b11a8be90048eb7d0a9ce46034f870d870203154d7b10f6bf7bb0f07fdff3ec04b87ef0e9e4ad9e378101f87e7cafc83eac722e878 +EBUILD jemalloc-3.6.0.ebuild 1863 SHA256 7700b10381de3f747d38f208af1563bca27140c159f33005d0392ad63ca74b3c SHA512 fde66a60ee8b6e0a860c024c4b3475267dd42be2102cacf68b04df6e736d2747ff163589bbd615f5c3f8e58add090b3b20c6c1d91bb174ad8ff6b792eee7dc1d WHIRLPOOL f5f5b49597cd77ae201d438b61df920ae7e266c7cba52184702cb40ed10b106c40daee7a5a4da598ba01f91d181292d1e3ff9b758d3271a060a56629d74e75a5 +EBUILD jemalloc-4.4.0.ebuild 1728 SHA256 c45a2f2493637fcd4ccd82b81acab3d38f89ae44af7aa9170c353b08e63aea7e SHA512 f63bdca82f62dce58e17ada58816154cb7f0aa214b75b269eb082124de4e750d9721b2453da8e9cdadd8d7c3b75fdc6498538594f05b097c824288271317d988 WHIRLPOOL b8c35931ccefc643d57327cff1b715d641046fa8c348236550f3a399ce8668005dc200f4eb13e2c4e3fa1f7d0ddb4802ceb0c4befeff9e09e6d3b6ccc6fda413 +EBUILD jemalloc-4.5.0.ebuild 1764 SHA256 5b0af50240137e012fa1ded19425c465600c40568ff373c0e096429280084a35 SHA512 665b73e2e6bdadba26f772a58bf68a89844fa8a5afb1ff932e08d23c5e27b22c54bd9b3824b5023db45bff6fe2ea8899c19c0ab655b8e8762feef448e6798f4e WHIRLPOOL e83b6b1b86972f390c60e7ce25c1d33f63b2a414f0768e10918f406079fd6e7cfaf751277b7bc03b1384abaf6ee867b44ae4b10ae7eb44e357ab5e562ad257d2 +EBUILD jemalloc-5.0.1.ebuild 1879 SHA256 b50ada4d6f98517a3bce25f2ec947475c5ec27638e5447ceec225a6cdf331afa SHA512 4cf16943689b5e0b4f2926d591a67a16b757ccb5fc2bf3d4526238c34cce2dec64f6fb0f024e01eb4171f60334d31356098785c91a5d469015b37f1c1e50c8fe WHIRLPOOL 6be18904ebdb5e1ed565c8cd9784141533d4e411ad84299aac284a995346c3edb5ffdca4152757d28fe30a80e7d18a2d49619f238e10b37766c624ab41056595 +MISC ChangeLog 5765 SHA256 9832b908c23afea26cb42e87162df1227b3e4dbe56fadc6d758f6f0ecbc63fae SHA512 a4600bc9eeaf1da3d9d54ebaa2cee6f7ffa4e3878aa530fcd81477ce0595e922f19c1fe7c2a273ca5f7225a3399dd6ea26f139a61f317ea734751296c3766d7d WHIRLPOOL 6f3ab6729afea9b898f4f0567f68a0f6426138e7864dc49c98b74819425ae73841c2ceb9d9db645ace9772e27c719a4181da8ac38c457af4b906b0a79d9d9172 +MISC ChangeLog-2015 7351 SHA256 d8e84922329cdcfb66613daae03f8ac62c1912b488f58e3aabc9c7d91d83c4e2 SHA512 e07a7704f90e20b7c13f6003452760dee19ebfa5a347e3ae21aadeadf1f3891a0db07e96f0af332a393e12fcce14228a426f56c34f793e09e595fe2486ffe5a0 WHIRLPOOL 6f7b3af966dc886d94f594b0d5d649cf944e51bdfc9f9f39e6417c57929e0b569f2f1c676b3bcba9a447a039193fb420bd1fe8d17fc529f85de205b534bdf4a4 +MISC metadata.xml 762 SHA256 23624152c02e4f9ed59f69ebc2b6727f81ea02e6b50cec6074ef6aa965ab0786 SHA512 4fdae623c6f76fad566807e7a48c3cf11b5818bf2f93e32f6c0a53558732642f0011dabb7bd4d7f637c8df141cccdb1075c48177a83caac78f9f375b3e57278a WHIRLPOOL 765b36a43106515e95e1ae23ba3a2da08de732ea589f863f1a74f31489b5fea124533adcef60f7825ffbb50d08b228d46e9a4b557a3c5e9cfc2462154258c742 diff --git a/dev-libs/jemalloc/files/jemalloc-2.2.1-no-pprof.patch b/dev-libs/jemalloc/files/jemalloc-2.2.1-no-pprof.patch new file mode 100644 index 000000000000..e10aab4d4f38 --- /dev/null +++ b/dev-libs/jemalloc/files/jemalloc-2.2.1-no-pprof.patch @@ -0,0 +1,24 @@ +--- a/Makefile.in 2011-04-11 10:42:32.084403330 -0500 ++++ b/Makefile.in 2011-04-11 10:43:23.490760665 -0500 +@@ -42,7 +42,6 @@ + endif + + # Lists of files. +-BINS := @srcroot@bin/pprof + CHDRS := @objroot@include/jemalloc/jemalloc@install_suffix@.h \ + @objroot@include/jemalloc/jemalloc_defs@install_suffix@.h + CSRCS := @srcroot@src/jemalloc.c @srcroot@src/arena.c @srcroot@src/atomic.c \ +@@ -141,13 +140,6 @@ + $(CC) -o $@ $< -L@objroot@lib -ljemalloc@install_suffix@ + endif + +-install_bin: +- install -d $(BINDIR) +- @for b in $(BINS); do \ +- echo "install -m 755 $$b $(BINDIR)"; \ +- install -m 755 $$b $(BINDIR); \ +-done +- + install_include: + install -d $(INCLUDEDIR)/jemalloc + @for h in $(CHDRS); do \ diff --git a/dev-libs/jemalloc/files/jemalloc-2.2.5_fix_html_install.patch b/dev-libs/jemalloc/files/jemalloc-2.2.5_fix_html_install.patch new file mode 100644 index 000000000000..aff4add8b3fe --- /dev/null +++ b/dev-libs/jemalloc/files/jemalloc-2.2.5_fix_html_install.patch @@ -0,0 +1,12 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -176,7 +176,7 @@ + install -m 644 $$d $(MANDIR)/man3; \ + done + +-install_doc: install_html install_man ++install_doc: install_man + + install: install_bin install_include install_lib install_doc + + diff --git a/dev-libs/jemalloc/files/jemalloc-3.0.0-no-pprof.patch b/dev-libs/jemalloc/files/jemalloc-3.0.0-no-pprof.patch new file mode 100644 index 000000000000..c2fa815ec529 --- /dev/null +++ b/dev-libs/jemalloc/files/jemalloc-3.0.0-no-pprof.patch @@ -0,0 +1,27 @@ +diff --git a/Makefile.in b/Makefile.in +index 6675b59..ce0782f 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -69,7 +69,6 @@ endif + LIBJEMALLOC := $(LIBPREFIX)jemalloc$(install_suffix) + + # Lists of files. +-BINS := $(srcroot)bin/pprof $(objroot)bin/jemalloc.sh + CHDRS := $(objroot)include/jemalloc/jemalloc$(install_suffix).h \ + $(objroot)include/jemalloc/jemalloc_defs$(install_suffix).h + CSRCS := $(srcroot)src/jemalloc.c $(srcroot)src/arena.c $(srcroot)src/atomic.c \ +@@ -196,13 +195,6 @@ build_lib_shared: $(DSOS) + build_lib_static: $(STATIC_LIBS) + build: build_lib_shared build_lib_static + +-install_bin: +- install -d $(BINDIR) +- @for b in $(BINS); do \ +- echo "install -m 755 $$b $(BINDIR)"; \ +- install -m 755 $$b $(BINDIR); \ +-done +- + install_include: + install -d $(INCLUDEDIR)/jemalloc + @for h in $(CHDRS); do \ + diff --git a/dev-libs/jemalloc/files/jemalloc-3.0.0-strip-optimization.patch b/dev-libs/jemalloc/files/jemalloc-3.0.0-strip-optimization.patch new file mode 100644 index 000000000000..98c09af6277f --- /dev/null +++ b/dev-libs/jemalloc/files/jemalloc-3.0.0-strip-optimization.patch @@ -0,0 +1,29 @@ +diff --git a/configure.ac b/configure.ac +index a72019e..e366e1c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -556,23 +556,6 @@ if test "x$enable_debug" = "x1" ; then + fi + AC_SUBST([enable_debug]) + +-dnl Only optimize if not debugging. +-if test "x$enable_debug" = "x0" -a "x$no_CFLAGS" = "xyes" ; then +- dnl Make sure that an optimization flag was not specified in EXTRA_CFLAGS. +- optimize="no" +- echo "$EXTRA_CFLAGS" | grep "\-O" >/dev/null || optimize="yes" +- if test "x${optimize}" = "xyes" ; then +- if test "x$GCC" = "xyes" ; then +- JE_CFLAGS_APPEND([-O3]) +- JE_CFLAGS_APPEND([-funroll-loops]) +- elif test "x$je_cv_msvc" = "xyes" ; then +- JE_CFLAGS_APPEND([-O2]) +- else +- JE_CFLAGS_APPEND([-O]) +- fi +- fi +-fi +- + dnl Enable statistics calculation by default. + AC_ARG_ENABLE([stats], + [AS_HELP_STRING([--disable-stats], + diff --git a/dev-libs/jemalloc/files/jemalloc-3.0.0_fix_html_install.patch b/dev-libs/jemalloc/files/jemalloc-3.0.0_fix_html_install.patch new file mode 100644 index 000000000000..0f3026d44c2b --- /dev/null +++ b/dev-libs/jemalloc/files/jemalloc-3.0.0_fix_html_install.patch @@ -0,0 +1,14 @@ +diff --git a/Makefile.in b/Makefile.in +index 6675b59..3032c6d 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -240,7 +240,7 @@ install_doc_man: + install -m 644 $$d $(MANDIR)/man3; \ + done + +-install_doc: install_doc_html install_doc_man ++install_doc: install_doc_man + + install: install_bin install_include install_lib install_doc + + diff --git a/dev-libs/jemalloc/files/jemalloc-3.5.1-no-pprof.patch b/dev-libs/jemalloc/files/jemalloc-3.5.1-no-pprof.patch new file mode 100644 index 000000000000..30cbd501ec5d --- /dev/null +++ b/dev-libs/jemalloc/files/jemalloc-3.5.1-no-pprof.patch @@ -0,0 +1,25 @@ +diff -urN a/Makefile.in b/Makefile.in +--- a/Makefile.in 2014-02-25 18:49:15.000000000 -0600 ++++ b/Makefile.in 2014-03-07 18:24:10.978141932 -0600 +@@ -73,7 +73,6 @@ + LIBJEMALLOC := $(LIBPREFIX)jemalloc$(install_suffix) + + # Lists of files. +-BINS := $(srcroot)bin/pprof $(objroot)bin/jemalloc.sh + C_HDRS := $(objroot)include/jemalloc/jemalloc$(install_suffix).h + C_SRCS := $(srcroot)src/jemalloc.c $(srcroot)src/arena.c \ + $(srcroot)src/atomic.c $(srcroot)src/base.c $(srcroot)src/bitmap.c \ +@@ -273,13 +272,6 @@ + build_lib_static: $(STATIC_LIBS) + build_lib: build_lib_shared build_lib_static + +-install_bin: +- install -d $(BINDIR) +- @for b in $(BINS); do \ +- echo "install -m 755 $$b $(BINDIR)"; \ +- install -m 755 $$b $(BINDIR); \ +-done +- + install_include: + install -d $(INCLUDEDIR)/jemalloc + @for h in $(C_HDRS); do \ diff --git a/dev-libs/jemalloc/files/jemalloc-3.5.1-strip-optimization.patch b/dev-libs/jemalloc/files/jemalloc-3.5.1-strip-optimization.patch new file mode 100644 index 000000000000..cc8736b84123 --- /dev/null +++ b/dev-libs/jemalloc/files/jemalloc-3.5.1-strip-optimization.patch @@ -0,0 +1,27 @@ +diff -urN a/configure.ac b/configure.ac +--- a/configure.ac 2014-02-25 18:49:15.000000000 -0600 ++++ b/configure.ac 2014-03-07 18:19:53.718147847 -0600 +@@ -639,23 +639,6 @@ + AC_DEFINE([JEMALLOC_IVSALLOC], [ ]) + fi + +-dnl Only optimize if not debugging. +-if test "x$enable_debug" = "x0" -a "x$no_CFLAGS" = "xyes" ; then +- dnl Make sure that an optimization flag was not specified in EXTRA_CFLAGS. +- optimize="no" +- echo "$CFLAGS $EXTRA_CFLAGS" | grep '\-O' >/dev/null || optimize="yes" +- if test "x${optimize}" = "xyes" ; then +- if test "x$GCC" = "xyes" ; then +- JE_CFLAGS_APPEND([-O3]) +- JE_CFLAGS_APPEND([-funroll-loops]) +- elif test "x$je_cv_msvc" = "xyes" ; then +- JE_CFLAGS_APPEND([-O2]) +- else +- JE_CFLAGS_APPEND([-O]) +- fi +- fi +-fi +- + dnl Enable statistics calculation by default. + AC_ARG_ENABLE([stats], + [AS_HELP_STRING([--disable-stats], diff --git a/dev-libs/jemalloc/files/jemalloc-3.5.1_fix_html_install.patch b/dev-libs/jemalloc/files/jemalloc-3.5.1_fix_html_install.patch new file mode 100644 index 000000000000..1ce5ad2ede95 --- /dev/null +++ b/dev-libs/jemalloc/files/jemalloc-3.5.1_fix_html_install.patch @@ -0,0 +1,12 @@ +diff -urN a/Makefile.in b/Makefile.in +--- a/Makefile.in 2014-02-25 18:49:15.000000000 -0600 ++++ b/Makefile.in 2014-03-07 18:26:23.074138895 -0600 +@@ -317,7 +317,7 @@ + install -m 644 $$d $(MANDIR)/man3; \ + done + +-install_doc: install_doc_html install_doc_man ++install_doc: install_doc_man + + install: install_bin install_include install_lib install_doc + diff --git a/dev-libs/jemalloc/files/jemalloc-4.1-fix_stack_corruption.patch b/dev-libs/jemalloc/files/jemalloc-4.1-fix_stack_corruption.patch new file mode 100644 index 000000000000..f36c188616e8 --- /dev/null +++ b/dev-libs/jemalloc/files/jemalloc-4.1-fix_stack_corruption.patch @@ -0,0 +1,70 @@ +From 33184bf69813087bf1885b0993685f9d03320c69 Mon Sep 17 00:00:00 2001 +From: Dmitri Smirnov <dmitrism@microsoft.com> +Date: Mon, 29 Feb 2016 14:30:19 -0800 +Subject: [PATCH] Fix stack corruption and uninitialized var warning + +Stack corruption happens in x64 bit + +This resolves #347. +--- + src/arena.c | 2 +- + test/unit/hash.c | 13 +++++++------ + 2 files changed, 8 insertions(+), 7 deletions(-) + +diff --git a/src/arena.c b/src/arena.c +index 99e20fd..965c0fe 100644 +--- a/src/arena.c ++++ b/src/arena.c +@@ -2423,7 +2423,7 @@ arena_malloc_large(tsd_t *tsd, arena_t *arena, szind_t binind, bool zero) + uintptr_t random_offset; + arena_run_t *run; + arena_chunk_map_misc_t *miscelm; +- UNUSED bool idump; ++ UNUSED bool idump JEMALLOC_CC_SILENCE_INIT(false); + + /* Large allocation. */ + usize = index2size(binind); +diff --git a/test/unit/hash.c b/test/unit/hash.c +index f50ba81..010c9d7 100644 +--- a/test/unit/hash.c ++++ b/test/unit/hash.c +@@ -64,14 +64,15 @@ static void + hash_variant_verify_key(hash_variant_t variant, uint8_t *key) + { + const int hashbytes = hash_variant_bits(variant) / 8; +- VARIABLE_ARRAY(uint8_t, hashes, hashbytes * 256); ++ const int hashes_size = hashbytes * 256; ++ VARIABLE_ARRAY(uint8_t, hashes, hashes_size); + VARIABLE_ARRAY(uint8_t, final, hashbytes); + unsigned i; + uint32_t computed, expected; + + memset(key, 0, KEY_SIZE); +- memset(hashes, 0, sizeof(hashes)); +- memset(final, 0, sizeof(final)); ++ memset(hashes, 0, hashes_size); ++ memset(final, 0, hashbytes); + + /* + * Hash keys of the form {0}, {0,1}, {0,1,2}, ..., {0,1,...,255} as the +@@ -102,17 +103,17 @@ hash_variant_verify_key(hash_variant_t variant, uint8_t *key) + /* Hash the result array. */ + switch (variant) { + case hash_variant_x86_32: { +- uint32_t out = hash_x86_32(hashes, hashbytes*256, 0); ++ uint32_t out = hash_x86_32(hashes, hashes_size, 0); + memcpy(final, &out, sizeof(out)); + break; + } case hash_variant_x86_128: { + uint64_t out[2]; +- hash_x86_128(hashes, hashbytes*256, 0, out); ++ hash_x86_128(hashes, hashes_size, 0, out); + memcpy(final, out, sizeof(out)); + break; + } case hash_variant_x64_128: { + uint64_t out[2]; +- hash_x64_128(hashes, hashbytes*256, 0, out); ++ hash_x64_128(hashes, hashes_size, 0, out); + memcpy(final, out, sizeof(out)); + break; + } default: not_reached(); diff --git a/dev-libs/jemalloc/files/jemalloc-4.2-issue_399.patch b/dev-libs/jemalloc/files/jemalloc-4.2-issue_399.patch new file mode 100644 index 000000000000..da9f2d8ad771 --- /dev/null +++ b/dev-libs/jemalloc/files/jemalloc-4.2-issue_399.patch @@ -0,0 +1,26 @@ +From 3c8c3e9e9b59b6e34a222816a05f0a01a68919b3 Mon Sep 17 00:00:00 2001 +From: Jason Evans <jasone@canonware.com> +Date: Mon, 26 Sep 2016 15:55:40 -0700 +Subject: [PATCH] Close file descriptor after reading + "/proc/sys/vm/overcommit_memory". + +This bug was introduced by c2f970c32b527660a33fa513a76d913c812dcf7c +(Modify pages_map() to support mapping uncommitted virtual memory.). + +This resolves #399. +--- + src/pages.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/pages.c b/src/pages.c +index 2a9b7e3..05b0d69 100644 +--- a/src/pages.c ++++ b/src/pages.c +@@ -219,6 +219,7 @@ os_overcommits_proc(void) + return (false); /* Error. */ + + nread = read(fd, &buf, sizeof(buf)); ++ close(fd); + if (nread < 1) + return (false); /* Error. */ + /* diff --git a/dev-libs/jemalloc/files/jemalloc-4.2-issue_443.patch b/dev-libs/jemalloc/files/jemalloc-4.2-issue_443.patch new file mode 100644 index 000000000000..d2b065a3b6e0 --- /dev/null +++ b/dev-libs/jemalloc/files/jemalloc-4.2-issue_443.patch @@ -0,0 +1,58 @@ +From c443b67561891ae68d688daf5f8ce37820cdba2b Mon Sep 17 00:00:00 2001 +From: Jason Evans <jasone@canonware.com> +Date: Sat, 29 Oct 2016 22:41:04 -0700 +Subject: [PATCH] Use syscall(2) rather than {open,read,close}(2) during boot. + +Some applications wrap various system calls, and if they call the +allocator in their wrappers, unexpected reentry can result. This is not +a general solution (many other syscalls are spread throughout the code), +but this resolves a bootstrapping issue that is apparently common. + +This resolves #443. +--- + src/pages.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/src/pages.c b/src/pages.c +index 05b0d69..84e2216 100644 +--- a/src/pages.c ++++ b/src/pages.c +@@ -207,6 +207,11 @@ os_overcommits_sysctl(void) + #endif + + #ifdef JEMALLOC_PROC_SYS_VM_OVERCOMMIT_MEMORY ++/* ++ * Use syscall(2) rather than {open,read,close}(2) when possible to avoid ++ * reentry during bootstrapping if another library has interposed system call ++ * wrappers. ++ */ + static bool + os_overcommits_proc(void) + { +@@ -214,12 +219,26 @@ os_overcommits_proc(void) + char buf[1]; + ssize_t nread; + ++#ifdef SYS_open ++ fd = (int)syscall(SYS_open, "/proc/sys/vm/overcommit_memory", O_RDONLY); ++#else + fd = open("/proc/sys/vm/overcommit_memory", O_RDONLY); ++#endif + if (fd == -1) + return (false); /* Error. */ + ++#ifdef SYS_read ++ nread = (ssize_t)syscall(SYS_read, fd, &buf, sizeof(buf)); ++#else + nread = read(fd, &buf, sizeof(buf)); ++#endif ++ ++#ifdef SYS_close ++ syscall(SYS_close, fd); ++#else + close(fd); ++#endif ++ + if (nread < 1) + return (false); /* Error. */ + /* diff --git a/dev-libs/jemalloc/files/jemalloc-4.5.0-fix_html_install.patch b/dev-libs/jemalloc/files/jemalloc-4.5.0-fix_html_install.patch new file mode 100644 index 000000000000..159702e6230c --- /dev/null +++ b/dev-libs/jemalloc/files/jemalloc-4.5.0-fix_html_install.patch @@ -0,0 +1,25 @@ +From c04d0b954adef2d3f1a30d91dc687f6a03b108eb Mon Sep 17 00:00:00 2001 +From: +Date: Mon, 29 May 2017 00:58:32 -0500 +Subject: [PATCH 2/2] Do not install html doc + +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index e49a871..733932a 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -381,7 +381,7 @@ install_doc_man: + $(INSTALL) -m 644 $$d $(MANDIR)/man3; \ + done + +-install_doc: install_doc_html install_doc_man ++install_doc: install_doc_man + + install: install_bin install_include install_lib install_doc + +-- +2.13.0 + diff --git a/dev-libs/jemalloc/files/jemalloc-4.5.0-strip-optimization.patch b/dev-libs/jemalloc/files/jemalloc-4.5.0-strip-optimization.patch new file mode 100644 index 000000000000..8b346be86c06 --- /dev/null +++ b/dev-libs/jemalloc/files/jemalloc-4.5.0-strip-optimization.patch @@ -0,0 +1,35 @@ +From c568271163445e380679788388f1cb1edbdeaf88 Mon Sep 17 00:00:00 2001 +From: +Date: Mon, 29 May 2017 00:57:15 -0500 +Subject: [PATCH 1/2] Strip all optimization, let portage handle. + +--- + configure.ac | 12 ------------ + 1 file changed, 12 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 20a8a64..d8af618 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -851,18 +851,6 @@ if test "x$enable_ivsalloc" = "x1" ; then + AC_DEFINE([JEMALLOC_IVSALLOC], [ ]) + fi + +-dnl Only optimize if not debugging. +-if test "x$enable_debug" = "x0" ; then +- if test "x$GCC" = "xyes" ; then +- JE_CFLAGS_ADD([-O3]) +- JE_CFLAGS_ADD([-funroll-loops]) +- elif test "x$je_cv_msvc" = "xyes" ; then +- JE_CFLAGS_ADD([-O2]) +- else +- JE_CFLAGS_ADD([-O]) +- fi +-fi +- + dnl Enable statistics calculation by default. + AC_ARG_ENABLE([stats], + [AS_HELP_STRING([--disable-stats], +-- +2.13.0 + diff --git a/dev-libs/jemalloc/files/jemalloc-5.0.1-strip-optimization.patch b/dev-libs/jemalloc/files/jemalloc-5.0.1-strip-optimization.patch new file mode 100644 index 000000000000..523badf5775b --- /dev/null +++ b/dev-libs/jemalloc/files/jemalloc-5.0.1-strip-optimization.patch @@ -0,0 +1,26 @@ +diff --git a/configure.ac b/configure.ac +index 1551ded8..2f470672 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -976,21 +976,6 @@ if test "x$enable_debug" = "x1" ; then + fi + AC_SUBST([enable_debug]) + +-dnl Only optimize if not debugging. +-if test "x$enable_debug" = "x0" ; then +- if test "x$GCC" = "xyes" ; then +- JE_CFLAGS_ADD([-O3]) +- JE_CXXFLAGS_ADD([-O3]) +- JE_CFLAGS_ADD([-funroll-loops]) +- elif test "x$je_cv_msvc" = "xyes" ; then +- JE_CFLAGS_ADD([-O2]) +- JE_CXXFLAGS_ADD([-O2]) +- else +- JE_CFLAGS_ADD([-O]) +- JE_CXXFLAGS_ADD([-O]) +- fi +-fi +- + dnl Enable statistics calculation by default. + AC_ARG_ENABLE([stats], + [AS_HELP_STRING([--disable-stats], diff --git a/dev-libs/jemalloc/files/jemalloc-strip-optimization.patch b/dev-libs/jemalloc/files/jemalloc-strip-optimization.patch new file mode 100644 index 000000000000..60b7d6c22ff1 --- /dev/null +++ b/dev-libs/jemalloc/files/jemalloc-strip-optimization.patch @@ -0,0 +1,25 @@ +--- a/configure.ac 2010-02-22 12:07:05.000000000 +0100 ++++ b/configure.ac 2010-02-22 12:08:29.000000000 +0100 +@@ -296,21 +296,6 @@ + fi + AC_SUBST([enable_debug]) + +-dnl Only optimize if not debugging. +-if test "x$enable_debug" = "x0" -a "x$no_CFLAGS" = "xyes" ; then +- dnl Make sure that an optimization flag was not specified in EXTRA_CFLAGS. +- optimize="no" +- echo "$EXTRA_CFLAGS" | grep "\-O" >/dev/null || optimize="yes" +- if test "x${optimize}" = "xyes" ; then +- if test "x$GCC" = "xyes" ; then +- JE_CFLAGS_APPEND([-O3]) +- JE_CFLAGS_APPEND([-funroll-loops]) +- else +- JE_CFLAGS_APPEND([-O]) +- fi +- fi +-fi +- + dnl Do not enable statistics calculation by default. + AC_ARG_ENABLE([stats], + [AS_HELP_STRING([--enable-stats], [Enable statistics calculation/reporting])], + diff --git a/dev-libs/jemalloc/jemalloc-2.2.5-r1.ebuild b/dev-libs/jemalloc/jemalloc-2.2.5-r1.ebuild new file mode 100644 index 000000000000..34dd28ffc61f --- /dev/null +++ b/dev-libs/jemalloc/jemalloc-2.2.5-r1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit autotools eutils + +DESCRIPTION="Jemalloc is a general-purpose scalable concurrent allocator" +HOMEPAGE="http://www.canonware.com/jemalloc/" +SRC_URI="http://www.canonware.com/download/${PN}/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ~arm ~mips ppc ppc64 x86" + +IUSE="debug static-libs stats" + +DEPEND="" +RDEPEND="" + +src_prepare() { + epatch \ + "${FILESDIR}/${PN}-strip-optimization.patch" \ + "${FILESDIR}/${PN}-2.2.1-no-pprof.patch" \ + "${FILESDIR}/${PN}-2.2.5_fix_html_install.patch" + + eautoreconf +} + +src_configure() { + econf \ + --with-jemalloc-prefix=j \ + $(use_enable debug) \ + $(use_enable stats) +} + +src_install() { + emake DESTDIR="${ED}" install || die + dodoc ChangeLog README + dohtml doc/jemalloc.html + + use static-libs || find "${ED}" -name '*.a' -exec rm -f {} + +} diff --git a/dev-libs/jemalloc/jemalloc-3.3.1.ebuild b/dev-libs/jemalloc/jemalloc-3.3.1.ebuild new file mode 100644 index 000000000000..ea41d7565f66 --- /dev/null +++ b/dev-libs/jemalloc/jemalloc-3.3.1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit autotools eutils + +DESCRIPTION="Jemalloc is a general-purpose scalable concurrent allocator" +HOMEPAGE="http://www.canonware.com/jemalloc/" +SRC_URI="http://www.canonware.com/download/${PN}/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 x86 ~x64-macos" +IUSE="debug static-libs stats" + +src_prepare() { + epatch \ + "${FILESDIR}/${PN}-3.0.0-strip-optimization.patch" \ + "${FILESDIR}/${PN}-3.0.0-no-pprof.patch" \ + "${FILESDIR}/${PN}-3.0.0_fix_html_install.patch" + + eautoreconf +} + +src_configure() { + econf \ + $(use_enable debug) \ + $(use_enable stats) +} + +src_install() { + default + dohtml doc/jemalloc.html + + if [[ ${CHOST} == *-darwin* ]] ; then + # fixup install_name, #437362 + install_name_tool \ + -id "${EPREFIX}"/usr/$(get_libdir)/libjemalloc.1.dylib \ + "${ED}"/usr/$(get_libdir)/libjemalloc.1.dylib || die + fi + + use static-libs || find "${D}" -name '*.a' -delete +} diff --git a/dev-libs/jemalloc/jemalloc-3.6.0.ebuild b/dev-libs/jemalloc/jemalloc-3.6.0.ebuild new file mode 100644 index 000000000000..3f63d189b746 --- /dev/null +++ b/dev-libs/jemalloc/jemalloc-3.6.0.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools-multilib eutils flag-o-matic toolchain-funcs + +DESCRIPTION="Jemalloc is a general-purpose scalable concurrent allocator" +HOMEPAGE="http://www.canonware.com/jemalloc/" +SRC_URI="http://www.canonware.com/download/${PN}/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="debug static-libs stats" + +HTML_DOCS=( doc/jemalloc.html ) + +PATCHES=( "${FILESDIR}/${PN}-3.5.1-strip-optimization.patch" + "${FILESDIR}/${PN}-3.5.1-no-pprof.patch" + "${FILESDIR}/${PN}-3.5.1_fix_html_install.patch" +) + +MULTILIB_WRAPPED_HEADERS=( /usr/include/jemalloc/jemalloc.h ) + +# autotools-utils.eclass auto-adds configure options when static-libs is in IUSE +# but jemalloc doesn't implement them in its configure; need this here to +# supress the warnings until automagic is removed from the eclass +QA_CONFIGURE_OPTIONS="--enable-static --disable-static --enable-shared --disable-shared" +src_configure() { + myeconfargs=( + $(use_enable debug) + $(use_enable stats) + ) + use sparc && append-cppflags -DLG_QUANTUM=4 -mcpu=ultrasparc + # The configure test for page shift requires running code which fails + # when cross-compiling. Since it uses _SC_PAGESIZE, and the majority + # of systems use 4096 as the base page size, just hardcode 12 here. + tc-is-cross-compiler && export je_cv_static_page_shift=12 + autotools-multilib_src_configure +} + +src_install() { + autotools-multilib_src_install + + if [[ ${CHOST} == *-darwin* ]] ; then + # fixup install_name, #437362 + install_name_tool \ + -id "${EPREFIX}"/usr/$(get_libdir)/libjemalloc.1.dylib \ + "${ED}"/usr/$(get_libdir)/libjemalloc.1.dylib || die + fi + use static-libs || find "${ED}" -name '*.a' -delete +} diff --git a/dev-libs/jemalloc/jemalloc-4.4.0.ebuild b/dev-libs/jemalloc/jemalloc-4.4.0.ebuild new file mode 100644 index 000000000000..d34d914c14ef --- /dev/null +++ b/dev-libs/jemalloc/jemalloc-4.4.0.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs multilib-build multilib-minimal + +DESCRIPTION="Jemalloc is a general-purpose scalable concurrent allocator" +HOMEPAGE="http://www.canonware.com/jemalloc/" +SRC_URI="https://github.com/jemalloc/jemalloc/releases/download/${PV}/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0/2" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="debug hardened static-libs stats" +HTML_DOCS=( doc/jemalloc.html ) +PATCHES=( "${FILESDIR}/${PN}-3.5.1-strip-optimization.patch" + "${FILESDIR}/${PN}-3.5.1_fix_html_install.patch" +) +MULTILIB_WRAPPED_HEADERS=( /usr/include/jemalloc/jemalloc.h ) +# autotools-utils.eclass auto-adds configure options when static-libs is in IUSE +# but jemalloc doesn't implement them in its configure; need this here to +# supress the warnings until automagic is removed from the eclass +QA_CONFIGURE_OPTIONS="--enable-static --disable-static --enable-shared --disable-shared" + +multilib_src_configure() { + local myconf=() + + if use hardened ; then + myconf+=( --disable-syscall ) + fi + + ECONF_SOURCE="${S}" \ + econf \ + $(use_enable debug) \ + $(use_enable stats) \ + "${myconf[@]}" +} + +multilib_src_install() { + # Copy man file which the Makefile looks for + cp "${S}/doc/jemalloc.3" "${BUILD_DIR}/doc" || die + emake DESTDIR="${D}" install +} + +multilib_src_install_all() { + if [[ ${CHOST} == *-darwin* ]] ; then + # fixup install_name, #437362 + install_name_tool \ + -id "${EPREFIX}"/usr/$(get_libdir)/libjemalloc.1.dylib \ + "${ED}"/usr/$(get_libdir)/libjemalloc.1.dylib || die + fi + use static-libs || find "${ED}" -name '*.a' -delete +} diff --git a/dev-libs/jemalloc/jemalloc-4.5.0.ebuild b/dev-libs/jemalloc/jemalloc-4.5.0.ebuild new file mode 100644 index 000000000000..9b1c134e5a25 --- /dev/null +++ b/dev-libs/jemalloc/jemalloc-4.5.0.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools toolchain-funcs multilib-minimal + +DESCRIPTION="Jemalloc is a general-purpose scalable concurrent allocator" +HOMEPAGE="http://www.canonware.com/jemalloc/" +SRC_URI="https://github.com/jemalloc/jemalloc/releases/download/${PV}/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0/2" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="debug hardened static-libs stats" +HTML_DOCS=( doc/jemalloc.html ) +PATCHES=( "${FILESDIR}/${PN}-4.5.0-strip-optimization.patch" + "${FILESDIR}/${PN}-4.5.0-fix_html_install.patch" +) +MULTILIB_WRAPPED_HEADERS=( /usr/include/jemalloc/jemalloc.h ) +# autotools-utils.eclass auto-adds configure options when static-libs is in IUSE +# but jemalloc doesn't implement them in its configure; need this here to +# supress the warnings until automagic is removed from the eclass +QA_CONFIGURE_OPTIONS="--enable-static --disable-static --enable-shared --disable-shared" + +src_prepare() { + default + eautoreconf +} + +multilib_src_configure() { + local myconf=() + + if use hardened ; then + myconf+=( --disable-syscall ) + fi + + ECONF_SOURCE="${S}" \ + econf \ + $(use_enable debug) \ + $(use_enable stats) \ + "${myconf[@]}" +} + +multilib_src_install() { + # Copy man file which the Makefile looks for + cp "${S}/doc/jemalloc.3" "${BUILD_DIR}/doc" || die + emake DESTDIR="${D}" install +} + +multilib_src_install_all() { + if [[ ${CHOST} == *-darwin* ]] ; then + # fixup install_name, #437362 + install_name_tool \ + -id "${EPREFIX}"/usr/$(get_libdir)/libjemalloc.1.dylib \ + "${ED}"/usr/$(get_libdir)/libjemalloc.1.dylib || die + fi + use static-libs || find "${ED}" -name '*.a' -delete +} diff --git a/dev-libs/jemalloc/jemalloc-5.0.1.ebuild b/dev-libs/jemalloc/jemalloc-5.0.1.ebuild new file mode 100644 index 000000000000..62fde4876592 --- /dev/null +++ b/dev-libs/jemalloc/jemalloc-5.0.1.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools toolchain-funcs multilib-minimal + +DESCRIPTION="Jemalloc is a general-purpose scalable concurrent allocator" +HOMEPAGE="http://www.canonware.com/jemalloc/" +SRC_URI="https://github.com/jemalloc/jemalloc/releases/download/${PV}/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0/2" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="debug hardened +hugepages lazy-lock static-libs stats xmalloc" +HTML_DOCS=( doc/jemalloc.html ) +PATCHES=( "${FILESDIR}/${PN}-5.0.1-strip-optimization.patch" + "${FILESDIR}/${PN}-4.5.0-fix_html_install.patch" +) +MULTILIB_WRAPPED_HEADERS=( /usr/include/jemalloc/jemalloc.h ) +# autotools-utils.eclass auto-adds configure options when static-libs is in IUSE +# but jemalloc doesn't implement them in its configure; need this here to +# supress the warnings until automagic is removed from the eclass +QA_CONFIGURE_OPTIONS="--enable-static --disable-static --enable-shared --disable-shared" + +src_prepare() { + default + eautoreconf +} + +multilib_src_configure() { + local myconf=() + + if use hardened ; then + myconf+=( --disable-syscall ) + fi + + ECONF_SOURCE="${S}" \ + econf \ + $(use_enable debug) \ + $(use_enable lazy-lock) \ + $(use_enable hugepages thp) \ + $(use_enable stats) \ + $(use_enable xmalloc) \ + "${myconf[@]}" +} + +multilib_src_install() { + # Copy man file which the Makefile looks for + cp "${S}/doc/jemalloc.3" "${BUILD_DIR}/doc" || die + emake DESTDIR="${D}" install +} + +multilib_src_install_all() { + if [[ ${CHOST} == *-darwin* ]] ; then + # fixup install_name, #437362 + install_name_tool \ + -id "${EPREFIX}"/usr/$(get_libdir)/libjemalloc.2.dylib \ + "${ED}"/usr/$(get_libdir)/libjemalloc.2.dylib || die + fi + use static-libs || find "${ED}" -name '*.a' -delete +} diff --git a/dev-libs/jemalloc/metadata.xml b/dev-libs/jemalloc/metadata.xml new file mode 100644 index 000000000000..848a0a7987dd --- /dev/null +++ b/dev-libs/jemalloc/metadata.xml @@ -0,0 +1,20 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>mozilla@gentoo.org</email> + <name>Gentoo Mozilla Team</name> + </maintainer> + <longdescription lang="en"> + Jemalloc is a general-purpose scalable concurrent allocator + </longdescription> + <use> + <flag name="hugepages">Enable transparent huge page support</flag> + <flag name="lazy-lock">Enable lazy locking (only lock when multi-threaded)</flag> + <flag name="stats">Enable statistics calculation/reporting</flag> + <flag name="xmalloc">Add support for xmalloc (abort-on-out-of-memory)</flag> + </use> + <upstream> + <remote-id type="github">jemalloc/jemalloc</remote-id> + </upstream> +</pkgmetadata> |