parent
78afc7d83e
commit
be374a42ea
Binary file not shown.
Binary file not shown.
@ -1,8 +1,10 @@
|
||||
DIST rsyslog-8.1901.0.tar.gz 2750872 BLAKE2B 8bc07bd0c73cf309b5fb853e3bc66e555dee4284d0c8ede5b73420db7b42758f5fcfbc7ca90b618cc27e7067795f2725f5ed96f59170f3d2690a0653f2b69847 SHA512 2b8b2d40d3df4c47dba765d70fc716dc127ce776b31f217f78a3e1c2bf820e41799a5069d7f41f04ce39baead286ecd42fb353492873e3795aff704d686d67cb
|
||||
DIST rsyslog-8.1903.0.tar.gz 2786605 BLAKE2B 2c60450b5f5a54f3d4fe4f9f51c81145cdebb1b0e1dd4b76f2ad23803c8bb417affbdcc9b4a0d8ccb65b0e98f5cb5cf187ce219be3e44e44c5bd253cae5f95dc SHA512 0f698c264a4afba56467b341c094be7357fba08a6ee7a24bb1b053c06da04e83eb1832ee46b68ea21f8f4de841cd97aaadc46e78bb4adfe23604c9fe95103fa9
|
||||
DIST rsyslog-8.38.0.tar.gz 2721798 BLAKE2B 578bc9eefce4893a9c1eb54ee7360cd9fa51b3c87ffe07a0fd5b122987f991835f603417243084de0b59286e993ad1c84237e61c44bc18457b3660668421101b SHA512 9dc3bdc4ef01c2af433478e182704694cb50849d811d476a03e4ce03b3c5aecfb506e7f1c1e51fadcd63da60b067d8011b92b8c9354a688fe66f7b6ffd8f9254
|
||||
DIST rsyslog-8.39.0.tar.gz 2721560 BLAKE2B 0680cb31d0a07e5676a5c5626e46fa174b8df08ceec49b514624ff8ffeb750bbf199f73af1d89b9dfad121a292084d75b0a1218fb33138f1d7a149fd730cb3d9 SHA512 f46ead433f703df4af6ddc4bbb178ea145d7d2a35ee7749c32b9889f299ba20c83ed76c246530608198e84fef1f2bf10097344c31d5df38b9e0ae47cf4bee479
|
||||
DIST rsyslog-8.40.0.tar.gz 2726022 BLAKE2B 33f7f2018200a20b01dbfabeeab592aa09d530edd313bb13f16c47cf3f67aebd9c465af3f1e468ca3d352cd83e4f4eee567c6fd54bbaee1723bee56f4631b440 SHA512 3d5d4f92e37ad9bf3767d5d7fc87fcb7956656f676a9495c78abd12fe9072ec8763b50543b198308a71d5d919721fb9b84b6725dd83a9d9b8a1639d81382c0dd
|
||||
DIST rsyslog-doc-8.1901.0.tar.gz 7768575 BLAKE2B 40bc8b038fd0210d0cac01704624d87c2a73701a7494e5970423adf14948e46d1cff6df5894a82e6664d891d0c2760a5a0154bc42fb410ecf6dd25f3166e17b8 SHA512 afcc592ce4bf0dbe048786627d87b783f1c99e7711c44ffcc41cde67b2b2fef55c944b5c90e7272a84bbec95b78c0174df634b02baad2ac5819b3611efc1cb98
|
||||
DIST rsyslog-doc-8.1903.0.tar.gz 7816457 BLAKE2B 0628a5e7f0a2c8229470f6b05c22fa0d01de12eace4f895e17a47e7003bf078be5f3b2df15cd13a4cf53384d285b558b0936308cb58e7c7e71796ca99447da3e SHA512 b42f950499798fd2bbf9e2ac2da074781955cc552628edcd928f25943b6b80d5f2e1a2eab3b8fb0fa2f6278f2b4366f096c3e976a91223e545b4306479ca4f5d
|
||||
DIST rsyslog-doc-8.38.0.tar.gz 7662314 BLAKE2B 57a121950a3f6630e4736a1ff998e93b543389107d146ddb148ecd2702bb208d21a7f4d77f2fd958f2a56e092341fc6a24ed1cc80a910cb1adb54c65b5b2da04 SHA512 e28a09ae2fcddc711d2cfd31207c9862192598e49964a47b41fc8fa3ae5b1e08b7e2589fb5af859d58d4bf028574eb56cac6514401aa56cb482fa1166863e6a5
|
||||
DIST rsyslog-doc-8.39.0.tar.gz 7674833 BLAKE2B 1526e0637c3ab9846f447dcea48efbfd17aa517c2fc875c46ac190428db6aa2a0f81f8aaed6e5b0b6991a5c13f45bc818be76c0fe4444c0eb45628ebf48b4956 SHA512 a6d09d384616a264fdf6e09fa0f61bd82a42340bac426d93119e11158f293dd58f894623aca30f2137e51bf701531f07938d014c9b8ec97d0a796447de3089de
|
||||
DIST rsyslog-doc-8.40.0.tar.gz 7709769 BLAKE2B cda3bbd005120e7100bb36cf4c0f99d3a037525c5451ead5957f4dfe06eaceeba8fb2e266f53203bee6fae97898774ee17862a52ca1dae99aeb3534bbfadcd60 SHA512 2e2f37336948984a8cf0e098eb46e61fe4de6366d63a98204ecd558f4e21b7c1f222659f7bdecdd22e0a61d34c442b4734dbe72a72e8716c768a900b954d473f
|
||||
|
@ -0,0 +1,736 @@
|
||||
--- /dev/null
|
||||
+++ b/tests/omhttp-auth-vg.sh
|
||||
@@ -0,0 +1,3 @@
|
||||
+#!/bin/bash
|
||||
+export USE_VALGRIND="YES"
|
||||
+source ${srcdir:=.}/omhttp-auth.sh
|
||||
--- /dev/null
|
||||
+++ b/tests/omhttp-auth.sh
|
||||
@@ -0,0 +1,45 @@
|
||||
+#!/bin/bash
|
||||
+# This file is part of the rsyslog project, released under ASL 2.0
|
||||
+
|
||||
+# Starting actual testbench
|
||||
+. ${srcdir:=.}/diag.sh init
|
||||
+
|
||||
+export NUMMESSAGES=100
|
||||
+
|
||||
+port="$(get_free_port)"
|
||||
+omhttp_start_server $port --userpwd="bob:bobbackwards"
|
||||
+
|
||||
+generate_conf
|
||||
+add_conf '
|
||||
+template(name="tpl" type="string"
|
||||
+ string="{\"msgnum\":\"%msg:F,58:2%\"}")
|
||||
+
|
||||
+module(load="../contrib/omhttp/.libs/omhttp")
|
||||
+
|
||||
+if $msg contains "msgnum:" then
|
||||
+ action(
|
||||
+ # Payload
|
||||
+ name="my_http_action"
|
||||
+ type="omhttp"
|
||||
+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'"
|
||||
+ template="tpl"
|
||||
+
|
||||
+ server="localhost"
|
||||
+ serverport="'$port'"
|
||||
+ restpath="my/endpoint"
|
||||
+ batch="off"
|
||||
+
|
||||
+ # Auth
|
||||
+ usehttps="off"
|
||||
+ uid="bob"
|
||||
+ pwd="bobbackwards"
|
||||
+ )
|
||||
+'
|
||||
+startup
|
||||
+injectmsg
|
||||
+shutdown_when_empty
|
||||
+wait_shutdown
|
||||
+omhttp_get_data $port my/endpoint
|
||||
+omhttp_stop_server
|
||||
+seq_check
|
||||
+exit_test
|
||||
--- /dev/null
|
||||
+++ b/tests/omhttp-basic-vg.sh
|
||||
@@ -0,0 +1,3 @@
|
||||
+#!/bin/bash
|
||||
+export USE_VALGRIND="YES"
|
||||
+source ${srcdir:=.}/omhttp-basic.sh
|
||||
--- /dev/null
|
||||
+++ b/tests/omhttp-basic.sh
|
||||
@@ -0,0 +1,43 @@
|
||||
+#!/bin/bash
|
||||
+# This file is part of the rsyslog project, released under ASL 2.0
|
||||
+
|
||||
+# Starting actual testbench
|
||||
+. ${srcdir:=.}/diag.sh init
|
||||
+
|
||||
+export NUMMESSAGES=10000
|
||||
+
|
||||
+port="$(get_free_port)"
|
||||
+omhttp_start_server $port
|
||||
+
|
||||
+generate_conf
|
||||
+add_conf '
|
||||
+template(name="tpl" type="string"
|
||||
+ string="{\"msgnum\":\"%msg:F,58:2%\"}")
|
||||
+
|
||||
+module(load="../contrib/omhttp/.libs/omhttp")
|
||||
+
|
||||
+if $msg contains "msgnum:" then
|
||||
+ action(
|
||||
+ # Payload
|
||||
+ name="my_http_action"
|
||||
+ type="omhttp"
|
||||
+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'"
|
||||
+ template="tpl"
|
||||
+
|
||||
+ server="localhost"
|
||||
+ serverport="'$port'"
|
||||
+ restpath="my/endpoint"
|
||||
+ batch="off"
|
||||
+
|
||||
+ # Auth
|
||||
+ usehttps="off"
|
||||
+ )
|
||||
+'
|
||||
+startup
|
||||
+injectmsg
|
||||
+shutdown_when_empty
|
||||
+wait_shutdown
|
||||
+omhttp_get_data $port my/endpoint
|
||||
+omhttp_stop_server
|
||||
+seq_check
|
||||
+exit_test
|
||||
--- /dev/null
|
||||
+++ b/tests/omhttp-batch-fail-with-400.sh
|
||||
@@ -0,0 +1,52 @@
|
||||
+#!/bin/bash
|
||||
+# This file is part of the rsyslog project, released under ASL 2.0
|
||||
+
|
||||
+# Starting actual testbench
|
||||
+. ${srcdir:=.}/diag.sh init
|
||||
+
|
||||
+port="$(get_free_port)"
|
||||
+omhttp_start_server $port --fail-with-400-after 1000
|
||||
+
|
||||
+generate_conf
|
||||
+add_conf '
|
||||
+module(load="../contrib/omhttp/.libs/omhttp")
|
||||
+
|
||||
+main_queue(queue.dequeueBatchSize="2048")
|
||||
+
|
||||
+template(name="tpl" type="string"
|
||||
+ string="{\"msgnum\":\"%msg:F,58:2%\"}")
|
||||
+
|
||||
+# Wrap message as a single batch for retry
|
||||
+template(name="tpl_retry" type="string" string="[%msg%]")
|
||||
+
|
||||
+
|
||||
+ruleset(name="ruleset_omhttp") {
|
||||
+ action(
|
||||
+ name="action_omhttp"
|
||||
+ type="omhttp"
|
||||
+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'"
|
||||
+ template="tpl"
|
||||
+
|
||||
+ server="localhost"
|
||||
+ serverport="'$port'"
|
||||
+ restpath="my/endpoint"
|
||||
+ batch="off"
|
||||
+
|
||||
+ retry="on"
|
||||
+
|
||||
+ # Auth
|
||||
+ usehttps="off"
|
||||
+ ) & stop
|
||||
+}
|
||||
+
|
||||
+if $msg contains "msgnum:" then
|
||||
+ call ruleset_omhttp
|
||||
+'
|
||||
+startup
|
||||
+injectmsg 0 10000
|
||||
+shutdown_when_empty
|
||||
+wait_shutdown
|
||||
+omhttp_get_data $port my/endpoint
|
||||
+omhttp_stop_server
|
||||
+seq_check 0 999
|
||||
+exit_test
|
||||
--- /dev/null
|
||||
+++ b/tests/omhttp-batch-jsonarray-compress-vg.sh
|
||||
@@ -0,0 +1,3 @@
|
||||
+#!/bin/bash
|
||||
+export USE_VALGRIND="YES"
|
||||
+source ${srcdir:=.}/omhttp-batch-jsonarray-compress.sh
|
||||
--- /dev/null
|
||||
+++ b/tests/omhttp-batch-jsonarray-compress.sh
|
||||
@@ -0,0 +1,48 @@
|
||||
+#!/bin/bash
|
||||
+# This file is part of the rsyslog project, released under ASL 2.0
|
||||
+
|
||||
+# Starting actual testbench
|
||||
+. ${srcdir:=.}/diag.sh init
|
||||
+
|
||||
+export NUMMESSAGES=50000
|
||||
+
|
||||
+port="$(get_free_port)"
|
||||
+omhttp_start_server $port --decompress
|
||||
+
|
||||
+generate_conf
|
||||
+add_conf '
|
||||
+template(name="tpl" type="string"
|
||||
+ string="{\"msgnum\":\"%msg:F,58:2%\"}")
|
||||
+
|
||||
+module(load="../contrib/omhttp/.libs/omhttp")
|
||||
+
|
||||
+main_queue(queue.dequeueBatchSize="2048")
|
||||
+
|
||||
+if $msg contains "msgnum:" then
|
||||
+ action(
|
||||
+ # Payload
|
||||
+ name="my_http_action"
|
||||
+ type="omhttp"
|
||||
+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'"
|
||||
+ template="tpl"
|
||||
+
|
||||
+ server="localhost"
|
||||
+ serverport="'$port'"
|
||||
+ restpath="my/endpoint"
|
||||
+ batch="on"
|
||||
+ batch.format="jsonarray"
|
||||
+ batch.maxsize="1000"
|
||||
+ compress="on"
|
||||
+
|
||||
+ # Auth
|
||||
+ usehttps="off"
|
||||
+ )
|
||||
+'
|
||||
+startup
|
||||
+injectmsg
|
||||
+shutdown_when_empty
|
||||
+wait_shutdown
|
||||
+omhttp_get_data $port my/endpoint jsonarray
|
||||
+omhttp_stop_server
|
||||
+seq_check
|
||||
+exit_test
|
||||
--- /dev/null
|
||||
+++ b/tests/omhttp-batch-jsonarray-retry-vg.sh
|
||||
@@ -0,0 +1,3 @@
|
||||
+#!/bin/bash
|
||||
+export USE_VALGRIND="YES"
|
||||
+source ${srcdir:=.}/omhttp-batch-jsonarray-retry.sh
|
||||
--- /dev/null
|
||||
+++ b/tests/omhttp-batch-jsonarray-retry.sh
|
||||
@@ -0,0 +1,78 @@
|
||||
+#!/bin/bash
|
||||
+# This file is part of the rsyslog project, released under ASL 2.0
|
||||
+
|
||||
+# Starting actual testbench
|
||||
+. ${srcdir:=.}/diag.sh init
|
||||
+
|
||||
+export NUMMESSAGES=50000
|
||||
+
|
||||
+port="$(get_free_port)"
|
||||
+omhttp_start_server $port --fail-every 100
|
||||
+
|
||||
+generate_conf
|
||||
+add_conf '
|
||||
+module(load="../contrib/omhttp/.libs/omhttp")
|
||||
+
|
||||
+main_queue(queue.dequeueBatchSize="2048")
|
||||
+
|
||||
+template(name="tpl" type="string"
|
||||
+ string="{\"msgnum\":\"%msg:F,58:2%\"}")
|
||||
+
|
||||
+# Echo message as-is for retry
|
||||
+template(name="tpl_echo" type="string" string="%msg%")
|
||||
+
|
||||
+ruleset(name="ruleset_omhttp_retry") {
|
||||
+ action(
|
||||
+ name="action_omhttp"
|
||||
+ type="omhttp"
|
||||
+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'"
|
||||
+ template="tpl_echo"
|
||||
+
|
||||
+ server="localhost"
|
||||
+ serverport="'$port'"
|
||||
+ restpath="my/endpoint"
|
||||
+ batch="on"
|
||||
+ batch.maxsize="100"
|
||||
+ batch.format="jsonarray"
|
||||
+
|
||||
+ retry="on"
|
||||
+ retry.ruleset="ruleset_omhttp_retry"
|
||||
+
|
||||
+ # Auth
|
||||
+ usehttps="off"
|
||||
+ ) & stop
|
||||
+}
|
||||
+
|
||||
+ruleset(name="ruleset_omhttp") {
|
||||
+ action(
|
||||
+ name="action_omhttp"
|
||||
+ type="omhttp"
|
||||
+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'"
|
||||
+ template="tpl"
|
||||
+
|
||||
+ server="localhost"
|
||||
+ serverport="'$port'"
|
||||
+ restpath="my/endpoint"
|
||||
+ batch="on"
|
||||
+ batch.maxsize="100"
|
||||
+ batch.format="jsonarray"
|
||||
+
|
||||
+ retry="on"
|
||||
+ retry.ruleset="ruleset_omhttp_retry"
|
||||
+
|
||||
+ # Auth
|
||||
+ usehttps="off"
|
||||
+ ) & stop
|
||||
+}
|
||||
+
|
||||
+if $msg contains "msgnum:" then
|
||||
+ call ruleset_omhttp
|
||||
+'
|
||||
+startup
|
||||
+injectmsg
|
||||
+shutdown_when_empty
|
||||
+wait_shutdown
|
||||
+omhttp_get_data $port my/endpoint jsonarray
|
||||
+omhttp_stop_server
|
||||
+seq_check
|
||||
+exit_test
|
||||
--- /dev/null
|
||||
+++ b/tests/omhttp-batch-jsonarray-vg.sh
|
||||
@@ -0,0 +1,3 @@
|
||||
+#!/bin/bash
|
||||
+export USE_VALGRIND="YES"
|
||||
+source ${srcdir:=.}/omhttp-batch-jsonarray.sh
|
||||
--- /dev/null
|
||||
+++ b/tests/omhttp-batch-jsonarray.sh
|
||||
@@ -0,0 +1,47 @@
|
||||
+#!/bin/bash
|
||||
+# This file is part of the rsyslog project, released under ASL 2.0
|
||||
+
|
||||
+# Starting actual testbench
|
||||
+. ${srcdir:=.}/diag.sh init
|
||||
+
|
||||
+export NUMMESSAGES=50000
|
||||
+
|
||||
+port="$(get_free_port)"
|
||||
+omhttp_start_server $port
|
||||
+
|
||||
+generate_conf
|
||||
+add_conf '
|
||||
+template(name="tpl" type="string"
|
||||
+ string="{\"msgnum\":\"%msg:F,58:2%\"}")
|
||||
+
|
||||
+module(load="../contrib/omhttp/.libs/omhttp")
|
||||
+
|
||||
+main_queue(queue.dequeueBatchSize="2048")
|
||||
+
|
||||
+if $msg contains "msgnum:" then
|
||||
+ action(
|
||||
+ # Payload
|
||||
+ name="my_http_action"
|
||||
+ type="omhttp"
|
||||
+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'"
|
||||
+ template="tpl"
|
||||
+
|
||||
+ server="localhost"
|
||||
+ serverport="'$port'"
|
||||
+ restpath="my/endpoint"
|
||||
+ batch="on"
|
||||
+ batch.format="jsonarray"
|
||||
+ batch.maxsize="1000"
|
||||
+
|
||||
+ # Auth
|
||||
+ usehttps="off"
|
||||
+ )
|
||||
+'
|
||||
+startup
|
||||
+injectmsg
|
||||
+shutdown_when_empty
|
||||
+wait_shutdown
|
||||
+omhttp_get_data $port my/endpoint jsonarray
|
||||
+omhttp_stop_server
|
||||
+seq_check
|
||||
+exit_test
|
||||
--- /dev/null
|
||||
+++ b/tests/omhttp-batch-kafkarest-retry-vg.sh
|
||||
@@ -0,0 +1,3 @@
|
||||
+#!/bin/bash
|
||||
+export USE_VALGRIND="YES"
|
||||
+source ${srcdir:=.}/omhttp-batch-kafkarest-retry.sh
|
||||
--- /dev/null
|
||||
+++ b/tests/omhttp-batch-kafkarest-retry.sh
|
||||
@@ -0,0 +1,78 @@
|
||||
+#!/bin/bash
|
||||
+# This file is part of the rsyslog project, released under ASL 2.0
|
||||
+
|
||||
+# Starting actual testbench
|
||||
+. ${srcdir:=.}/diag.sh init
|
||||
+
|
||||
+export NUMMESSAGES=50000
|
||||
+
|
||||
+port="$(get_free_port)"
|
||||
+omhttp_start_server $port --fail-every 100
|
||||
+
|
||||
+generate_conf
|
||||
+add_conf '
|
||||
+module(load="../contrib/omhttp/.libs/omhttp")
|
||||
+
|
||||
+main_queue(queue.dequeueBatchSize="2048")
|
||||
+
|
||||
+template(name="tpl" type="string"
|
||||
+ string="{\"msgnum\":\"%msg:F,58:2%\"}")
|
||||
+
|
||||
+# Echo message as-is for retry
|
||||
+template(name="tpl_echo" type="string" string="%msg%")
|
||||
+
|
||||
+ruleset(name="ruleset_omhttp_retry") {
|
||||
+ action(
|
||||
+ name="action_omhttp"
|
||||
+ type="omhttp"
|
||||
+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'"
|
||||
+ template="tpl_echo"
|
||||
+
|
||||
+ server="localhost"
|
||||
+ serverport="'$port'"
|
||||
+ restpath="my/endpoint"
|
||||
+ batch="on"
|
||||
+ batch.maxsize="100"
|
||||
+ batch.format="kafkarest"
|
||||
+
|
||||
+ retry="on"
|
||||
+ retry.ruleset="ruleset_omhttp_retry"
|
||||
+
|
||||
+ # Auth
|
||||
+ usehttps="off"
|
||||
+ ) & stop
|
||||
+}
|
||||
+
|
||||
+ruleset(name="ruleset_omhttp") {
|
||||
+ action(
|
||||
+ name="action_omhttp"
|
||||
+ type="omhttp"
|
||||
+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'"
|
||||
+ template="tpl"
|
||||
+
|
||||
+ server="localhost"
|
||||
+ serverport="'$port'"
|
||||
+ restpath="my/endpoint"
|
||||
+ batch="on"
|
||||
+ batch.maxsize="100"
|
||||
+ batch.format="kafkarest"
|
||||
+
|
||||
+ retry="on"
|
||||
+ retry.ruleset="ruleset_omhttp_retry"
|
||||
+
|
||||
+ # Auth
|
||||
+ usehttps="off"
|
||||
+ ) & stop
|
||||
+}
|
||||
+
|
||||
+if $msg contains "msgnum:" then
|
||||
+ call ruleset_omhttp
|
||||
+'
|
||||
+startup
|
||||
+injectmsg
|
||||
+shutdown_when_empty
|
||||
+wait_shutdown
|
||||
+omhttp_get_data $port my/endpoint kafkarest
|
||||
+omhttp_stop_server
|
||||
+seq_check
|
||||
+exit_test
|
||||
--- /dev/null
|
||||
+++ b/tests/omhttp-batch-kafkarest.sh
|
||||
@@ -0,0 +1,47 @@
|
||||
+#!/bin/bash
|
||||
+# This file is part of the rsyslog project, released under ASL 2.0
|
||||
+
|
||||
+# Starting actual testbench
|
||||
+. ${srcdir:=.}/diag.sh init
|
||||
+
|
||||
+export NUMMESSAGES=50000
|
||||
+
|
||||
+port="$(get_free_port)"
|
||||
+omhttp_start_server $port
|
||||
+
|
||||
+generate_conf
|
||||
+add_conf '
|
||||
+template(name="tpl" type="string"
|
||||
+ string="{\"msgnum\":\"%msg:F,58:2%\"}")
|
||||
+
|
||||
+module(load="../contrib/omhttp/.libs/omhttp")
|
||||
+
|
||||
+main_queue(queue.dequeueBatchSize="2048")
|
||||
+
|
||||
+if $msg contains "msgnum:" then
|
||||
+ action(
|
||||
+ # Payload
|
||||
+ name="my_http_action"
|
||||
+ type="omhttp"
|
||||
+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'"
|
||||
+ template="tpl"
|
||||
+
|
||||
+ server="localhost"
|
||||
+ serverport="'$port'"
|
||||
+ restpath="my/endpoint"
|
||||
+ batch="on"
|
||||
+ batch.format="kafkarest"
|
||||
+ batch.maxsize="100"
|
||||
+
|
||||
+ # Auth
|
||||
+ usehttps="off"
|
||||
+ )
|
||||
+'
|
||||
+startup
|
||||
+injectmsg
|
||||
+shutdown_when_empty
|
||||
+wait_shutdown
|
||||
+omhttp_get_data $port my/endpoint kafkarest
|
||||
+omhttp_stop_server
|
||||
+seq_check
|
||||
+exit_test
|
||||
--- /dev/null
|
||||
+++ b/tests/omhttp-batch-newline.sh
|
||||
@@ -0,0 +1,47 @@
|
||||
+#!/bin/bash
|
||||
+# This file is part of the rsyslog project, released under ASL 2.0
|
||||
+
|
||||
+# Starting actual testbench
|
||||
+. ${srcdir:=.}/diag.sh init
|
||||
+
|
||||
+export NUMMESSAGES=50000
|
||||
+
|
||||
+port="$(get_free_port)"
|
||||
+omhttp_start_server $port
|
||||
+
|
||||
+generate_conf
|
||||
+add_conf '
|
||||
+template(name="tpl" type="string"
|
||||
+ string="{\"msgnum\":\"%msg:F,58:2%\"}")
|
||||
+
|
||||
+module(load="../contrib/omhttp/.libs/omhttp")
|
||||
+
|
||||
+main_queue(queue.dequeueBatchSize="2048")
|
||||
+
|
||||
+if $msg contains "msgnum:" then
|
||||
+ action(
|
||||
+ # Payload
|
||||
+ name="my_http_action"
|
||||
+ type="omhttp"
|
||||
+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'"
|
||||
+ template="tpl"
|
||||
+
|
||||
+ server="localhost"
|
||||
+ serverport="'$port'"
|
||||
+ restpath="my/endpoint"
|
||||
+ batch="on"
|
||||
+ batch.format="newline"
|
||||
+ batch.maxsize="100"
|
||||
+
|
||||
+ # Auth
|
||||
+ usehttps="off"
|
||||
+ )
|
||||
+'
|
||||
+startup
|
||||
+injectmsg
|
||||
+shutdown_when_empty
|
||||
+wait_shutdown
|
||||
+omhttp_get_data $port my/endpoint newline
|
||||
+omhttp_stop_server
|
||||
+seq_check
|
||||
+exit_test
|
||||
--- /dev/null
|
||||
+++ b/tests/omhttp-retry-vg.sh
|
||||
@@ -0,0 +1,3 @@
|
||||
+#!/bin/bash
|
||||
+export USE_VALGRIND="YES"
|
||||
+source ${srcdir:=.}/omhttp-retry.sh
|
||||
--- /dev/null
|
||||
+++ b/tests/omhttp-retry.sh
|
||||
@@ -0,0 +1,46 @@
|
||||
+#!/bin/bash
|
||||
+# This file is part of the rsyslog project, released under ASL 2.0
|
||||
+
|
||||
+# Starting actual testbench
|
||||
+. ${srcdir:=.}/diag.sh init
|
||||
+
|
||||
+export NUMMESSAGES=10000
|
||||
+
|
||||
+port="$(get_free_port)"
|
||||
+omhttp_start_server $port --fail-every 1000
|
||||
+
|
||||
+generate_conf
|
||||
+add_conf '
|
||||
+module(load="../contrib/omhttp/.libs/omhttp")
|
||||
+
|
||||
+main_queue(queue.dequeueBatchSize="2048")
|
||||
+
|
||||
+template(name="tpl" type="string"
|
||||
+ string="{\"msgnum\":\"%msg:F,58:2%\"}")
|
||||
+
|
||||
+if $msg contains "msgnum:" then
|
||||
+ action(
|
||||
+ # Payload
|
||||
+ action.resumeRetryCount="-1"
|
||||
+ name="my_http_action"
|
||||
+ type="omhttp"
|
||||
+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'"
|
||||
+ template="tpl"
|
||||
+
|
||||
+ server="localhost"
|
||||
+ serverport="'$port'"
|
||||
+ restpath="my/endpoint"
|
||||
+ batch="off"
|
||||
+
|
||||
+ # Auth
|
||||
+ usehttps="off"
|
||||
+ )
|
||||
+'
|
||||
+startup
|
||||
+injectmsg
|
||||
+shutdown_when_empty
|
||||
+wait_shutdown
|
||||
+omhttp_get_data $port my/endpoint
|
||||
+omhttp_stop_server
|
||||
+seq_check
|
||||
+exit_test
|
||||
--- /dev/null
|
||||
+++ b/tests/omhttp_server.py
|
||||
@@ -0,0 +1,130 @@
|
||||
+#!/usr/bin/env python
|
||||
+
|
||||
+import argparse
|
||||
+import json
|
||||
+import os
|
||||
+import zlib
|
||||
+import base64
|
||||
+
|
||||
+try:
|
||||
+ from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer # Python 2
|
||||
+except ImportError:
|
||||
+ from http.server import BaseHTTPRequestHandler, HTTPServer # Python 3
|
||||
+
|
||||
+# Keep track of data received at each path
|
||||
+data = {}
|
||||
+
|
||||
+metadata = {'posts': 0, 'fail_after': 0, 'fail_every': -1, 'decompress': False, 'userpwd': ''}
|
||||
+
|
||||
+
|
||||
+class MyHandler(BaseHTTPRequestHandler):
|
||||
+ """
|
||||
+ POST'd data is kept in the data global dict.
|
||||
+ Keys are the path, values are the raw received data.
|
||||
+ Two post requests to <host>:<port>/post/endpoint means data looks like...
|
||||
+ {"/post/endpoint": ["{\"msgnum\":\"00001\"}", "{\"msgnum\":\"00001\"}"]}
|
||||
+
|
||||
+ GET requests return all data posted to that endpoint as a json list.
|
||||
+ Note that rsyslog usually sends escaped json data, so some parsing may be needed.
|
||||
+ A get request for <host>:<post>/post/endpoint responds with...
|
||||
+ ["{\"msgnum\":\"00001\"}", "{\"msgnum\":\"00001\"}"]
|
||||
+ """
|
||||
+
|
||||
+ def validate_auth(self):
|
||||
+ # header format for basic authentication
|
||||
+ # 'Authorization: Basic <base 64 encoded uid:pwd>'
|
||||
+ if 'Authorization' not in self.headers:
|
||||
+ self.send_response(401)
|
||||
+ self.end_headers()
|
||||
+ self.wfile.write('missing "Authorization" header')
|
||||
+ return False
|
||||
+
|
||||
+ auth_header = self.headers['Authorization']
|
||||
+ _, b64userpwd = auth_header.split()
|
||||
+ userpwd = base64.b64decode(b64userpwd)
|
||||
+ if userpwd != metadata['userpwd']:
|
||||
+ self.send_response(401)
|
||||
+ self.end_headers()
|
||||
+ self.wfile.write('invalid auth: {0}'.format(userpwd))
|
||||
+ return False
|
||||
+
|
||||
+ return True
|
||||
+
|
||||
+ def do_POST(self):
|
||||
+ metadata['posts'] += 1
|
||||
+
|
||||
+ if metadata['userpwd']:
|
||||
+ if not self.validate_auth():
|
||||
+ return
|
||||
+
|
||||
+ if metadata['fail_with_400_after'] != -1 and metadata['posts'] > metadata['fail_with_400_after']:
|
||||
+ self.send_response(400)
|
||||
+ self.end_headers()
|
||||
+ self.wfile.write('BAD REQUEST')
|
||||
+ return
|
||||
+
|
||||
+ if metadata['posts'] > 1 and metadata['fail_every'] != -1 and metadata['posts'] % metadata['fail_every'] == 0:
|
||||
+ self.send_response(500)
|
||||
+ self.end_headers()
|
||||
+ self.wfile.write('INTERNAL ERROR')
|
||||
+ return
|
||||
+
|
||||
+ content_length = int(self.headers['Content-Length'])
|
||||
+ raw_data = self.rfile.read(content_length)
|
||||
+
|
||||
+ if metadata['decompress']:
|
||||
+ post_data = zlib.decompress(raw_data, 31)
|
||||
+ else:
|
||||
+ post_data = raw_data
|
||||
+
|
||||
+ if self.path not in data:
|
||||
+ data[self.path] = []
|
||||
+ data[self.path].append(post_data)
|
||||
+
|
||||
+ res = json.dumps({'msg': 'ok'})
|
||||
+
|
||||
+ self.send_response(200)
|
||||
+ self.send_header('Content-Type', 'application/json')
|
||||
+ self.send_header('Content-Length', len(res))
|
||||
+ self.end_headers()
|
||||
+
|
||||
+ self.wfile.write(res)
|
||||
+ return
|
||||
+
|
||||
+ def do_GET(self):
|
||||
+ if self.path in data:
|
||||
+ result = data[self.path]
|
||||
+ else:
|
||||
+ result = []
|
||||
+
|
||||
+ res = json.dumps(result)
|
||||
+
|
||||
+ self.send_response(200)
|
||||
+ self.send_header('Content-Type', 'application/json')
|
||||
+ self.send_header('Content-Length', len(res))
|
||||
+ self.end_headers()
|
||||
+
|
||||
+ self.wfile.write(res)
|
||||
+ return
|
||||
+
|
||||
+
|
||||
+if __name__ == '__main__':
|
||||
+ parser = argparse.ArgumentParser(description='Archive and delete core app log files')
|
||||
+ parser.add_argument('-p', '--port', action='store', type=int, default=8080, help='port')
|
||||
+ parser.add_argument('-i', '--interface', action='store', type=str, default='localhost', help='port')
|
||||
+ parser.add_argument('--fail-after', action='store', type=int, default=0, help='start failing after n posts')
|
||||
+ parser.add_argument('--fail-every', action='store', type=int, default=-1, help='fail every n posts')
|
||||
+ parser.add_argument('--fail-with-400-after', action='store', type=int, default=-1, help='fail with 400 after n posts')
|
||||
+ parser.add_argument('--decompress', action='store_true', default=False, help='decompress posted data')
|
||||
+ parser.add_argument('--userpwd', action='store', default='', help='only accept this user:password combination')
|
||||
+ args = parser.parse_args()
|
||||
+ metadata['fail_after'] = args.fail_after
|
||||
+ metadata['fail_every'] = args.fail_every
|
||||
+ metadata['fail_with_400_after'] = args.fail_with_400_after
|
||||
+ metadata['decompress'] = args.decompress
|
||||
+ metadata['userpwd'] = args.userpwd
|
||||
+ server = HTTPServer((args.interface, args.port), MyHandler)
|
||||
+ pid = os.getpid()
|
||||
+ print('starting omhttp test server at {interface}:{port} with pid {pid}'
|
||||
+ .format(interface=args.interface, port=args.port, pid=pid))
|
||||
+ server.serve_forever()
|
@ -0,0 +1,83 @@
|
||||
From c82b747eaf96cc77efa530ca5844ba01b91bfc88 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Deutschmann <whissi@whissi.de>
|
||||
Date: Sat, 6 Apr 2019 00:28:54 +0200
|
||||
Subject: [PATCH] tests: omhttp: add Python 3 compatibility
|
||||
|
||||
Fixes: https://github.com/rsyslog/rsyslog/issues/3599
|
||||
---
|
||||
tests/omhttp_server.py | 22 +++++++++++-----------
|
||||
1 file changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/tests/omhttp_server.py b/tests/omhttp_server.py
|
||||
index 6962138fa..d3fdb3a9a 100644
|
||||
--- a/tests/omhttp_server.py
|
||||
+++ b/tests/omhttp_server.py
|
||||
@@ -36,16 +36,16 @@ def validate_auth(self):
|
||||
if 'Authorization' not in self.headers:
|
||||
self.send_response(401)
|
||||
self.end_headers()
|
||||
- self.wfile.write('missing "Authorization" header')
|
||||
+ self.wfile.write(b'missing "Authorization" header')
|
||||
return False
|
||||
|
||||
auth_header = self.headers['Authorization']
|
||||
_, b64userpwd = auth_header.split()
|
||||
- userpwd = base64.b64decode(b64userpwd)
|
||||
+ userpwd = base64.b64decode(b64userpwd).decode('utf-8')
|
||||
if userpwd != metadata['userpwd']:
|
||||
self.send_response(401)
|
||||
self.end_headers()
|
||||
- self.wfile.write('invalid auth: {0}'.format(userpwd))
|
||||
+ self.wfile.write(b'invalid auth: {0}'.format(userpwd))
|
||||
return False
|
||||
|
||||
return True
|
||||
@@ -60,16 +60,16 @@ def do_POST(self):
|
||||
if metadata['fail_with_400_after'] != -1 and metadata['posts'] > metadata['fail_with_400_after']:
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
- self.wfile.write('BAD REQUEST')
|
||||
+ self.wfile.write(b'BAD REQUEST')
|
||||
return
|
||||
|
||||
if metadata['posts'] > 1 and metadata['fail_every'] != -1 and metadata['posts'] % metadata['fail_every'] == 0:
|
||||
self.send_response(500)
|
||||
self.end_headers()
|
||||
- self.wfile.write('INTERNAL ERROR')
|
||||
+ self.wfile.write(b'INTERNAL ERROR')
|
||||
return
|
||||
|
||||
- content_length = int(self.headers['Content-Length'])
|
||||
+ content_length = int(self.headers['Content-Length'] or 0)
|
||||
raw_data = self.rfile.read(content_length)
|
||||
|
||||
if metadata['decompress']:
|
||||
@@ -79,12 +79,12 @@ def do_POST(self):
|
||||
|
||||
if self.path not in data:
|
||||
data[self.path] = []
|
||||
- data[self.path].append(post_data)
|
||||
+ data[self.path].append(post_data.decode('utf-8'))
|
||||
|
||||
- res = json.dumps({'msg': 'ok'})
|
||||
+ res = json.dumps({'msg': 'ok'}).encode('utf8')
|
||||
|
||||
self.send_response(200)
|
||||
- self.send_header('Content-Type', 'application/json')
|
||||
+ self.send_header('Content-Type', 'application/json; charset=utf-8')
|
||||
self.send_header('Content-Length', len(res))
|
||||
self.end_headers()
|
||||
|
||||
@@ -97,10 +97,10 @@ def do_GET(self):
|
||||
else:
|
||||
result = []
|
||||
|
||||
- res = json.dumps(result)
|
||||
+ res = json.dumps(result).encode('utf8')
|
||||
|
||||
self.send_response(200)
|
||||
- self.send_header('Content-Type', 'application/json')
|
||||
+ self.send_header('Content-Type', 'application/json; charset=utf-8')
|
||||
self.send_header('Content-Length', len(res))
|
||||
self.end_headers()
|
||||
|
@ -0,0 +1,22 @@
|
||||
From f0847e46c148233b6ab5d6088ca4e1dc664e82a4 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Deutschmann <whissi@whissi.de>
|
||||
Date: Sat, 6 Apr 2019 02:07:51 +0200
|
||||
Subject: [PATCH] testbench: fix Python 3 compatibility
|
||||
|
||||
---
|
||||
tests/diag.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/diag.sh b/tests/diag.sh
|
||||
index 5b4b3df46..2926e6ac2 100755
|
||||
--- a/tests/diag.sh
|
||||
+++ b/tests/diag.sh
|
||||
@@ -1334,7 +1334,7 @@ get_inode() {
|
||||
printf 'FAIL: file "%s" does not exist in get_inode\n' "$1"
|
||||
error_exit 100
|
||||
fi
|
||||
- python -c 'import os; import stat; print os.lstat("'$1'")[stat.ST_INO]'
|
||||
+ python -c 'import os; import stat; print(os.lstat("'$1'")[stat.ST_INO])'
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,465 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6,3_7} )
|
||||
|
||||
inherit autotools eutils linux-info python-any-r1 systemd
|
||||
|
||||
DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
|
||||
HOMEPAGE="https://www.rsyslog.com/"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
|
||||
|
||||
DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
|
||||
|
||||
inherit git-r3
|
||||
else
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~x86"
|
||||
|
||||
SRC_URI="
|
||||
https://www.rsyslog.com/files/download/${PN}/${P}.tar.gz
|
||||
doc? ( https://www.rsyslog.com/files/download/${PN}/${PN}-doc-${PV}.tar.gz )
|
||||
"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-3 LGPL-3 Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="curl dbi debug doc elasticsearch +gcrypt grok gnutls jemalloc kafka kerberos kubernetes libressl mdblookup"
|
||||
IUSE+=" mongodb mysql normalize clickhouse omhttp omhttpfs omudpspoof openssl postgres"
|
||||
IUSE+=" rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid xxhash zeromq"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-libs/libfastjson-0.99.8:=
|
||||
>=dev-libs/libestr-0.1.9
|
||||
>=sys-libs/zlib-1.2.5
|
||||
curl? ( >=net-misc/curl-7.35.0 )
|
||||
dbi? ( >=dev-db/libdbi-0.8.3 )
|
||||
elasticsearch? ( >=net-misc/curl-7.35.0 )
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
|
||||
grok? ( >=dev-libs/grok-0.9.2 )
|
||||
jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
|
||||
kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
|
||||
kerberos? ( virtual/krb5 )
|
||||
kubernetes? ( >=net-misc/curl-7.35.0 )
|
||||
mdblookup? ( dev-libs/libmaxminddb:= )
|
||||
mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= )
|
||||
mysql? ( virtual/libmysqlclient:= )
|
||||
normalize? (
|
||||
>=dev-libs/libee-0.4.0
|
||||
>=dev-libs/liblognorm-2.0.3:=
|
||||
)
|
||||
clickhouse? ( >=net-misc/curl-7.35.0 )
|
||||
omhttpfs? ( >=net-misc/curl-7.35.0 )
|
||||
omudpspoof? ( >=net-libs/libnet-1.1.6 )
|
||||
postgres? ( >=dev-db/postgresql-8.4.20:= )
|
||||
rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
|
||||
redis? ( >=dev-libs/hiredis-0.11.0:= )
|
||||
relp? ( >=dev-libs/librelp-1.2.17:= )
|
||||
rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
|
||||
rfc5424hmac? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.8y:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
snmp? ( >=net-analyzer/net-snmp-5.7.2 )
|
||||
ssl? (
|
||||
gnutls? ( >=net-libs/gnutls-2.12.23:0= )
|
||||
openssl? (
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
)
|
||||
systemd? ( >=sys-apps/systemd-234 )
|
||||
uuid? ( sys-apps/util-linux:0= )
|
||||
xxhash? ( dev-libs/xxhash:= )
|
||||
zeromq? (
|
||||
>=net-libs/czmq-3.0.2
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
>=sys-devel/autoconf-archive-2015.02.24
|
||||
virtual/pkgconfig
|
||||
elibc_musl? ( sys-libs/queue-standalone )
|
||||
test? (
|
||||
>=dev-libs/liblogging-1.0.1[stdlog]
|
||||
jemalloc? ( <sys-libs/libfaketime-0.9.7 )
|
||||
!jemalloc? ( sys-libs/libfaketime )
|
||||
${PYTHON_DEPS}
|
||||
)"
|
||||
|
||||
REQUIRED_USE="
|
||||
kubernetes? ( normalize )
|
||||
ssl? ( || ( gnutls openssl ) )
|
||||
"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
|
||||
DEPEND+=" >=sys-devel/flex-2.5.39-r1"
|
||||
DEPEND+=" >=sys-devel/bison-2.4.3"
|
||||
DEPEND+=" >=dev-python/docutils-0.12"
|
||||
fi
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-add-missing-tests.patch
|
||||
"${FILESDIR}"/${P}-add-py3-support-to-omhttp-test.patch
|
||||
"${FILESDIR}"/${P}-fix-py3-compatibility-in-diag.sh.patch
|
||||
)
|
||||
|
||||
CONFIG_CHECK="~INOTIFY_USER"
|
||||
WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
|
||||
|
||||
pkg_setup() {
|
||||
use test && python-any-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
git-r3_fetch
|
||||
git-r3_checkout
|
||||
else
|
||||
unpack ${P}.tar.gz
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
local _EGIT_BRANCH=
|
||||
if [[ -n "${EGIT_BRANCH}" ]]; then
|
||||
# Cannot use rsyslog commits/branches for documentation repository
|
||||
_EGIT_BRANCH=${EGIT_BRANCH}
|
||||
unset EGIT_BRANCH
|
||||
fi
|
||||
|
||||
git-r3_fetch "${DOC_REPO_URI}"
|
||||
git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
|
||||
|
||||
if [[ -n "${_EGIT_BRANCH}" ]]; then
|
||||
# Restore previous EGIT_BRANCH information
|
||||
EGIT_BRANCH=${_EGIT_BRANCH}
|
||||
fi
|
||||
else
|
||||
cd "${S}" || die "Cannot change dir into '${S}'"
|
||||
mkdir docs || die "Failed to create docs directory"
|
||||
cd docs || die "Failed to change dir into '${S}/docs'"
|
||||
unpack ${PN}-doc-${PV}.tar.gz
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Maintainer notes:
|
||||
# * Guardtime support is missing because libgt isn't yet available
|
||||
# in portage.
|
||||
# * Hadoop's HDFS file system output module is currently not
|
||||
# supported in Gentoo because nobody is able to test it
|
||||
# (JAVA dependency).
|
||||
# * dev-libs/hiredis doesn't provide pkg-config (see #504614,
|
||||
# upstream PR 129 and 136) so we need to export HIREDIS_*
|
||||
# variables because rsyslog's build system depends on pkg-config.
|
||||
|
||||
if use redis; then
|
||||
export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
|
||||
export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
--disable-debug-symbols
|
||||
--disable-generate-man-pages
|
||||
--without-valgrind-testbench
|
||||
--disable-liblogging-stdlog
|
||||
$(use_enable test testbench)
|
||||
$(use_enable test libfaketime)
|
||||
$(use_enable test extended-tests)
|
||||
# Input Plugins without depedencies
|
||||
--enable-imdiag
|
||||
--enable-imfile
|
||||
--enable-impstats
|
||||
--enable-imptcp
|
||||
# Message Modificiation Plugins without depedencies
|
||||
--enable-mmanon
|
||||
--enable-mmaudit
|
||||
--enable-mmcount
|
||||
--enable-mmfields
|
||||
--enable-mmjsonparse
|
||||
--enable-mmpstrucdata
|
||||
--enable-mmrm1stspace
|
||||
--enable-mmsequence
|
||||
--enable-mmutf8fix
|
||||
# Output Modification Plugins without dependencies
|
||||
--enable-mail
|
||||
--enable-omprog
|
||||
--enable-omruleset
|
||||
--enable-omstdout
|
||||
--enable-omuxsock
|
||||
# Misc
|
||||
--enable-fmhash
|
||||
$(use_enable xxhash fmhash-xxhash)
|
||||
--enable-pmaixforwardedfrom
|
||||
--enable-pmciscoios
|
||||
--enable-pmcisconames
|
||||
--enable-pmlastmsg
|
||||
$(use_enable normalize pmnormalize)
|
||||
--enable-pmnull
|
||||
--enable-pmpanngfw
|
||||
--enable-pmsnare
|
||||
# DB
|
||||
$(use_enable dbi libdbi)
|
||||
$(use_enable mongodb ommongodb)
|
||||
$(use_enable mysql)
|
||||
$(use_enable postgres pgsql)
|
||||
$(use_enable redis omhiredis)
|
||||
# Debug
|
||||
$(use_enable debug)
|
||||
$(use_enable debug diagtools)
|
||||
$(use_enable debug valgrind)
|
||||
# Misc
|
||||
$(use_enable clickhouse)
|
||||
$(use_enable curl fmhttp)
|
||||
$(use_enable elasticsearch)
|
||||
$(use_enable gcrypt libgcrypt)
|
||||
$(use_enable jemalloc)
|
||||
$(use_enable kafka imkafka)
|
||||
$(use_enable kafka omkafka)
|
||||
$(use_enable kerberos gssapi-krb5)
|
||||
$(use_enable kubernetes mmkubernetes)
|
||||
$(use_enable normalize mmnormalize)
|
||||
$(use_enable mdblookup mmdblookup)
|
||||
$(use_enable grok mmgrok)
|
||||
$(use_enable omhttp)
|
||||
$(use_enable omhttpfs)
|
||||
$(use_enable omudpspoof)
|
||||
$(use_enable rabbitmq omrabbitmq)
|
||||
$(use_enable relp)
|
||||
$(use_enable rfc3195)
|
||||
$(use_enable rfc5424hmac mmrfc5424addhmac)
|
||||
$(use_enable snmp)
|
||||
$(use_enable snmp mmsnmptrapd)
|
||||
$(use_enable gnutls)
|
||||
$(use_enable openssl)
|
||||
$(use_enable systemd imjournal)
|
||||
$(use_enable systemd omjournal)
|
||||
$(use_enable usertools)
|
||||
$(use_enable uuid)
|
||||
$(use_enable zeromq imczmq)
|
||||
$(use_enable zeromq omczmq)
|
||||
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||
)
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
if use doc && [[ "${PV}" == "9999" ]]; then
|
||||
einfo "Building documentation ..."
|
||||
local doc_dir="${S}/docs"
|
||||
cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
|
||||
sphinx-build -b html source build || die "Building documentation failed!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local _has_increased_ulimit=
|
||||
|
||||
# Sometimes tests aren't executable (i.e. when added via patch)
|
||||
einfo "Adjusting permissions of test scripts ..."
|
||||
find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
|
||||
die "Failed to adjust test scripts permission"
|
||||
|
||||
if ulimit -n 3072; then
|
||||
_has_increased_ulimit="true"
|
||||
fi
|
||||
|
||||
if ! emake --jobs 1 check; then
|
||||
eerror "Test suite failed! :("
|
||||
|
||||
if [[ -z "${_has_increased_ulimit}" ]]; then
|
||||
eerror "Probably because open file limit couldn't be set to 3072."
|
||||
fi
|
||||
|
||||
if has userpriv ${FEATURES}; then
|
||||
eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
|
||||
"before you submit a bug report."
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local DOCS=(
|
||||
AUTHORS
|
||||
ChangeLog
|
||||
"${FILESDIR}"/README.gentoo
|
||||
)
|
||||
|
||||
use doc && local HTML_DOCS=( "${S}/docs/build/." )
|
||||
|
||||
default
|
||||
|
||||
newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
|
||||
newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
|
||||
|
||||
keepdir /var/empty/dev
|
||||
keepdir /var/spool/${PN}
|
||||
keepdir /etc/ssl/${PN}
|
||||
keepdir /etc/${PN}.d
|
||||
|
||||
insinto /etc
|
||||
newins "${FILESDIR}/${PN}.conf" ${PN}.conf
|
||||
|
||||
insinto /etc/rsyslog.d/
|
||||
newins "${FILESDIR}/50-default-r1.conf" 50-default.conf
|
||||
|
||||
insinto /etc/logrotate.d/
|
||||
newins "${FILESDIR}/${PN}-r1.logrotate" ${PN}
|
||||
|
||||
if use mysql; then
|
||||
insinto /usr/share/doc/${PF}/scripts/mysql
|
||||
doins plugins/ommysql/createDB.sql
|
||||
fi
|
||||
|
||||
if use postgres; then
|
||||
insinto /usr/share/doc/${PF}/scripts/pgsql
|
||||
doins plugins/ompgsql/createDB.sql
|
||||
fi
|
||||
|
||||
prune_libtool_files --modules
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local advertise_readme=0
|
||||
|
||||
if [[ -z "${REPLACING_VERSIONS}" ]]; then
|
||||
# This is a new installation
|
||||
|
||||
advertise_readme=1
|
||||
|
||||
if use mysql || use postgres; then
|
||||
echo
|
||||
elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
|
||||
elog " /usr/share/doc/${PF}/scripts"
|
||||
fi
|
||||
|
||||
if use ssl; then
|
||||
echo
|
||||
elog "To create a default CA and certificates for your server and clients, run:"
|
||||
elog " emerge --config =${PF}"
|
||||
elog "on your logging server. You can run it several times,"
|
||||
elog "once for each logging client. The client certificates will be signed"
|
||||
elog "using the CA certificate generated during the first run."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${advertise_readme} -gt 0 ]]; then
|
||||
# We need to show the README file location
|
||||
|
||||
echo ""
|
||||
elog "Please read"
|
||||
elog ""
|
||||
elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
|
||||
elog ""
|
||||
elog "for more details."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
if ! use ssl ; then
|
||||
einfo "There is nothing to configure for rsyslog unless you"
|
||||
einfo "used USE=ssl to build it."
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Make sure the certificates directory exists
|
||||
local CERTDIR="${EROOT}/etc/ssl/${PN}"
|
||||
if [[ ! -d "${CERTDIR}" ]]; then
|
||||
mkdir "${CERTDIR}" || die
|
||||
fi
|
||||
einfo "Your certificates will be stored in ${CERTDIR}"
|
||||
|
||||
# Create a default CA if needed
|
||||
if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
|
||||
einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = Portage automated CA
|
||||
ca
|
||||
cert_signing_key
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-self-signed \
|
||||
--load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--outfile "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
# Create the server certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for server ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_server
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
else
|
||||
einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
|
||||
fi
|
||||
|
||||
# Create a client certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for client ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_client
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
rm -f "${T}/${PF}.$$"
|
||||
|
||||
echo
|
||||
einfo "Here is the documentation on how to encrypt your log traffic:"
|
||||
einfo " https://www.rsyslog.com/doc/rsyslog_tls.html"
|
||||
}
|
Binary file not shown.
@ -0,0 +1,70 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit flag-o-matic multilib toolchain-funcs
|
||||
|
||||
MY_PN="${PN}src"
|
||||
|
||||
DESCRIPTION="Uncompress rar files"
|
||||
HOMEPAGE="https://www.rarlab.com/rar_add.htm"
|
||||
SRC_URI="https://www.rarlab.com/rar/${MY_PN}-${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="unRAR"
|
||||
# subslot = soname version
|
||||
SLOT="0/5"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="!<=app-arch/unrar-gpl-0.0.1_p20080417"
|
||||
|
||||
S=${WORKDIR}/unrar
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-5.5.5-build.patch
|
||||
"${FILESDIR}"/${PN}-5.5.5-honor-flags.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
local sed_args=( -e "/libunrar/s:.so:$(get_libname ${PV%.*.*}):" )
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
sed_args+=( -e "s:-shared:-dynamiclib -install_name ${EPREFIX}/usr/$(get_libdir)/libunrar$(get_libname ${PV%.*.*}):" )
|
||||
else
|
||||
sed_args+=( -e "s:-shared:& -Wl,-soname -Wl,libunrar$(get_libname ${PV%.*.*}):" )
|
||||
fi
|
||||
sed -i "${sed_args[@]}" makefile || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
mkdir -p build-{lib,bin}
|
||||
printf 'VPATH = ..\ninclude ../makefile' > build-lib/Makefile || die
|
||||
cp build-{lib,bin}/Makefile || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
unrar_make() {
|
||||
emake CXX="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS}" STRIP=true "$@"
|
||||
}
|
||||
|
||||
unrar_make CXXFLAGS+=" -fPIC" -C build-lib lib
|
||||
ln -s libunrar$(get_libname ${PV%.*.*}) build-lib/libunrar$(get_libname) || die
|
||||
ln -s libunrar$(get_libname ${PV%.*.*}) build-lib/libunrar$(get_libname ${PV}) || die
|
||||
|
||||
unrar_make -C build-bin
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin build-bin/unrar
|
||||
dodoc readme.txt
|
||||
|
||||
dolib.so build-lib/libunrar*
|
||||
|
||||
insinto /usr/include/libunrar${PV%.*.*}
|
||||
doins *.hpp
|
||||
dosym libunrar${PV%.*.*} /usr/include/libunrar
|
||||
|
||||
find "${ED}" -name "*.a" -delete || die
|
||||
}
|
Binary file not shown.
@ -1,2 +1,3 @@
|
||||
DIST gedit-3.28.1.tar.xz 3149684 BLAKE2B 6afedcc5de0bd249af3d0fd02339acc2d993aae083dcbfda9212745ab810b81cdb9da655273cb7ccc556644c29d69429d3587fcc9e1faf7aa1c2cee57af09a4b SHA512 f5931ac562cb5005a83eec43048b718ef431e6006b72470fea54ad0e94bd64940ebdec160ee0459ceb5adb235ab111711a2f9fbdc74104d2edd8f287d7474815
|
||||
DIST gedit-3.30.2.tar.xz 3155628 BLAKE2B 96736adbce987af89b37a712448f42b2a2eeed72d52aa16377d961c9e929fa4e75205eac5987bfc067cc2fecb35aec720d85483c4e2e824a6e8248cc652d2fbe SHA512 58ae7a4c27aeabad670718e39e1860df112d0be00ea622cc8adc185cb5d0e16ac4af65cb3aa45423c7b1b94c88d04d081fe05f3647b054a3e3291abc73c41f6f
|
||||
DIST gedit-3.32.0.tar.xz 14793216 BLAKE2B b1d9af7882063a622fe27f8e5aa322e2a1724410c4419d538712fdda2cab10aa59014a82cc1a41b35966dceb1b75ce2613d9c5c98400743b31df76b0114e84e8 SHA512 f25ed05f5d3b7ab7711be32c6516479c8b515d6d5983e3bc3a00407740fb8ec42b1e9a3005473671fc144f4437b9e98355a3669210eefb5bf8288f171188f387
|
||||
|
@ -0,0 +1,91 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
GNOME2_LA_PUNT="yes" # plugins are dlopened
|
||||
PYTHON_COMPAT=( python3_{4,5,6} )
|
||||
VALA_MIN_API_VERSION="0.26"
|
||||
VALA_USE_DEPEND="vapigen"
|
||||
|
||||
inherit eutils gnome.org gnome2-utils meson multilib python-single-r1 vala virtualx xdg
|
||||
|
||||
DESCRIPTION="A text editor for the GNOME desktop"
|
||||
HOMEPAGE="https://wiki.gnome.org/Apps/Gedit"
|
||||
|
||||
LICENSE="GPL-2+ CC-BY-SA-3.0"
|
||||
SLOT="0"
|
||||
|
||||
IUSE="+introspection +python gtk-doc vala"
|
||||
REQUIRED_USE="python? ( introspection ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
# X libs are not needed for OSX (aqua)
|
||||
COMMON_DEPEND="
|
||||
>=dev-libs/libxml2-2.5.0:2
|
||||
>=dev-libs/glib-2.44:2[dbus]
|
||||
>=x11-libs/gtk+-3.22.0:3[introspection?]
|
||||
>=x11-libs/gtksourceview-4.0.2:4[introspection?]
|
||||
>=dev-libs/libpeas-1.14.1[gtk]
|
||||
>=net-libs/libsoup-2.60:2.4
|
||||
|
||||
gnome-base/gsettings-desktop-schemas
|
||||
gnome-base/gvfs
|
||||
|
||||
x11-libs/libX11
|
||||
|
||||
introspection? ( >=dev-libs/gobject-introspection-0.9.3:= )
|
||||
python? (
|
||||
${PYTHON_DEPS}
|
||||
dev-python/pycairo[${PYTHON_USEDEP}]
|
||||
>=dev-python/pygobject-3:3[cairo,${PYTHON_USEDEP}]
|
||||
dev-libs/libpeas[python,${PYTHON_USEDEP}] )
|
||||
>=app-text/gspell-0.2.5:0=
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
x11-themes/adwaita-icon-theme
|
||||
"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
${vala_depend}
|
||||
app-text/docbook-xml-dtd:4.1.2
|
||||
dev-util/glib-utils
|
||||
gtk-doc? ( >=dev-util/gtk-doc-1 )
|
||||
dev-util/itstool
|
||||
>=sys-devel/gettext-0.18
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
vala_src_prepare
|
||||
xdg_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local emesonargs=(
|
||||
$(meson_use gtk-doc documentation)
|
||||
$(meson_use introspection)
|
||||
$(meson_use python plugins)
|
||||
$(meson_use vala vapi)
|
||||
)
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
src_test() { :; }
|
||||
|
||||
src_install() {
|
||||
meson_src_install
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
gnome2_schemas_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_pkg_postrm
|
||||
gnome2_schemas_update
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,53 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit user golang-build golang-vcs-snapshot
|
||||
|
||||
EGO_PN="github.com/prometheus/alertmanager"
|
||||
EGIT_COMMIT="v${PV/_rc/-rc.}"
|
||||
ALERTMANAGER_COMMIT="308b762"
|
||||
ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
DESCRIPTION="Alertmanager for alerts sent by client applications such as Prometheus"
|
||||
HOMEPAGE="https://github.com/prometheus/alertmanager"
|
||||
SRC_URI="${ARCHIVE_URI}"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=">=dev-lang/go-1.11
|
||||
dev-util/promu"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${PN}
|
||||
enewuser ${PN} -1 -1 -1 ${PN}
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -i -e "s/{{.Revision}}/${ALERTMANAGER_COMMIT}/" src/${EGO_PN}/.promu.yml || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd src/${EGO_PN} || die
|
||||
mkdir -p bin || die
|
||||
GO111MODULE=on GOPATH="${S}" GOCACHE="${T}/go-cache" promu build -v --prefix bin || die
|
||||
popd || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
pushd src/${EGO_PN} || die
|
||||
dobin bin/*
|
||||
dodoc {README,CHANGELOG,CONTRIBUTING}.md
|
||||
insinto /etc/alertmanager/
|
||||
newins doc/examples/simple.yml config.yml.example
|
||||
popd || die
|
||||
keepdir /var/lib/alertmanager /var/log/alertmanager
|
||||
fowners ${PN}:${PN} /var/lib/alertmanager /var/log/alertmanager
|
||||
newinitd "${FILESDIR}"/${PN}.initd ${PN}
|
||||
newconfd "${FILESDIR}"/${PN}.confd ${PN}
|
||||
}
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
DIST xchm-1.23.tar.gz 474274 BLAKE2B de73c04e68b876edefb1d45d9e982bcce6fd3afa06f8704d05fa5cae710d9724ed20ca50be9022570832da9954ba2af141a66e5b3ab02554441c84bac1d6ffed SHA512 c0df4362ff6db8136b20f62a76e7e93185375f6ef9eeeb1001e27ead9806d486332573ba8c3ca1863a70ce6b1d3bcc6d3af48d42add719312774dccfd7d18c90
|
||||
DIST xchm-1.26.tar.gz 785338 BLAKE2B b5aedff3de1a3c79205f27b833e339fa24ac08710ab2c97199fdd10f5674ee7d4a4689e275d9f6df4b6eb34c60cf2d36c5938924c4c0d73e37c2a464a1c63695 SHA512 8ed0281a2b2969f83d474b89e828545096b4ad9ece451cff2bdb602079751f6f6ca2c8f3c8cd79740ab0b4e5b2c3a3f8ce4e6f4985dc158b5d76007b7bc549a3
|
||||
DIST xchm-1.27.tar.gz 957753 BLAKE2B 84df84712d092a29692d287570f35893fb38a47f571f112093b6b7529ee5bceb22c439e7842377b2181f823bd069911c4889dc6ff794654d18cee589cf78e897 SHA512 82b003569307fc76f35acea51fe3d615601f185e084a9789b9757db60547d45af84428b63efbe645f9e20161815a1801d6a96a38c004cb1280e4ede35b02c014
|
||||
DIST xchm-1.28.tar.gz 984545 BLAKE2B b91e6983823a3f08b2df296c7d651e1a3a017824034d86dc5cb51dd327fa240e098afe5c5a186d27d57f54e02e2c6546cfe8e82acfd21d89b2cbbedd2ed9a829 SHA512 5d773b097ec813d991ceba4842c5cf967d4f2d0e20c84aff636615a92d000bac36d5ebf244a18f416928bd9b24792a5baf19397694201372478cd13111080630
|
||||
|
@ -0,0 +1,59 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
WX_GTK_VER="3.0-gtk3"
|
||||
inherit autotools git-r3 wxwidgets xdg-utils
|
||||
|
||||
DESCRIPTION="Utility for viewing Compiled HTML Help (CHM) files"
|
||||
HOMEPAGE="https://github.com/rzvncj/xCHM/"
|
||||
EGIT_REPO_URI="${HOMEPAGE}"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
IUSE="nls"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-libs/chmlib-0.36
|
||||
x11-libs/wxGTK:${WX_GTK_VER}[X]
|
||||
nls? ( virtual/libintl )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
setup-wxwidgets
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf $(use_enable nls)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
dodoc AUTHORS README ChangeLog
|
||||
|
||||
cp "${D}"/usr/share/pixmaps/xchm-32.xpm "${D}"/usr/share/pixmaps/xchm.xpm
|
||||
rm -f "${D}"/usr/share/pixmaps/xchm-*.xpm
|
||||
rm -f "${D}"/usr/share/pixmaps/xchmdoc*.xpm
|
||||
|
||||
domenu "${FILESDIR}"/xchm.desktop
|
||||
insinto /usr/share/mime/packages
|
||||
doins "${FILESDIR}"/xchm.xml
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,5 +1,9 @@
|
||||
DIST php-5.6.40.tar.xz 12472236 BLAKE2B f41147eaec9b15e965540f9e871691cc88848dd619bae6af85e7bba0130b71ce91bad5cdbbadbb537c42df83369f5c731007339a9d9e21e689e913c135201afc SHA512 997b5a952a60cf9166671cc91fcc34c674dd62bfd5cb0a9cdf3fdf2d088b5d19943d94c1cf193f8ab71fc4957d9a9a4c7c2fb8826f937501c1c0a0858f10e329
|
||||
DIST php-7.1.27.tar.xz 12219868 BLAKE2B 9de4902504e50b53aab28eac2252aa79302541352b1323a17e68cc58e22cd3b6108b3f7d6ba4779a7f87a561442cf3c44c5660418a354d3b48b6df270a761f8b SHA512 a7019788b02f624e19f804cb0c34578443fc2e0a582a32e72d1340f3cd7bb866631497fe61d18f31f92bad5aa7667847e21bd3916fcdd6f04a3b8f88c805f544
|
||||
DIST php-7.1.28.tar.xz 12222508 BLAKE2B 1e52632f801a717ea7020665da11536ba7ab21ea0e5d5ccf147003cb9a87878053ebabf5f4cdd0810207de1e2ebdd683d7afefd72aa5be521c5690130a72b349 SHA512 fcf983adb7669b83ff3aee33f9d18328f8f36b304bc51bfd1f13a7493365e98204c63214fe4add157dffa44d5407b257dee7247168a14efa36dcfa70d4909a6e
|
||||
DIST php-7.2.16.tar.xz 12166372 BLAKE2B c59ac69b717a8ee88f229baa94c43f9ee1d9c7161c767a95c3a9719ee70cdc9b61aaff75504aca09bba10d224d9a717cb7c985060b6912491857a003e6cbc349 SHA512 cd2ea3c68d7ed20317800f4b838b0dd9ae2fde508c79662b296dacdacf6c7e35b6ef30a6564516d7b22e82749a6e9e2ffcfd95b05cd79a9f227fbfaf9e25bc31
|
||||
DIST php-7.2.17.tar.xz 12144120 BLAKE2B 5e49af74b9e049962c21b30e77b89db36e376b1fe580118b5bc598fcc42421b8a4ed3b1be3de9ab2a9fc483b3e54acaaf268518b045e808f4a8e4d9c64a2204d SHA512 52451a13bdb480e599a8d0baf3b76303cfec0bc2057166607ae1b0cf423a16361c059bd4df85f7c435715c86d7252399cb1744e435f0adb50bada0e40804c302
|
||||
DIST php-7.3.3.tar.xz 11972184 BLAKE2B e6404d8af6d0196f27a8939e995e317307287e2110b3cdc436659eb074087ac545a4253d86c4ee7374dffbe4348004bd257ec0e2b7169e8c125e664c56f9dfe7 SHA512 bad5fa35f5962fa23dbe01fe85f76ce80e431cf2f9719284c082bb1fa32af26407407a97d3bf999165a6158f83a9669e3dd641f6d70028ec644b74a414fb803d
|
||||
DIST php-7.3.4.tar.xz 11977004 BLAKE2B 7a3a805a55272a7d641b6cf26965ff6fccca607f035c0e40be8d83cf4aa79ee246ec906e0f1352b7c654744a618d1c1a1e60dfea56b6b0be06ef9811efe22126 SHA512 fc45cd6cb273ca7a959a3ab0d2d15febedc60e9e289803f5f4340149b5fe8f52ca23119b128513194d769c842cd0941f8086c338db115d585c2f4e791e83b141
|
||||
DIST php-patches-20190307-r1.tar.xz 20796 BLAKE2B 251f0d8b222e4a6a339a3b1d4aff39fab8bd7203ec34295b7316a366a7d0015bb9e6665614005949da9decbca53aa9ac0aab63845638a6b4d3d462eabff4ea35 SHA512 d7a412ec1bc6002c458c6bc3cb53faf4e95a852a6cdad337f6a81a978dd56ba72801cccbe866857d6c5b7e95dfe558878133e44a4e9f9b6efd38e679acc82af9
|
||||
DIST php-patches-7.1.28bp.tar.bz2 27464 BLAKE2B 4babea64a2a24f31299997d6a962b3b7506ec1bb77b8e8b4532cce50c1a9eda73829820c2c7883ea97c1a860bab4220e2c576bdd14d8dd80c8e6a3af808c4c52 SHA512 171a8e52c70283dee12316ff8449dc7c7d3bf37c803724b63c7aa9bb12468a795de286075af317ba69080a5e1c3ed59a2f5b3891b35fb1e5045ede277d48e56a
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -aurN a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
|
||||
--- a/ext/mbstring/php_mbregex.c 2018-03-28 17:28:58.000000000 -0400
|
||||
+++ b/ext/mbstring/php_mbregex.c 2018-04-04 12:53:23.268296387 -0400
|
||||
@@ -454,7 +454,7 @@
|
||||
OnigUChar err_str[ONIG_MAX_ERROR_MESSAGE_LEN];
|
||||
|
||||
found = zend_hash_find(&MBREX(ht_rc), (char *)pattern, patlen+1, (void **) &rc);
|
||||
- if (found == FAILURE || (*rc)->options != options || (*rc)->enc != enc || (*rc)->syntax != syntax) {
|
||||
+ if (found == FAILURE || onig_get_options(*rc) != options || onig_get_encoding(*rc) != enc || onig_get_syntax(*rc) != syntax) {
|
||||
if ((err_code = onig_new(&retval, (OnigUChar *)pattern, (OnigUChar *)(pattern + patlen), options, enc, syntax, &err_info)) != ONIG_NORMAL) {
|
||||
onig_error_code_to_str(err_str, err_code, &err_info);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "mbregex compile err: %s", err_str);
|
@ -1,154 +0,0 @@
|
||||
Based on the following upstream commits:
|
||||
|
||||
https://github.com/php/php-src/commit/9a8e7b571896f39f83cb000fdb7c466b6d328d52
|
||||
https://github.com/php/php-src/pull/3701
|
||||
https://github.com/php/php-src/commit/2bd299f7318492fd7e5cafffa562d76ba60e69d4
|
||||
|
||||
--- a/acinclude.m4
|
||||
+++ b/acinclude.m4
|
||||
@@ -2201,49 +2201,16 @@ dnl
|
||||
dnl Common setup macro for ICU
|
||||
dnl
|
||||
AC_DEFUN([PHP_SETUP_ICU],[
|
||||
- PHP_ARG_WITH(icu-dir,,
|
||||
- [ --with-icu-dir=DIR Specify where ICU libraries and headers can be found], DEFAULT, no)
|
||||
+ PKG_CHECK_MODULES([ICU], [icu-io >= 50.1])
|
||||
|
||||
- if test "$PHP_ICU_DIR" = "no"; then
|
||||
- PHP_ICU_DIR=DEFAULT
|
||||
- fi
|
||||
-
|
||||
- if test "$PHP_ICU_DIR" = "DEFAULT"; then
|
||||
- dnl Try to find icu-config
|
||||
- AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin])
|
||||
- else
|
||||
- ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config"
|
||||
- fi
|
||||
-
|
||||
- AC_MSG_CHECKING([for location of ICU headers and libraries])
|
||||
-
|
||||
- dnl Trust icu-config to know better what the install prefix is..
|
||||
- icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null`
|
||||
- if test "$?" != "0" || test -z "$icu_install_prefix"; then
|
||||
- AC_MSG_RESULT([not found])
|
||||
- AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.])
|
||||
- else
|
||||
- AC_MSG_RESULT([$icu_install_prefix])
|
||||
-
|
||||
- dnl Check ICU version
|
||||
- AC_MSG_CHECKING([for ICU 4.0 or greater])
|
||||
- icu_version_full=`$ICU_CONFIG --version`
|
||||
- ac_IFS=$IFS
|
||||
- IFS="."
|
||||
- set $icu_version_full
|
||||
- IFS=$ac_IFS
|
||||
- icu_version=`expr [$]1 \* 1000 + [$]2`
|
||||
- AC_MSG_RESULT([found $icu_version_full])
|
||||
+ PHP_EVAL_INCLINE($ICU_CFLAGS)
|
||||
+ PHP_EVAL_LIBLINE($ICU_LIBS, $1)
|
||||
|
||||
- if test "$icu_version" -lt "4000"; then
|
||||
- AC_MSG_ERROR([ICU version 4.0 or later is required])
|
||||
- fi
|
||||
+ ICU_CFLAGS="$ICU_CFLAGS -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
|
||||
+ ICU_CXXFLAGS="$ICU_CXXFLAGS -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit"
|
||||
|
||||
- ICU_VERSION=$icu_version
|
||||
- ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
|
||||
- ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
|
||||
- PHP_EVAL_INCLINE($ICU_INCS)
|
||||
- PHP_EVAL_LIBLINE($ICU_LIBS, $1)
|
||||
+ if test "$PKG_CONFIG icu-io --atleast-version=60"; then
|
||||
+ ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1"
|
||||
fi
|
||||
])
|
||||
|
||||
--- a/ext/intl/config.m4
|
||||
+++ b/ext/intl/config.m4
|
||||
@@ -9,18 +9,10 @@ if test "$PHP_INTL" != "no"; then
|
||||
PHP_SETUP_ICU(INTL_SHARED_LIBADD)
|
||||
PHP_SUBST(INTL_SHARED_LIBADD)
|
||||
PHP_REQUIRE_CXX()
|
||||
- if test "$icu_version" -ge "4002"; then
|
||||
- icu_spoof_src=" spoofchecker/spoofchecker_class.c \
|
||||
- spoofchecker/spoofchecker.c\
|
||||
- spoofchecker/spoofchecker_create.c\
|
||||
- spoofchecker/spoofchecker_main.c"
|
||||
- else
|
||||
- icu_spoof_src=""
|
||||
- fi
|
||||
+ INTL_COMMON_FLAGS="$ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
|
||||
PHP_NEW_EXTENSION(intl, php_intl.c \
|
||||
intl_error.c \
|
||||
intl_convert.c \
|
||||
- intl_convertcpp.cpp \
|
||||
collator/collator.c \
|
||||
collator/collator_class.c \
|
||||
collator/collator_sort.c \
|
||||
@@ -32,8 +24,6 @@ if test "$PHP_INTL" != "no"; then
|
||||
collator/collator_is_numeric.c \
|
||||
collator/collator_error.c \
|
||||
common/common_error.c \
|
||||
- common/common_enum.cpp \
|
||||
- common/common_date.cpp \
|
||||
converter/converter.c \
|
||||
formatter/formatter.c \
|
||||
formatter/formatter_main.c \
|
||||
@@ -53,17 +43,12 @@ if test "$PHP_INTL" != "no"; then
|
||||
dateformat/dateformat_attr.c \
|
||||
dateformat/dateformat_data.c \
|
||||
dateformat/dateformat_format.c \
|
||||
- dateformat/dateformat_format_object.cpp \
|
||||
dateformat/dateformat_parse.c \
|
||||
- dateformat/dateformat_create.cpp \
|
||||
- dateformat/dateformat_attrcpp.cpp \
|
||||
- dateformat/dateformat_helpers.cpp \
|
||||
msgformat/msgformat.c \
|
||||
msgformat/msgformat_attr.c \
|
||||
msgformat/msgformat_class.c \
|
||||
msgformat/msgformat_data.c \
|
||||
msgformat/msgformat_format.c \
|
||||
- msgformat/msgformat_helpers.cpp \
|
||||
msgformat/msgformat_parse.c \
|
||||
grapheme/grapheme_string.c \
|
||||
grapheme/grapheme_util.c \
|
||||
@@ -73,6 +58,20 @@ if test "$PHP_INTL" != "no"; then
|
||||
transliterator/transliterator.c \
|
||||
transliterator/transliterator_class.c \
|
||||
transliterator/transliterator_methods.c \
|
||||
+ idn/idn.c \
|
||||
+ spoofchecker/spoofchecker_class.c \
|
||||
+ spoofchecker/spoofchecker.c\
|
||||
+ spoofchecker/spoofchecker_create.c\
|
||||
+ spoofchecker/spoofchecker_main.c, $ext_shared,,$INTL_COMMON_FLAGS,cxx)
|
||||
+
|
||||
+ PHP_INTL_CPP_SOURCES="intl_convertcpp.cpp \
|
||||
+ common/common_enum.cpp \
|
||||
+ common/common_date.cpp \
|
||||
+ dateformat/dateformat_format_object.cpp \
|
||||
+ dateformat/dateformat_create.cpp \
|
||||
+ dateformat/dateformat_attrcpp.cpp \
|
||||
+ dateformat/dateformat_helpers.cpp \
|
||||
+ msgformat/msgformat_helpers.cpp \
|
||||
timezone/timezone_class.cpp \
|
||||
timezone/timezone_methods.cpp \
|
||||
calendar/calendar_class.cpp \
|
||||
@@ -83,9 +82,15 @@ if test "$PHP_INTL" != "no"; then
|
||||
breakiterator/breakiterator_methods.cpp \
|
||||
breakiterator/rulebasedbreakiterator_methods.cpp \
|
||||
breakiterator/codepointiterator_internal.cpp \
|
||||
- breakiterator/codepointiterator_methods.cpp \
|
||||
- idn/idn.c \
|
||||
- $icu_spoof_src, $ext_shared,,$ICU_INCS -Wno-write-strings)
|
||||
+ breakiterator/codepointiterator_methods.cpp"
|
||||
+
|
||||
+ PHP_INTL_CPP_FLAGS="$ICU_CXXFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
|
||||
+ if test "$ext_shared" = "no"; then
|
||||
+ PHP_ADD_SOURCES(PHP_EXT_DIR(intl), $PHP_INTL_CPP_SOURCES, $PHP_INTL_CPP_FLAGS)
|
||||
+ else
|
||||
+ PHP_ADD_SOURCES_X(PHP_EXT_DIR(intl), $PHP_INTL_CPP_SOURCES, $PHP_INTL_CPP_FLAGS, shared_objects_intl, yes)
|
||||
+ fi
|
||||
+
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/collator)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/converter)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/common)
|
@ -1,88 +0,0 @@
|
||||
Based on the following upstream commits:
|
||||
|
||||
https://github.com/php/php-src/commit/45a05f38410d4a67c8c83c09906e2cfb42fc6e4c
|
||||
https://github.com/php/php-src/commit/534684d1042978f3c21caf9b665a7aca27f3f325
|
||||
|
||||
--- a/ext/intl/msgformat/msgformat_helpers.cpp
|
||||
+++ b/ext/intl/msgformat/msgformat_helpers.cpp
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <unicode/timezone.h>
|
||||
#include <unicode/datefmt.h>
|
||||
#include <unicode/calendar.h>
|
||||
+#include <unicode/strenum.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -45,6 +46,7 @@ extern "C" {
|
||||
|
||||
#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
|
||||
#define HAS_MESSAGE_PATTERN 1
|
||||
+#define HAS_MISALLOCATE_MEMORY_BUG 1
|
||||
#endif
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
@@ -345,6 +347,26 @@ static void umsg_set_timezone(MessageFormatter_object *mfo,
|
||||
return; /* already done */
|
||||
}
|
||||
|
||||
+#ifdef HAS_MISALLOCATE_MEMORY_BUG
|
||||
+ /* There is a bug in ICU which prevents MessageFormatter::getFormats()
|
||||
+ to handle more than 10 formats correctly. The enumerator could be
|
||||
+ used to walk through the present formatters using getFormat(), which
|
||||
+ however seems to provide just a readonly access. This workaround
|
||||
+ prevents crash when there are > 10 formats but doesn't set any error.
|
||||
+ As a result, only DateFormatters with > 10 subformats are affected.
|
||||
+ This workaround should be ifdef'd out, when the bug has been fixed
|
||||
+ in ICU. */
|
||||
+ icu::StringEnumeration* fnames = mf->getFormatNames(err.code);
|
||||
+ if (!fnames || U_FAILURE(err.code)) {
|
||||
+ return;
|
||||
+ }
|
||||
+ count = fnames->count(err.code);
|
||||
+ delete fnames;
|
||||
+ if (count > 10) {
|
||||
+ return;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
formats = mf->getFormats(count);
|
||||
|
||||
if (formats == NULL) {
|
||||
--- /dev/null
|
||||
+++ b/ext/intl/tests/bug74484_MessageFormatter.phpt
|
||||
@@ -0,0 +1,35 @@
|
||||
+--TEST--
|
||||
+Bug #74484 MessageFormatter::formatMessage memory corruption with 11+ named placeholder
|
||||
+--SKIPIF--
|
||||
+<?php
|
||||
+if (!extension_loaded('intl'))
|
||||
+ die('skip intl extension not enabled');
|
||||
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
|
||||
+ die('skip for ICU 4.8+');
|
||||
+?>
|
||||
+--FILE--
|
||||
+<?php
|
||||
+$text = "{a} {b} {c} {d} {e} {f} {g} {h} {i} {j} {k} {l}";
|
||||
+
|
||||
+$vars = array(
|
||||
+ 'a' => 1,
|
||||
+ 'b' => 2,
|
||||
+ 'c' => 3,
|
||||
+ 'd' => 4,
|
||||
+ 'e' => 5,
|
||||
+ 'f' => 6,
|
||||
+ 'g' => 7,
|
||||
+ 'h' => 8,
|
||||
+ 'i' => 9,
|
||||
+ 'j' => 10,
|
||||
+ 'k' => 11,
|
||||
+ 'l' => 12
|
||||
+);
|
||||
+
|
||||
+var_dump(MessageFormatter::formatMessage('en_US', $text, $vars));
|
||||
+
|
||||
+?>
|
||||
+==DONE==
|
||||
+--EXPECT--
|
||||
+string(26) "1 2 3 4 5 6 7 8 9 10 11 12"
|
||||
+==DONE==
|
@ -1,365 +0,0 @@
|
||||
Based on the following upstream commits:
|
||||
|
||||
https://github.com/php/php-src/commit/8d35a423838eb462cd39ee535c5d003073cc5f22
|
||||
https://github.com/php/php-src/commit/d8200e48857aeaf09f7127751efc5632ef7660a7
|
||||
https://github.com/php/php-src/commit/9a8e7b571896f39f83cb000fdb7c466b6d328d52
|
||||
|
||||
--- a/ext/intl/breakiterator/breakiterator_class.cpp
|
||||
+++ b/ext/intl/breakiterator/breakiterator_class.cpp
|
||||
@@ -38,6 +38,7 @@ extern "C" {
|
||||
}
|
||||
|
||||
using PHP::CodePointBreakIterator;
|
||||
+using icu::RuleBasedBreakIterator;
|
||||
|
||||
/* {{{ Global variables */
|
||||
zend_class_entry *BreakIterator_ce_ptr;
|
||||
--- a/ext/intl/breakiterator/breakiterator_class.h
|
||||
+++ b/ext/intl/breakiterator/breakiterator_class.h
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
#ifndef USE_BREAKITERATOR_POINTER
|
||||
typedef void BreakIterator;
|
||||
+#else
|
||||
+using icu::BreakIterator;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
--- a/ext/intl/breakiterator/breakiterator_methods.cpp
|
||||
+++ b/ext/intl/breakiterator/breakiterator_methods.cpp
|
||||
@@ -32,6 +32,8 @@ extern "C" {
|
||||
}
|
||||
|
||||
using PHP::CodePointBreakIterator;
|
||||
+using icu::BreakIterator;
|
||||
+using icu::Locale;
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, __construct)
|
||||
{
|
||||
--- a/ext/intl/breakiterator/codepointiterator_internal.cpp
|
||||
+++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
|
||||
@@ -31,6 +31,8 @@ typedef union {
|
||||
|
||||
using namespace PHP;
|
||||
|
||||
+using icu::UCharCharacterIterator;
|
||||
+
|
||||
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CodePointBreakIterator);
|
||||
|
||||
CodePointBreakIterator::CodePointBreakIterator()
|
||||
--- a/ext/intl/breakiterator/codepointiterator_internal.h
|
||||
+++ b/ext/intl/breakiterator/codepointiterator_internal.h
|
||||
@@ -18,8 +18,11 @@
|
||||
#define CODEPOINTITERATOR_INTERNAL_H
|
||||
|
||||
#include <unicode/brkiter.h>
|
||||
+#include <unicode/unistr.h>
|
||||
|
||||
-using U_ICU_NAMESPACE::BreakIterator;
|
||||
+using icu::BreakIterator;
|
||||
+using icu::CharacterIterator;
|
||||
+using icu::UnicodeString;
|
||||
|
||||
namespace PHP {
|
||||
|
||||
--- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
|
||||
+++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
|
||||
@@ -25,6 +25,9 @@ extern "C" {
|
||||
|
||||
#include "../intl_convertcpp.h"
|
||||
|
||||
+using icu::RuleBasedBreakIterator;
|
||||
+using icu::Locale;
|
||||
+
|
||||
static inline RuleBasedBreakIterator *fetch_rbbi(BreakIterator_object *bio) {
|
||||
return (RuleBasedBreakIterator*)bio->biter;
|
||||
}
|
||||
--- a/ext/intl/calendar/calendar_class.cpp
|
||||
+++ b/ext/intl/calendar/calendar_class.cpp
|
||||
@@ -34,6 +34,9 @@ extern "C" {
|
||||
#include <assert.h>
|
||||
}
|
||||
|
||||
+using icu::GregorianCalendar;
|
||||
+using icu::Locale;
|
||||
+
|
||||
/* {{{ Global variables */
|
||||
zend_class_entry *Calendar_ce_ptr;
|
||||
zend_class_entry *GregorianCalendar_ce_ptr;
|
||||
--- a/ext/intl/calendar/calendar_class.h
|
||||
+++ b/ext/intl/calendar/calendar_class.h
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
#ifndef USE_CALENDAR_POINTER
|
||||
typedef void Calendar;
|
||||
+#else
|
||||
+using icu::Calendar;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
--- a/ext/intl/calendar/calendar_methods.cpp
|
||||
+++ b/ext/intl/calendar/calendar_methods.cpp
|
||||
@@ -40,6 +40,8 @@ extern "C" {
|
||||
}
|
||||
#include "../common/common_enum.h"
|
||||
|
||||
+using icu::Locale;
|
||||
+
|
||||
U_CFUNC PHP_METHOD(IntlCalendar, __construct)
|
||||
{
|
||||
zend_throw_exception( NULL,
|
||||
--- a/ext/intl/calendar/gregoriancalendar_methods.cpp
|
||||
+++ b/ext/intl/calendar/gregoriancalendar_methods.cpp
|
||||
@@ -23,6 +23,8 @@
|
||||
#include <unicode/locid.h>
|
||||
#include <unicode/calendar.h>
|
||||
#include <unicode/gregocal.h>
|
||||
+#include <unicode/ustring.h>
|
||||
+
|
||||
extern "C" {
|
||||
#include "../php_intl.h"
|
||||
#define USE_TIMEZONE_POINTER 1
|
||||
@@ -32,6 +34,11 @@ extern "C" {
|
||||
#include <ext/date/php_date.h>
|
||||
}
|
||||
|
||||
+using icu::GregorianCalendar;
|
||||
+using icu::Locale;
|
||||
+using icu::UnicodeString;
|
||||
+using icu::StringPiece;
|
||||
+
|
||||
static inline GregorianCalendar *fetch_greg(Calendar_object *co) {
|
||||
return (GregorianCalendar*)co->ucal;
|
||||
}
|
||||
--- a/ext/intl/common/common_date.cpp
|
||||
+++ b/ext/intl/common/common_date.cpp
|
||||
@@ -25,6 +25,9 @@ extern "C" {
|
||||
#include <ext/date/php_date.h>
|
||||
}
|
||||
|
||||
+using icu::TimeZone;
|
||||
+using icu::UnicodeString;
|
||||
+
|
||||
#ifndef INFINITY
|
||||
#define INFINITY (DBL_MAX+DBL_MAX)
|
||||
#endif
|
||||
--- a/ext/intl/common/common_date.h
|
||||
+++ b/ext/intl/common/common_date.h
|
||||
@@ -28,6 +28,8 @@ U_CDECL_END
|
||||
|
||||
#include <unicode/timezone.h>
|
||||
|
||||
+using icu::TimeZone;
|
||||
+
|
||||
U_CFUNC TimeZone *timezone_convert_datetimezone(int type, void *object, int is_datetime, intl_error *outside_error, const char *func TSRMLS_DC);
|
||||
U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
|
||||
intl_error *err, const char *func TSRMLS_DC);
|
||||
--- a/ext/intl/common/common_enum.h
|
||||
+++ b/ext/intl/common/common_enum.h
|
||||
@@ -69,6 +69,7 @@ U_CFUNC void zoi_with_current_get_current_data(zend_object_iterator *iter, zval
|
||||
U_CFUNC void zoi_with_current_invalidate_current(zend_object_iterator *iter TSRMLS_DC);
|
||||
|
||||
#ifdef __cplusplus
|
||||
+using icu::StringEnumeration;
|
||||
U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object TSRMLS_DC);
|
||||
#endif
|
||||
|
||||
--- a/ext/intl/converter/converter.c
|
||||
+++ b/ext/intl/converter/converter.c
|
||||
@@ -18,6 +18,8 @@
|
||||
#include "zend_exceptions.h"
|
||||
|
||||
#include <unicode/utypes.h>
|
||||
+#include <unicode/utf8.h>
|
||||
+#include <unicode/utf16.h>
|
||||
#include <unicode/ucnv.h>
|
||||
#include <unicode/ustring.h>
|
||||
|
||||
--- a/ext/intl/dateformat/dateformat_format_object.cpp
|
||||
+++ b/ext/intl/dateformat/dateformat_format_object.cpp
|
||||
@@ -33,6 +33,12 @@ extern "C" {
|
||||
#include "../common/common_date.h"
|
||||
}
|
||||
|
||||
+using icu::Locale;
|
||||
+using icu::DateFormat;
|
||||
+using icu::GregorianCalendar;
|
||||
+using icu::StringPiece;
|
||||
+using icu::SimpleDateFormat;
|
||||
+
|
||||
static const DateFormat::EStyle valid_styles[] = {
|
||||
DateFormat::kNone,
|
||||
DateFormat::kFull,
|
||||
--- a/ext/intl/dateformat/dateformat_helpers.cpp
|
||||
+++ b/ext/intl/dateformat/dateformat_helpers.cpp
|
||||
@@ -28,6 +28,8 @@ extern "C" {
|
||||
#include "../calendar/calendar_class.h"
|
||||
}
|
||||
|
||||
+using icu::GregorianCalendar;
|
||||
+
|
||||
int datefmt_process_calendar_arg(zval* calendar_zv,
|
||||
Locale const& locale,
|
||||
const char *func_name,
|
||||
--- a/ext/intl/dateformat/dateformat_helpers.h
|
||||
+++ b/ext/intl/dateformat/dateformat_helpers.h
|
||||
@@ -22,11 +22,16 @@
|
||||
#endif
|
||||
|
||||
#include <unicode/calendar.h>
|
||||
+#include <unicode/datefmt.h>
|
||||
|
||||
extern "C" {
|
||||
#include "../php_intl.h"
|
||||
}
|
||||
|
||||
+using icu::Locale;
|
||||
+using icu::Calendar;
|
||||
+using icu::DateFormat;
|
||||
+
|
||||
int datefmt_process_calendar_arg(zval* calendar_zv,
|
||||
Locale const& locale,
|
||||
const char *func_name,
|
||||
--- a/ext/intl/grapheme/grapheme_string.c
|
||||
+++ b/ext/intl/grapheme/grapheme_string.c
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "grapheme_util.h"
|
||||
|
||||
#include <unicode/utypes.h>
|
||||
+#include <unicode/utf8.h>
|
||||
#include <unicode/ucol.h>
|
||||
#include <unicode/ustring.h>
|
||||
#include <unicode/ubrk.h>
|
||||
@@ -860,10 +861,10 @@ PHP_FUNCTION(grapheme_extract)
|
||||
pstr = str + start;
|
||||
|
||||
/* just in case pstr points in the middle of a character, move forward to the start of the next char */
|
||||
- if ( !UTF8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
|
||||
+ if ( !U8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
|
||||
unsigned char *str_end = str + str_len;
|
||||
|
||||
- while ( !UTF8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
|
||||
+ while ( !U8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
|
||||
pstr++;
|
||||
if ( pstr >= str_end ) {
|
||||
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
|
||||
--- a/ext/intl/intl_convertcpp.h
|
||||
+++ b/ext/intl/intl_convertcpp.h
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
#include <unicode/unistr.h>
|
||||
|
||||
+using icu::UnicodeString;
|
||||
+
|
||||
int intl_stringFromChar(UnicodeString &ret, char *str, int32_t str_len, UErrorCode *status);
|
||||
|
||||
int intl_charFromString(const UnicodeString &from, char **res, int *res_len, UErrorCode *status);
|
||||
--- a/ext/intl/msgformat/msgformat_helpers.cpp
|
||||
+++ b/ext/intl/msgformat/msgformat_helpers.cpp
|
||||
@@ -76,6 +76,16 @@ MessageFormatAdapter::getMessagePattern(MessageFormat* m) {
|
||||
#endif
|
||||
U_NAMESPACE_END
|
||||
|
||||
+using icu::Formattable;
|
||||
+using icu::Format;
|
||||
+using icu::DateFormat;
|
||||
+using icu::MessageFormat;
|
||||
+#ifdef HAS_MESSAGE_PATTERN
|
||||
+using icu::MessagePattern;
|
||||
+#endif
|
||||
+using icu::MessageFormatAdapter;
|
||||
+using icu::FieldPosition;
|
||||
+
|
||||
U_CFUNC int32_t umsg_format_arg_count(UMessageFormat *fmt)
|
||||
{
|
||||
int32_t fmt_count = 0;
|
||||
@@ -227,15 +237,16 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
|
||||
UnicodeString typeString = mp.getSubstring(type_part);
|
||||
/* This is all based on the rules in the docs for MessageFormat
|
||||
* @see http://icu-project.org/apiref/icu4c/classMessageFormat.html */
|
||||
- if (typeString == "number") {
|
||||
+#define ASCII_LITERAL(s) UNICODE_STRING(s, sizeof(s)-1)
|
||||
+ if (typeString == ASCII_LITERAL("number")) {
|
||||
MessagePattern::Part style_part = mp.getPart(i + 1); /* Not advancing i */
|
||||
if (style_part.getType() == UMSGPAT_PART_TYPE_ARG_STYLE) {
|
||||
UnicodeString styleString = mp.getSubstring(style_part);
|
||||
- if (styleString == "integer") {
|
||||
+ if (styleString == ASCII_LITERAL("integer")) {
|
||||
type = Formattable::kInt64;
|
||||
- } else if (styleString == "currency") {
|
||||
+ } else if (styleString == ASCII_LITERAL("currency")) {
|
||||
type = Formattable::kDouble;
|
||||
- } else if (styleString == "percent") {
|
||||
+ } else if (styleString == ASCII_LITERAL("percent")) {
|
||||
type = Formattable::kDouble;
|
||||
} else { /* some style invalid/unknown to us */
|
||||
type = Formattable::kDouble;
|
||||
@@ -243,12 +254,13 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
|
||||
} else { // if missing style, part, make it a double
|
||||
type = Formattable::kDouble;
|
||||
}
|
||||
- } else if ((typeString == "date") || (typeString == "time")) {
|
||||
+ } else if ((typeString == ASCII_LITERAL("date")) || (typeString == ASCII_LITERAL("time"))) {
|
||||
type = Formattable::kDate;
|
||||
- } else if ((typeString == "spellout") || (typeString == "ordinal")
|
||||
- || (typeString == "duration")) {
|
||||
+ } else if ((typeString == ASCII_LITERAL("spellout")) || (typeString == ASCII_LITERAL("ordinal"))
|
||||
+ || (typeString == ASCII_LITERAL("duration"))) {
|
||||
type = Formattable::kDouble;
|
||||
}
|
||||
+#undef ASCII_LITERAL
|
||||
} else {
|
||||
/* If there's no UMSGPAT_PART_TYPE_ARG_TYPE right after a
|
||||
* UMSGPAT_ARG_TYPE_SIMPLE argument, then the pattern
|
||||
--- a/ext/intl/normalizer/normalizer_normalize.c
|
||||
+++ b/ext/intl/normalizer/normalizer_normalize.c
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "normalizer_class.h"
|
||||
#include "normalizer_normalize.h"
|
||||
#include "intl_convert.h"
|
||||
+#include <unicode/utf8.h>
|
||||
|
||||
/* {{{ proto string Normalizer::normalize( string $input [, string $form = FORM_C] )
|
||||
* Normalize a string. }}} */
|
||||
--- a/ext/intl/timezone/timezone_class.cpp
|
||||
+++ b/ext/intl/timezone/timezone_class.cpp
|
||||
@@ -37,6 +37,8 @@ extern "C" {
|
||||
#include <ext/date/php_date.h>
|
||||
}
|
||||
|
||||
+using icu::Calendar;
|
||||
+
|
||||
/* {{{ Global variables */
|
||||
U_CDECL_BEGIN
|
||||
zend_class_entry *TimeZone_ce_ptr = NULL;
|
||||
--- a/ext/intl/timezone/timezone_class.h
|
||||
+++ b/ext/intl/timezone/timezone_class.h
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#ifndef USE_TIMEZONE_POINTER
|
||||
typedef void TimeZone;
|
||||
+#else
|
||||
+using icu::TimeZone;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
--- a/ext/intl/timezone/timezone_methods.cpp
|
||||
+++ b/ext/intl/timezone/timezone_methods.cpp
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <unicode/locid.h>
|
||||
#include <unicode/timezone.h>
|
||||
#include <unicode/ustring.h>
|
||||
+#include <unicode/calendar.h>
|
||||
#include "intl_convertcpp.h"
|
||||
|
||||
#include "../common/common_date.h"
|
||||
@@ -37,6 +38,9 @@ extern "C" {
|
||||
}
|
||||
#include "common/common_enum.h"
|
||||
|
||||
+using icu::Locale;
|
||||
+using icu::Calendar;
|
||||
+
|
||||
U_CFUNC PHP_METHOD(IntlTimeZone, __construct)
|
||||
{
|
||||
zend_throw_exception( NULL,
|
@ -1,42 +0,0 @@
|
||||
From d3466a04345b31dfc62d94fe994b40321a6418ec Mon Sep 17 00:00:00 2001
|
||||
From: Michael Orlitzky <michael@orlitzky.com>
|
||||
Date: Thu, 29 Sep 2016 15:43:06 -0400
|
||||
Subject: [PATCH 1/1] Zend/acinclude.m4: don't warn about >=bison-3.0.1
|
||||
versions.
|
||||
|
||||
The PHP configure script will emit a warning if it thinks your bison
|
||||
version is insufficient:
|
||||
|
||||
WARNING: This bison version is not supported for regeneration of
|
||||
the Zend/PHP parsers (found: 3.0, min: 204, excluded: 3.0).
|
||||
|
||||
However, there is an error in the test that causes it to treat all
|
||||
3.0.x versions as if they were 3.0. The result is that users get
|
||||
warned about a perfectly acceptable version of bison.
|
||||
|
||||
This patch is meant only for Gentoo, where we can require a working
|
||||
version of bison (something newer than 3.0.1). Having done so, this
|
||||
patch removes the check and the WARNING.
|
||||
|
||||
Gentoo-Bug: 593278
|
||||
PHP-Bug: 69055
|
||||
---
|
||||
Zend/acinclude.m4 | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Zend/acinclude.m4 b/Zend/acinclude.m4
|
||||
index 7fa8c99..9d6cb1d 100644
|
||||
--- a/Zend/acinclude.m4
|
||||
+++ b/Zend/acinclude.m4
|
||||
@@ -9,7 +9,7 @@ AC_DEFUN([LIBZEND_BISON_CHECK],[
|
||||
# non-working versions, e.g. "3.0 3.2";
|
||||
# remove "none" when introducing the first incompatible bison version an
|
||||
# separate any following additions by spaces
|
||||
- bison_version_exclude="3.0"
|
||||
+ bison_version_exclude=""
|
||||
|
||||
# for standalone build of Zend Engine
|
||||
test -z "$SED" && SED=sed
|
||||
--
|
||||
2.7.3
|
||||
|
@ -0,0 +1,788 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
inherit autotools flag-o-matic systemd
|
||||
|
||||
PATCH_V="7.1.28bp"
|
||||
|
||||
DESCRIPTION="The PHP language runtime engine"
|
||||
HOMEPAGE="https://secure.php.net/"
|
||||
SRC_URI="https://php.net/distributions/${P}.tar.xz
|
||||
https://gitweb.gentoo.org/proj/php-patches.git/snapshot/php-patches-${PATCH_V}.tar.bz2"
|
||||
|
||||
LICENSE="PHP-3.01
|
||||
BSD
|
||||
Zend-2.0
|
||||
bcmath? ( LGPL-2.1+ )
|
||||
fpm? ( BSD-2 )
|
||||
gd? ( gd )
|
||||
unicode? ( BSD-2 LGPL-2.1 )"
|
||||
|
||||
SLOT="$(ver_cut 1-2)"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk
|
||||
coverage crypt +ctype curl debug
|
||||
enchant exif +fileinfo +filter firebird
|
||||
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
||||
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl
|
||||
mhash mssql mysql libmysqlclient mysqli nls
|
||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
||||
readline recode selinux +session sharedmem
|
||||
+simplexml snmp soap sockets spell sqlite ssl
|
||||
sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
|
||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
|
||||
|
||||
# The supported (that is, autodetected) versions of BDB are listed in
|
||||
# the ./configure script. Other versions *work*, but we need to stick to
|
||||
# the ones that can be detected to avoid a repeat of bug #564824.
|
||||
COMMON_DEPEND="
|
||||
>=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
|
||||
>=dev-libs/libpcre-8.32[unicode]
|
||||
fpm? ( acl? ( sys-apps/acl ) )
|
||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
||||
<www-servers/apache-2.4[threads=] ) )
|
||||
berkdb? ( || ( sys-libs/db:5.3
|
||||
sys-libs/db:5.1
|
||||
sys-libs/db:4.8
|
||||
sys-libs/db:4.7
|
||||
sys-libs/db:4.6
|
||||
sys-libs/db:4.5 ) )
|
||||
bzip2? ( app-arch/bzip2:0= )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
cjk? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib:0=
|
||||
) )
|
||||
coverage? ( dev-util/lcov )
|
||||
crypt? ( >=dev-libs/libmcrypt-2.4 )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( app-text/enchant )
|
||||
exif? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib:0=
|
||||
) )
|
||||
firebird? ( dev-db/firebird )
|
||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
|
||||
gmp? ( dev-libs/gmp:0= )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[kerberos=,ssl=] )
|
||||
intl? ( dev-libs/icu:= )
|
||||
iodbc? ( dev-db/libiodbc )
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( >=net-nds/openldap-1.2.11 )
|
||||
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
|
||||
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
|
||||
mssql? ( dev-db/freetds[mssql] )
|
||||
libmysqlclient? (
|
||||
mysql? ( virtual/libmysqlclient:= )
|
||||
mysqli? ( virtual/libmysqlclient:= )
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
|
||||
odbc? ( >=dev-db/unixODBC-1.8.13 )
|
||||
postgres? ( dev-db/postgresql:* )
|
||||
qdbm? ( dev-db/qdbm )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
recode? ( app-text/recode )
|
||||
sharedmem? ( dev-libs/mm )
|
||||
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
||||
soap? ( >=dev-libs/libxml2-2.6.8 )
|
||||
spell? ( >=app-text/aspell-0.50 )
|
||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
sybase-ct? ( dev-db/freetds )
|
||||
tidy? ( app-text/htmltidy )
|
||||
truetype? (
|
||||
=media-libs/freetype-2*
|
||||
>=media-libs/t1lib-5.0.0
|
||||
!gd? (
|
||||
virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= )
|
||||
)
|
||||
unicode? ( dev-libs/oniguruma:= )
|
||||
vpx? ( media-libs/libvpx:0= )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
|
||||
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xpm? (
|
||||
x11-libs/libXpm
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0= sys-libs/zlib:0=
|
||||
)
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( sys-libs/zlib:0= )
|
||||
zlib? ( sys-libs/zlib:0= )
|
||||
"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
virtual/mta
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
app-arch/xz-utils
|
||||
>=sys-devel/bison-3.0.1
|
||||
sys-devel/flex
|
||||
>=sys-devel/m4-1.4.3
|
||||
>=sys-devel/libtool-1.5.18"
|
||||
|
||||
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
||||
REQUIRED_USE="
|
||||
|| ( cli cgi fpm apache2 embed )
|
||||
cli? ( ^^ ( readline libedit ) )
|
||||
truetype? ( gd zlib )
|
||||
vpx? ( gd zlib )
|
||||
cjk? ( gd zlib )
|
||||
exif? ( gd zlib )
|
||||
xpm? ( gd zlib )
|
||||
gd? ( zlib )
|
||||
simplexml? ( xml )
|
||||
soap? ( xml )
|
||||
wddx? ( xml )
|
||||
xmlrpc? ( || ( xml iconv ) )
|
||||
xmlreader? ( xml )
|
||||
xslt? ( xml )
|
||||
ldap-sasl? ( ldap )
|
||||
mhash? ( hash )
|
||||
phar? ( hash )
|
||||
recode? ( !imap !mysql !mysqli !libmysqlclient )
|
||||
libmysqlclient? ( || (
|
||||
mysql
|
||||
mysqli
|
||||
pdo
|
||||
) )
|
||||
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
sharedmem? ( !threads )
|
||||
"
|
||||
|
||||
PHP_MV="$(ver_cut 1)"
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
# Always install the production INI file, bug 611214.
|
||||
local phpinisrc="php.ini-production-${phpsapi}"
|
||||
cp php.ini-production "${phpinisrc}" || die
|
||||
|
||||
# default to /tmp for save_path, bug #282768
|
||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
|
||||
|
||||
# Set the extension dir
|
||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
|
||||
-i "${phpinisrc}" || die
|
||||
|
||||
# Set the include path to point to where we want to find PEAR packages
|
||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
|
||||
|
||||
dodir "${PHP_INI_DIR#${EPREFIX}}"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${phpinisrc}" php.ini
|
||||
|
||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
||||
elog
|
||||
|
||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
||||
|
||||
if use opcache; then
|
||||
elog "Adding opcache to $PHP_EXT_INI_DIR"
|
||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
|
||||
"${D}/${PHP_EXT_INI_DIR}"/opcache.ini
|
||||
dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
|
||||
"${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
|
||||
fi
|
||||
|
||||
# SAPI-specific handling
|
||||
if [[ "${sapi}" == "fpm" ]] ; then
|
||||
einfo "Installing FPM config file php-fpm.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
doins sapi/fpm/php-fpm.conf
|
||||
fi
|
||||
|
||||
dodoc php.ini-{development,production}
|
||||
}
|
||||
|
||||
php_set_ini_dir() {
|
||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
local patchdir="${WORKDIR}/php-patches-${PATCH_V}"
|
||||
|
||||
eapply "${patchdir}/"
|
||||
|
||||
# Copy test binaries from patches
|
||||
cp "${patchdir}/bug77540.jpg" \
|
||||
"${patchdir}/bug77753.tiff" "${patchdir}/bug77831.tiff" \
|
||||
"${patchdir}/bug77563.jpg" "ext/exif/tests/" || die
|
||||
|
||||
# Change PHP branding
|
||||
# Get the alpha/beta/rc version
|
||||
sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \
|
||||
-i configure.in || die "Unable to change PHP branding"
|
||||
|
||||
# Patch PHP to show Gentoo as the server platform
|
||||
sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
|
||||
-i configure.in || die "Failed to fix server platform name"
|
||||
|
||||
# Prevent PHP from activating the Apache config,
|
||||
# as we will do that ourselves
|
||||
sed -i \
|
||||
-e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
-e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 \
|
||||
|| die
|
||||
|
||||
# Patch PHP to support heimdal instead of mit-krb5
|
||||
if has_version "app-crypt/heimdal" ; then
|
||||
sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal libname"
|
||||
sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal crypt library reference"
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
|
||||
# Force rebuilding aclocal.m4
|
||||
rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare"
|
||||
|
||||
mv configure.in configure.ac || die
|
||||
|
||||
eautoreconf
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# http://bugs.php.net/bug.php?id=48795, bug #343481
|
||||
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
||||
|
||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
||||
|
||||
# The php-fpm config file wants localstatedir to be ${EPREFIX}/var
|
||||
# and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
|
||||
local our_conf=(
|
||||
--prefix="${PHP_DESTDIR}"
|
||||
--mandir="${PHP_DESTDIR}/man"
|
||||
--infodir="${PHP_DESTDIR}/info"
|
||||
--libdir="${PHP_DESTDIR}/lib"
|
||||
--with-libdir="$(get_libdir)"
|
||||
--localstatedir="${EPREFIX}/var"
|
||||
--without-pear
|
||||
$(use_enable threads maintainer-zts)
|
||||
)
|
||||
|
||||
our_conf+=(
|
||||
$(use_enable bcmath bcmath)
|
||||
$(use_with bzip2 bz2 "${EPREFIX}/usr")
|
||||
$(use_enable calendar calendar)
|
||||
$(use_enable coverage gcov)
|
||||
$(use_enable ctype ctype)
|
||||
$(use_with curl curl "${EPREFIX}/usr")
|
||||
$(use_enable xml dom)
|
||||
$(use_with enchant enchant "${EPREFIX}/usr")
|
||||
$(use_enable exif exif)
|
||||
$(use_enable fileinfo fileinfo)
|
||||
$(use_enable filter filter)
|
||||
$(use_enable ftp ftp)
|
||||
$(use_with nls gettext "${EPREFIX}/usr")
|
||||
$(use_with gmp gmp "${EPREFIX}/usr")
|
||||
$(use_enable hash hash)
|
||||
$(use_with mhash mhash "${EPREFIX}/usr")
|
||||
$(use_with iconv iconv \
|
||||
$(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
|
||||
$(use_enable intl intl)
|
||||
$(use_enable ipv6 ipv6)
|
||||
$(use_enable json json)
|
||||
$(use_with kerberos kerberos "${EPREFIX}/usr")
|
||||
$(use_enable xml libxml)
|
||||
$(use_with xml libxml-dir "${EPREFIX}/usr")
|
||||
$(use_enable unicode mbstring)
|
||||
$(use_with crypt mcrypt "${EPREFIX}/usr")
|
||||
$(use_with mssql mssql "${EPREFIX}/usr")
|
||||
$(use_with unicode onig "${EPREFIX}/usr")
|
||||
$(use_with ssl openssl "${EPREFIX}/usr")
|
||||
$(use_with ssl openssl-dir "${EPREFIX}/usr")
|
||||
$(use_enable pcntl pcntl)
|
||||
$(use_enable phar phar)
|
||||
$(use_enable pdo pdo)
|
||||
$(use_enable opcache opcache)
|
||||
$(use_with postgres pgsql "${EPREFIX}/usr")
|
||||
$(use_enable posix posix)
|
||||
$(use_with spell pspell "${EPREFIX}/usr")
|
||||
$(use_with recode recode "${EPREFIX}/usr")
|
||||
$(use_enable simplexml simplexml)
|
||||
$(use_enable sharedmem shmop)
|
||||
$(use_with snmp snmp "${EPREFIX}/usr")
|
||||
$(use_enable soap soap)
|
||||
$(use_enable sockets sockets)
|
||||
$(use_with sqlite sqlite3 "${EPREFIX}/usr")
|
||||
$(use_with sybase-ct sybase-ct "${EPREFIX}/usr")
|
||||
$(use_enable sysvipc sysvmsg)
|
||||
$(use_enable sysvipc sysvsem)
|
||||
$(use_enable sysvipc sysvshm)
|
||||
$(use_with tidy tidy "${EPREFIX}/usr")
|
||||
$(use_enable tokenizer tokenizer)
|
||||
$(use_enable wddx wddx)
|
||||
$(use_enable xml xml)
|
||||
$(use_enable xmlreader xmlreader)
|
||||
$(use_enable xmlwriter xmlwriter)
|
||||
$(use_with xmlrpc xmlrpc)
|
||||
$(use_with xslt xsl "${EPREFIX}/usr")
|
||||
$(use_enable zip zip)
|
||||
$(use_with zlib zlib "${EPREFIX}/usr")
|
||||
$(use_enable debug debug)
|
||||
)
|
||||
|
||||
# DBA support
|
||||
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
||||
|| use qdbm ; then
|
||||
our_conf+=( "--enable-dba${shared}" )
|
||||
fi
|
||||
|
||||
# DBA drivers support
|
||||
our_conf+=(
|
||||
$(use_with cdb cdb)
|
||||
$(use_with berkdb db4 "${EPREFIX}/usr")
|
||||
$(use_enable flatfile flatfile)
|
||||
$(use_with gdbm gdbm "${EPREFIX}/usr")
|
||||
$(use_enable inifile inifile)
|
||||
$(use_with qdbm qdbm "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Support for the GD graphics library
|
||||
our_conf+=(
|
||||
$(use_with truetype freetype-dir "${EPREFIX}/usr")
|
||||
$(use_with truetype t1lib "${EPREFIX}/usr")
|
||||
$(use_enable cjk gd-jis-conv)
|
||||
$(use_with gd jpeg-dir "${EPREFIX}/usr")
|
||||
$(use_with gd png-dir "${EPREFIX}/usr")
|
||||
$(use_with xpm xpm-dir "${EPREFIX}/usr")
|
||||
$(use_with vpx vpx-dir "${EPREFIX}/usr")
|
||||
)
|
||||
# enable gd last, so configure can pick up the previous settings
|
||||
our_conf+=( $(use_with gd gd) )
|
||||
|
||||
# IMAP support
|
||||
if use imap ; then
|
||||
our_conf+=(
|
||||
$(use_with imap imap "${EPREFIX}/usr")
|
||||
$(use_with ssl imap-ssl "${EPREFIX}/usr")
|
||||
)
|
||||
fi
|
||||
|
||||
# Interbase/firebird support
|
||||
our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
|
||||
|
||||
# LDAP support
|
||||
if use ldap ; then
|
||||
our_conf+=(
|
||||
$(use_with ldap ldap "${EPREFIX}/usr")
|
||||
$(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
|
||||
)
|
||||
fi
|
||||
|
||||
# MySQL support
|
||||
local mysqllib="mysqlnd"
|
||||
local mysqlilib="mysqlnd"
|
||||
use libmysqlclient && mysqllib="${EPREFIX}/usr"
|
||||
use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config"
|
||||
|
||||
our_conf+=( $(use_with mysql mysql "${mysqllib}") )
|
||||
our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
|
||||
|
||||
local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
||||
if use mysql || use mysqli ; then
|
||||
our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
|
||||
fi
|
||||
|
||||
# ODBC support
|
||||
our_conf+=(
|
||||
$(use_with odbc unixODBC "${EPREFIX}/usr")
|
||||
$(use_with iodbc iodbc "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Oracle support
|
||||
our_conf+=( $(use_with oci8-instant-client oci8) )
|
||||
|
||||
# PDO support
|
||||
if use pdo ; then
|
||||
our_conf+=(
|
||||
$(use_with mssql pdo-dblib)
|
||||
$(use_with mysql pdo-mysql "${mysqllib}")
|
||||
$(use_with postgres pdo-pgsql)
|
||||
$(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
|
||||
$(use_with firebird pdo-firebird "${EPREFIX}/usr")
|
||||
$(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
|
||||
$(use_with oci8-instant-client pdo-oci)
|
||||
)
|
||||
fi
|
||||
|
||||
# readline/libedit support
|
||||
our_conf+=(
|
||||
$(use_with readline readline "${EPREFIX}/usr")
|
||||
$(use_with libedit libedit "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Session support
|
||||
if use session ; then
|
||||
our_conf+=( $(use_with sharedmem mm "${EPREFIX}/usr") )
|
||||
else
|
||||
our_conf+=( $(use_enable session session) )
|
||||
fi
|
||||
|
||||
# Use pic for shared modules such as apache2's mod_php
|
||||
our_conf+=( --with-pic )
|
||||
|
||||
# we use the system copy of pcre
|
||||
# --with-pcre-regex affects ext/pcre
|
||||
# --with-pcre-dir affects ext/filter and ext/zip
|
||||
our_conf+=(
|
||||
--with-pcre-regex="${EPREFIX}/usr"
|
||||
--with-pcre-dir="${EPREFIX}/usr"
|
||||
)
|
||||
|
||||
# Catch CFLAGS problems
|
||||
# Fixes bug #14067.
|
||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
||||
replace-cpu-flags "k6*" "i586"
|
||||
|
||||
# Cache the ./configure test results between SAPIs.
|
||||
our_conf+=( --cache-file="${T}/config.cache" )
|
||||
|
||||
# Support user-passed configuration parameters
|
||||
our_conf+=( ${EXTRA_ECONF:-} )
|
||||
|
||||
# Support the Apache2 extras, they must be set globally for all
|
||||
# SAPIs to work correctly, especially for external PHP extensions
|
||||
|
||||
mkdir -p "${WORKDIR}/sapis-build" || die
|
||||
for one_sapi in $SAPIS ; do
|
||||
use "${one_sapi}" || continue
|
||||
php_set_ini_dir "${one_sapi}"
|
||||
|
||||
# The BUILD_DIR variable is used to determine where to output
|
||||
# the files that autotools creates. This was all originally
|
||||
# based on the autotools-utils eclass.
|
||||
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
|
||||
cp -a "${S}" "${BUILD_DIR}" || die
|
||||
cd "${BUILD_DIR}" || die
|
||||
|
||||
local sapi_conf=(
|
||||
--with-config-file-path="${PHP_INI_DIR}"
|
||||
--with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
|
||||
)
|
||||
|
||||
for sapi in $SAPIS ; do
|
||||
case "$sapi" in
|
||||
cli|cgi|embed|fpm)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf+=( "--enable-${sapi}" )
|
||||
if [[ "fpm" == "${sapi}" ]] ; then
|
||||
sapi_conf+=(
|
||||
$(use_with acl fpm-acl)
|
||||
$(use_with systemd fpm-systemd)
|
||||
)
|
||||
fi
|
||||
else
|
||||
sapi_conf+=( "--disable-${sapi}" )
|
||||
fi
|
||||
;;
|
||||
|
||||
apache2)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
|
||||
else
|
||||
sapi_conf+=( --without-apxs2 )
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Construct the $myeconfargs array by concatenating $our_conf
|
||||
# (the common args) and $sapi_conf (the SAPI-specific args).
|
||||
local myeconfargs=( "${our_conf[@]}" )
|
||||
myeconfargs+=( "${sapi_conf[@]}" )
|
||||
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
econf "${myeconfargs[@]}"
|
||||
popd > /dev/null || die
|
||||
done
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# snmp seems to run during src_compile, too (bug #324739)
|
||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
||||
|
||||
for sapi in ${SAPIS} ; do
|
||||
if use "${sapi}"; then
|
||||
cd "${WORKDIR}/sapis-build/$sapi" || \
|
||||
die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
||||
emake
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# see bug #324739 for what happens when we don't have that
|
||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
||||
|
||||
# grab the first SAPI that got built and install common files from there
|
||||
local first_sapi=""
|
||||
for sapi in $SAPIS ; do
|
||||
if use $sapi ; then
|
||||
first_sapi=$sapi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Makefile forgets to create this before trying to write to it...
|
||||
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
|
||||
|
||||
# Install php environment (without any sapis)
|
||||
cd "${WORKDIR}/sapis-build/$first_sapi" || die
|
||||
emake INSTALL_ROOT="${D}" \
|
||||
install-build install-headers install-programs
|
||||
|
||||
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
|
||||
|
||||
# Create the directory where we'll put version-specific php scripts
|
||||
keepdir "/usr/share/php${PHP_MV}"
|
||||
|
||||
local sapi="", file=""
|
||||
local sapi_list=""
|
||||
|
||||
for sapi in ${SAPIS}; do
|
||||
if use "${sapi}" ; then
|
||||
einfo "Installing SAPI: ${sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${sapi}" || die
|
||||
|
||||
if [[ "${sapi}" == "apache2" ]] ; then
|
||||
# We're specifically not using emake install-sapi as libtool
|
||||
# may cause unnecessary relink failures (see bug #351266)
|
||||
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
|
||||
newins ".libs/libphp5$(get_libname)" \
|
||||
"libphp${PHP_MV}$(get_libname)"
|
||||
keepdir "/usr/$(get_libdir)/apache2/modules"
|
||||
else
|
||||
# needed each time, php_install_ini would reset it
|
||||
local dest="${PHP_DESTDIR#${EPREFIX}}"
|
||||
into "${dest}"
|
||||
case "$sapi" in
|
||||
cli)
|
||||
source="sapi/cli/php"
|
||||
;;
|
||||
cgi)
|
||||
source="sapi/cgi/php-cgi"
|
||||
;;
|
||||
fpm)
|
||||
source="sapi/fpm/php-fpm"
|
||||
;;
|
||||
embed)
|
||||
source="libs/libphp${PHP_MV}$(get_libname)"
|
||||
;;
|
||||
*)
|
||||
die "unhandled sapi in src_install"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
||||
dolib.so "${source}"
|
||||
else
|
||||
dobin "${source}"
|
||||
local name="$(basename ${source})"
|
||||
dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
|
||||
fi
|
||||
fi
|
||||
|
||||
php_install_ini "${sapi}"
|
||||
|
||||
# construct correct SAPI string for php-config
|
||||
# thanks to ferringb for the bash voodoo
|
||||
if [[ "${sapi}" == "apache2" ]]; then
|
||||
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
|
||||
else
|
||||
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Installing opcache module
|
||||
if use opcache ; then
|
||||
into "${PHP_DESTDIR#${EPREFIX}}"
|
||||
dolib.so "modules/opcache$(get_libname)"
|
||||
fi
|
||||
|
||||
# Install env.d files
|
||||
newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
|
||||
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
||||
sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
||||
|
||||
# set php-config variable correctly (bug #278439)
|
||||
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
|
||||
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
|
||||
|
||||
if use fpm ; then
|
||||
if use systemd; then
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at.service" \
|
||||
"php-fpm@${SLOT}.service"
|
||||
else
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
|
||||
"php-fpm@${SLOT}.service"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
||||
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
|
||||
if [[ ! -x "${PHP_BIN}" ]] ; then
|
||||
ewarn "Test phase requires USE=cli, skipping"
|
||||
return
|
||||
else
|
||||
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then
|
||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi"
|
||||
fi
|
||||
|
||||
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
|
||||
"session.save_path=${T}" \
|
||||
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
|
||||
"session.save_path=${T}"
|
||||
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
|
||||
done
|
||||
|
||||
local failed="$(find -name '*.out')"
|
||||
if [[ ${failed} != "" ]] ; then
|
||||
ewarn "The following test cases failed unexpectedly:"
|
||||
for name in ${failed}; do
|
||||
ewarn " ${name/.out/}"
|
||||
done
|
||||
else
|
||||
einfo "No unexpected test failures, all fine"
|
||||
fi
|
||||
|
||||
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
|
||||
local passed=""
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
[[ -f "${name}.diff" ]] && continue
|
||||
passed="${passed} ${name}"
|
||||
done
|
||||
if [[ ${passed} != "" ]] ; then
|
||||
einfo "The following test cases passed unexpectedly:"
|
||||
for name in ${passed}; do
|
||||
ewarn " ${passed}"
|
||||
done
|
||||
else
|
||||
einfo "None of the known-to-fail tests passed, all fine"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Output some general info to the user
|
||||
if use apache2 ; then
|
||||
elog
|
||||
elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
|
||||
elog "your apache2 command. OpenRC users can append that string to"
|
||||
elog "APACHE2_OPTS in /etc/conf.d/apache2."
|
||||
elog
|
||||
elog "The apache module configuration file 70_mod_php.conf is"
|
||||
elog "provided (and maintained) by eselect-php."
|
||||
elog
|
||||
fi
|
||||
|
||||
# Create the symlinks for php
|
||||
for m in ${SAPIS}; do
|
||||
[[ ${m} == 'embed' ]] && continue;
|
||||
if use $m ; then
|
||||
local ci=$(eselect php show $m)
|
||||
if [[ -z $ci ]]; then
|
||||
eselect php set $m php${SLOT} || die
|
||||
einfo "Switched ${m} to use php:${SLOT}"
|
||||
einfo
|
||||
elif [[ $ci != "php${SLOT}" ]] ; then
|
||||
elog "To switch $m to use php:${SLOT}, run"
|
||||
elog " eselect php set $m php${SLOT}"
|
||||
elog
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove dead symlinks for SAPIs that were just disabled. For
|
||||
# example, if the user has the cgi SAPI enabled, then he has an
|
||||
# eselect-php symlink for it. If he later reinstalls PHP with
|
||||
# USE="-cgi", that symlink will break. This call to eselect is
|
||||
# supposed to remove that dead link per bug 572436.
|
||||
eselect php cleanup || die
|
||||
|
||||
if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
|
||||
elog "To build extensions for this version of PHP, you will need to"
|
||||
elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
|
||||
elog
|
||||
fi
|
||||
|
||||
# Warn about the removal of PHP_INI_VERSION if the user has it set.
|
||||
if [[ -n "${PHP_INI_VERSION}" ]]; then
|
||||
ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
|
||||
ewarn 'remove it from your configuration at your convenience. See'
|
||||
ewarn
|
||||
ewarn ' https://bugs.gentoo.org/611214'
|
||||
ewarn
|
||||
ewarn 'for more information.'
|
||||
fi
|
||||
|
||||
elog "For details on how version slotting works, please see"
|
||||
elog "the wiki:"
|
||||
elog
|
||||
elog " https://wiki.gentoo.org/wiki/PHP"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
# This serves two purposes. First, if we have just removed the last
|
||||
# installed version of PHP, then this will remove any dead symlinks
|
||||
# belonging to eselect-php. Second, if a user upgrades slots from
|
||||
# (say) 5.6 to 7.0 and depcleans the old slot, then this will update
|
||||
# his existing symlinks to point to the new 7.0 installation. The
|
||||
# latter is bug 432962.
|
||||
#
|
||||
# Note: the eselect-php package may not be installed at this point,
|
||||
# so we can't die() if this command fails.
|
||||
eselect php cleanup
|
||||
}
|
@ -0,0 +1,737 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
inherit flag-o-matic systemd autotools
|
||||
|
||||
DESCRIPTION="The PHP language runtime engine"
|
||||
HOMEPAGE="https://php.net/"
|
||||
SRC_URI="https://php.net/distributions/${P}.tar.xz"
|
||||
|
||||
LICENSE="PHP-3.01
|
||||
BSD
|
||||
Zend-2.0
|
||||
bcmath? ( LGPL-2.1+ )
|
||||
fpm? ( BSD-2 )
|
||||
gd? ( gd )
|
||||
unicode? ( BSD-2 LGPL-2.1 )"
|
||||
|
||||
SLOT="$(ver_cut 1-2)"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2 phpdbg"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk
|
||||
coverage crypt +ctype curl debug
|
||||
enchant exif +fileinfo +filter firebird
|
||||
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
||||
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl
|
||||
mhash mssql mysql mysqli nls
|
||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
||||
readline recode selinux +session session-mm sharedmem
|
||||
+simplexml snmp soap sockets spell sqlite ssl
|
||||
sysvipc systemd test tidy +tokenizer truetype unicode wddx webp
|
||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
|
||||
|
||||
# The supported (that is, autodetected) versions of BDB are listed in
|
||||
# the ./configure script. Other versions *work*, but we need to stick to
|
||||
# the ones that can be detected to avoid a repeat of bug #564824.
|
||||
COMMON_DEPEND="
|
||||
>=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
|
||||
>=dev-libs/libpcre-8.32[unicode]
|
||||
fpm? ( acl? ( sys-apps/acl ) )
|
||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
||||
<www-servers/apache-2.4[threads=] ) )
|
||||
berkdb? ( || ( sys-libs/db:5.3
|
||||
sys-libs/db:5.1
|
||||
sys-libs/db:4.8
|
||||
sys-libs/db:4.7
|
||||
sys-libs/db:4.6
|
||||
sys-libs/db:4.5 ) )
|
||||
bzip2? ( app-arch/bzip2:0= )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
coverage? ( dev-util/lcov )
|
||||
crypt? ( >=dev-libs/libmcrypt-2.4 )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( <app-text/enchant-2.0:0 )
|
||||
firebird? ( dev-db/firebird )
|
||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
|
||||
gmp? ( dev-libs/gmp:0= )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[kerberos=,ssl=] )
|
||||
intl? ( dev-libs/icu:= )
|
||||
iodbc? ( dev-db/libiodbc )
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( >=net-nds/openldap-1.2.11 )
|
||||
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
|
||||
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
|
||||
mssql? ( dev-db/freetds[mssql] )
|
||||
nls? ( sys-devel/gettext )
|
||||
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
|
||||
odbc? ( >=dev-db/unixODBC-1.8.13 )
|
||||
postgres? ( dev-db/postgresql:* )
|
||||
qdbm? ( dev-db/qdbm )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
recode? ( app-text/recode )
|
||||
session-mm? ( dev-libs/mm )
|
||||
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
||||
soap? ( >=dev-libs/libxml2-2.6.8 )
|
||||
spell? ( >=app-text/aspell-0.50 )
|
||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
|
||||
truetype? ( =media-libs/freetype-2* )
|
||||
unicode? ( dev-libs/oniguruma:= )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
webp? ( media-libs/libwebp:0= )
|
||||
xml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
|
||||
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xpm? ( x11-libs/libXpm )
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( sys-libs/zlib:0= )
|
||||
zlib? ( sys-libs/zlib:0= )
|
||||
"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
virtual/mta
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
# Bison isn't actually needed when building from a release tarball
|
||||
# However, the configure script will warn if it's absent or if you
|
||||
# have an incompatible version installed. See bug 593278.
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
app-arch/xz-utils
|
||||
>=sys-devel/bison-3.0.1"
|
||||
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
||||
REQUIRED_USE="
|
||||
|| ( cli cgi fpm apache2 embed phpdbg )
|
||||
cli? ( ^^ ( readline libedit ) )
|
||||
truetype? ( gd zlib )
|
||||
webp? ( gd zlib )
|
||||
cjk? ( gd zlib )
|
||||
exif? ( gd zlib )
|
||||
xpm? ( gd zlib )
|
||||
gd? ( zlib )
|
||||
simplexml? ( xml )
|
||||
soap? ( xml )
|
||||
wddx? ( xml )
|
||||
xmlrpc? ( || ( xml iconv ) )
|
||||
xmlreader? ( xml )
|
||||
xslt? ( xml )
|
||||
ldap-sasl? ( ldap )
|
||||
mhash? ( hash )
|
||||
phar? ( hash )
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
recode? ( !imap !mysqli !mysql )
|
||||
session-mm? ( session !threads )
|
||||
mysql? ( hash || ( mysqli pdo ) )
|
||||
mysqli? ( hash )
|
||||
"
|
||||
PATCHES=(
|
||||
"${FILESDIR}/php-freetype-2.9.1.patch"
|
||||
"${FILESDIR}/php-7.1.25-intl-use-icu-namespace.patch"
|
||||
)
|
||||
|
||||
PHP_MV="$(ver_cut 1)"
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
# Always install the production INI file, bug 611214.
|
||||
local phpinisrc="php.ini-production-${phpsapi}"
|
||||
cp php.ini-production "${phpinisrc}" || die
|
||||
|
||||
# default to /tmp for save_path, bug #282768
|
||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
|
||||
|
||||
# Set the extension dir
|
||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
|
||||
-i "${phpinisrc}" || die
|
||||
|
||||
# Set the include path to point to where we want to find PEAR packages
|
||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
|
||||
|
||||
dodir "${PHP_INI_DIR#${EPREFIX}}"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${phpinisrc}" php.ini
|
||||
|
||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
||||
elog
|
||||
|
||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
||||
|
||||
if use opcache; then
|
||||
elog "Adding opcache to $PHP_EXT_INI_DIR"
|
||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
|
||||
"${D}/${PHP_EXT_INI_DIR}"/opcache.ini
|
||||
dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
|
||||
"${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
|
||||
fi
|
||||
|
||||
# SAPI-specific handling
|
||||
if [[ "${sapi}" == "fpm" ]] ; then
|
||||
einfo "Installing FPM config files php-fpm.conf and www.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
doins sapi/fpm/php-fpm.conf
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
|
||||
doins sapi/fpm/www.conf
|
||||
fi
|
||||
|
||||
dodoc php.ini-{development,production}
|
||||
}
|
||||
|
||||
php_set_ini_dir() {
|
||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# In php-7.x, the FPM pool configuration files have been split off
|
||||
# of the main config. By default the pool config files go in
|
||||
# e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
|
||||
# include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
|
||||
# we'll install the pool configuration file "www.conf" there.
|
||||
php_set_ini_dir fpm
|
||||
sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
|
||||
sapi/fpm/php-fpm.conf.in \
|
||||
|| die 'failed to move the include directory in php-fpm.conf'
|
||||
|
||||
# Bug 669566 - necessary so that build tools are updated for commands like pecl
|
||||
# Force rebuilding aclocal.m4
|
||||
rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare"
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
||||
|
||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
||||
|
||||
# The php-fpm config file wants localstatedir to be ${EPREFIX}/var
|
||||
# and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
|
||||
local our_conf=(
|
||||
--prefix="${PHP_DESTDIR}"
|
||||
--mandir="${PHP_DESTDIR}/man"
|
||||
--infodir="${PHP_DESTDIR}/info"
|
||||
--libdir="${PHP_DESTDIR}/lib"
|
||||
--with-libdir="$(get_libdir)"
|
||||
--localstatedir="${EPREFIX}/var"
|
||||
--without-pear
|
||||
$(use_enable threads maintainer-zts)
|
||||
)
|
||||
|
||||
our_conf+=(
|
||||
$(use_enable bcmath bcmath)
|
||||
$(use_with bzip2 bz2 "${EPREFIX}/usr")
|
||||
$(use_enable calendar calendar)
|
||||
$(use_enable coverage gcov)
|
||||
$(use_enable ctype ctype)
|
||||
$(use_with curl curl "${EPREFIX}/usr")
|
||||
$(use_enable xml dom)
|
||||
$(use_with enchant enchant "${EPREFIX}/usr")
|
||||
$(use_enable exif exif)
|
||||
$(use_enable fileinfo fileinfo)
|
||||
$(use_enable filter filter)
|
||||
$(use_enable ftp ftp)
|
||||
$(use_with nls gettext "${EPREFIX}/usr")
|
||||
$(use_with gmp gmp "${EPREFIX}/usr")
|
||||
$(use_enable hash hash)
|
||||
$(use_with mhash mhash "${EPREFIX}/usr")
|
||||
$(use_with iconv iconv \
|
||||
$(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
|
||||
$(use_enable intl intl)
|
||||
$(use_enable ipv6 ipv6)
|
||||
$(use_enable json json)
|
||||
$(use_with kerberos kerberos "${EPREFIX}/usr")
|
||||
$(use_enable xml libxml)
|
||||
$(use_with xml libxml-dir "${EPREFIX}/usr")
|
||||
$(use_enable unicode mbstring)
|
||||
$(use_with crypt mcrypt "${EPREFIX}/usr")
|
||||
$(use_with unicode onig "${EPREFIX}/usr")
|
||||
$(use_with ssl openssl "${EPREFIX}/usr")
|
||||
$(use_with ssl openssl-dir "${EPREFIX}/usr")
|
||||
$(use_enable pcntl pcntl)
|
||||
$(use_enable phar phar)
|
||||
$(use_enable pdo pdo)
|
||||
$(use_enable opcache opcache)
|
||||
$(use_with postgres pgsql "${EPREFIX}/usr")
|
||||
$(use_enable posix posix)
|
||||
$(use_with spell pspell "${EPREFIX}/usr")
|
||||
$(use_with recode recode "${EPREFIX}/usr")
|
||||
$(use_enable simplexml simplexml)
|
||||
$(use_enable sharedmem shmop)
|
||||
$(use_with snmp snmp "${EPREFIX}/usr")
|
||||
$(use_enable soap soap)
|
||||
$(use_enable sockets sockets)
|
||||
$(use_with sqlite sqlite3 "${EPREFIX}/usr")
|
||||
$(use_enable sysvipc sysvmsg)
|
||||
$(use_enable sysvipc sysvsem)
|
||||
$(use_enable sysvipc sysvshm)
|
||||
$(use_with tidy tidy "${EPREFIX}/usr")
|
||||
$(use_enable tokenizer tokenizer)
|
||||
$(use_enable wddx wddx)
|
||||
$(use_enable xml xml)
|
||||
$(use_enable xmlreader xmlreader)
|
||||
$(use_enable xmlwriter xmlwriter)
|
||||
$(use_with xmlrpc xmlrpc)
|
||||
$(use_with xslt xsl "${EPREFIX}/usr")
|
||||
$(use_enable zip zip)
|
||||
$(use_with zlib zlib "${EPREFIX}/usr")
|
||||
$(use_enable debug debug)
|
||||
)
|
||||
|
||||
# DBA support
|
||||
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
||||
|| use qdbm ; then
|
||||
our_conf+=( "--enable-dba${shared}" )
|
||||
fi
|
||||
|
||||
# DBA drivers support
|
||||
our_conf+=(
|
||||
$(use_with cdb cdb)
|
||||
$(use_with berkdb db4 "${EPREFIX}/usr")
|
||||
$(use_enable flatfile flatfile)
|
||||
$(use_with gdbm gdbm "${EPREFIX}/usr")
|
||||
$(use_enable inifile inifile)
|
||||
$(use_with qdbm qdbm "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Support for the GD graphics library
|
||||
our_conf+=(
|
||||
$(use_with truetype freetype-dir "${EPREFIX}/usr")
|
||||
$(use_enable cjk gd-jis-conv)
|
||||
$(use_with gd jpeg-dir "${EPREFIX}/usr")
|
||||
$(use_with gd png-dir "${EPREFIX}/usr")
|
||||
$(use_with xpm xpm-dir "${EPREFIX}/usr")
|
||||
)
|
||||
if use webp; then
|
||||
our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
|
||||
fi
|
||||
# enable gd last, so configure can pick up the previous settings
|
||||
our_conf+=( $(use_with gd gd) )
|
||||
|
||||
# IMAP support
|
||||
if use imap ; then
|
||||
our_conf+=(
|
||||
$(use_with imap imap "${EPREFIX}/usr")
|
||||
$(use_with ssl imap-ssl "${EPREFIX}/usr")
|
||||
)
|
||||
fi
|
||||
|
||||
# Interbase/firebird support
|
||||
our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
|
||||
|
||||
# LDAP support
|
||||
if use ldap ; then
|
||||
our_conf+=(
|
||||
$(use_with ldap ldap "${EPREFIX}/usr")
|
||||
$(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
|
||||
)
|
||||
fi
|
||||
|
||||
# MySQL support
|
||||
local mysqllib="mysqlnd"
|
||||
local mysqlilib="mysqlnd"
|
||||
|
||||
our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
|
||||
|
||||
local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
||||
if use mysql || use mysqli ; then
|
||||
our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
|
||||
fi
|
||||
|
||||
# ODBC support
|
||||
our_conf+=(
|
||||
$(use_with odbc unixODBC "${EPREFIX}/usr")
|
||||
$(use_with iodbc iodbc "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Oracle support
|
||||
our_conf+=( $(use_with oci8-instant-client oci8) )
|
||||
|
||||
# PDO support
|
||||
if use pdo ; then
|
||||
our_conf+=(
|
||||
$(use_with mssql pdo-dblib "${EPREFIX}/usr")
|
||||
$(use_with mysql pdo-mysql "${mysqllib}")
|
||||
$(use_with postgres pdo-pgsql)
|
||||
$(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
|
||||
$(use_with firebird pdo-firebird "${EPREFIX}/usr")
|
||||
$(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
|
||||
$(use_with oci8-instant-client pdo-oci)
|
||||
)
|
||||
fi
|
||||
|
||||
# readline/libedit support
|
||||
our_conf+=(
|
||||
$(use_with readline readline "${EPREFIX}/usr")
|
||||
$(use_with libedit libedit "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Session support
|
||||
if use session ; then
|
||||
our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
|
||||
else
|
||||
our_conf+=( $(use_enable session session) )
|
||||
fi
|
||||
|
||||
# Use pic for shared modules such as apache2's mod_php
|
||||
our_conf+=( --with-pic )
|
||||
|
||||
# we use the system copy of pcre
|
||||
# --with-pcre-regex affects ext/pcre
|
||||
# --with-pcre-dir affects ext/filter and ext/zip
|
||||
our_conf+=(
|
||||
--with-pcre-regex="${EPREFIX}/usr"
|
||||
--with-pcre-dir="${EPREFIX}/usr"
|
||||
)
|
||||
|
||||
# Catch CFLAGS problems
|
||||
# Fixes bug #14067.
|
||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
||||
replace-cpu-flags "k6*" "i586"
|
||||
|
||||
# Cache the ./configure test results between SAPIs.
|
||||
our_conf+=( --cache-file="${T}/config.cache" )
|
||||
|
||||
# Support user-passed configuration parameters
|
||||
our_conf+=( ${EXTRA_ECONF:-} )
|
||||
|
||||
# Support the Apache2 extras, they must be set globally for all
|
||||
# SAPIs to work correctly, especially for external PHP extensions
|
||||
|
||||
mkdir -p "${WORKDIR}/sapis-build" || die
|
||||
for one_sapi in $SAPIS ; do
|
||||
use "${one_sapi}" || continue
|
||||
php_set_ini_dir "${one_sapi}"
|
||||
|
||||
# The BUILD_DIR variable is used to determine where to output
|
||||
# the files that autotools creates. This was all originally
|
||||
# based on the autotools-utils eclass.
|
||||
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
|
||||
cp -a "${S}" "${BUILD_DIR}" || die
|
||||
cd "${BUILD_DIR}" || die
|
||||
|
||||
local sapi_conf=(
|
||||
--with-config-file-path="${PHP_INI_DIR}"
|
||||
--with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
|
||||
)
|
||||
|
||||
for sapi in $SAPIS ; do
|
||||
case "$sapi" in
|
||||
cli|cgi|embed|fpm|phpdbg)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf+=( "--enable-${sapi}" )
|
||||
if [[ "fpm" == "${sapi}" ]] ; then
|
||||
sapi_conf+=(
|
||||
$(use_with acl fpm-acl)
|
||||
$(use_with systemd fpm-systemd)
|
||||
)
|
||||
fi
|
||||
else
|
||||
sapi_conf+=( "--disable-${sapi}" )
|
||||
fi
|
||||
;;
|
||||
|
||||
apache2)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
|
||||
else
|
||||
sapi_conf+=( --without-apxs2 )
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Construct the $myeconfargs array by concatenating $our_conf
|
||||
# (the common args) and $sapi_conf (the SAPI-specific args).
|
||||
local myeconfargs=( "${our_conf[@]}" )
|
||||
myeconfargs+=( "${sapi_conf[@]}" )
|
||||
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
econf "${myeconfargs[@]}"
|
||||
popd > /dev/null || die
|
||||
done
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# snmp seems to run during src_compile, too (bug #324739)
|
||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
||||
|
||||
for sapi in ${SAPIS} ; do
|
||||
if use "${sapi}"; then
|
||||
cd "${WORKDIR}/sapis-build/$sapi" || \
|
||||
die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
||||
emake
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# see bug #324739 for what happens when we don't have that
|
||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
||||
|
||||
# grab the first SAPI that got built and install common files from there
|
||||
local first_sapi=""
|
||||
for sapi in $SAPIS ; do
|
||||
if use $sapi ; then
|
||||
first_sapi=$sapi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Makefile forgets to create this before trying to write to it...
|
||||
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
|
||||
|
||||
# Install php environment (without any sapis)
|
||||
cd "${WORKDIR}/sapis-build/$first_sapi" || die
|
||||
emake INSTALL_ROOT="${D}" \
|
||||
install-build install-headers install-programs
|
||||
|
||||
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
|
||||
|
||||
# Create the directory where we'll put version-specific php scripts
|
||||
keepdir "/usr/share/php${PHP_MV}"
|
||||
|
||||
local sapi="", file=""
|
||||
local sapi_list=""
|
||||
|
||||
for sapi in ${SAPIS}; do
|
||||
if use "${sapi}" ; then
|
||||
einfo "Installing SAPI: ${sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${sapi}" || die
|
||||
|
||||
if [[ "${sapi}" == "apache2" ]] ; then
|
||||
# We're specifically not using emake install-sapi as libtool
|
||||
# may cause unnecessary relink failures (see bug #351266)
|
||||
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
|
||||
newins ".libs/libphp${PHP_MV}$(get_libname)" \
|
||||
"libphp${PHP_MV}$(get_libname)"
|
||||
keepdir "/usr/$(get_libdir)/apache2/modules"
|
||||
else
|
||||
# needed each time, php_install_ini would reset it
|
||||
local dest="${PHP_DESTDIR#${EPREFIX}}"
|
||||
into "${dest}"
|
||||
case "$sapi" in
|
||||
cli)
|
||||
source="sapi/cli/php"
|
||||
;;
|
||||
cgi)
|
||||
source="sapi/cgi/php-cgi"
|
||||
;;
|
||||
fpm)
|
||||
source="sapi/fpm/php-fpm"
|
||||
;;
|
||||
embed)
|
||||
source="libs/libphp${PHP_MV}$(get_libname)"
|
||||
;;
|
||||
phpdbg)
|
||||
source="sapi/phpdbg/phpdbg"
|
||||
;;
|
||||
*)
|
||||
die "unhandled sapi in src_install"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
||||
dolib.so "${source}"
|
||||
else
|
||||
dobin "${source}"
|
||||
local name="$(basename ${source})"
|
||||
dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
|
||||
fi
|
||||
fi
|
||||
|
||||
php_install_ini "${sapi}"
|
||||
|
||||
# construct correct SAPI string for php-config
|
||||
# thanks to ferringb for the bash voodoo
|
||||
if [[ "${sapi}" == "apache2" ]]; then
|
||||
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
|
||||
else
|
||||
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Installing opcache module
|
||||
if use opcache ; then
|
||||
into "${PHP_DESTDIR#${EPREFIX}}"
|
||||
dolib.so "modules/opcache$(get_libname)"
|
||||
fi
|
||||
|
||||
# Install env.d files
|
||||
newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
|
||||
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
||||
sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
||||
|
||||
# set php-config variable correctly (bug #278439)
|
||||
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
|
||||
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
|
||||
|
||||
if use fpm ; then
|
||||
if use systemd; then
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at.service" \
|
||||
"php-fpm@${SLOT}.service"
|
||||
else
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
|
||||
"php-fpm@${SLOT}.service"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
||||
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
|
||||
if [[ ! -x "${PHP_BIN}" ]] ; then
|
||||
ewarn "Test phase requires USE=cli, skipping"
|
||||
return
|
||||
else
|
||||
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
|
||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
|
||||
export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
|
||||
fi
|
||||
|
||||
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
|
||||
"session.save_path=${T}" \
|
||||
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
|
||||
"session.save_path=${T}"
|
||||
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
|
||||
done
|
||||
|
||||
local failed="$(find -name '*.out')"
|
||||
if [[ ${failed} != "" ]] ; then
|
||||
ewarn "The following test cases failed unexpectedly:"
|
||||
for name in ${failed}; do
|
||||
ewarn " ${name/.out/}"
|
||||
done
|
||||
else
|
||||
einfo "No unexpected test failures, all fine"
|
||||
fi
|
||||
|
||||
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
|
||||
local passed=""
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
[[ -f "${name}.diff" ]] && continue
|
||||
passed="${passed} ${name}"
|
||||
done
|
||||
if [[ ${passed} != "" ]] ; then
|
||||
einfo "The following test cases passed unexpectedly:"
|
||||
for name in ${passed}; do
|
||||
ewarn " ${passed}"
|
||||
done
|
||||
else
|
||||
einfo "None of the known-to-fail tests passed, all fine"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Output some general info to the user
|
||||
if use apache2 ; then
|
||||
elog
|
||||
elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
|
||||
elog "your apache2 command. OpenRC users can append that string to"
|
||||
elog "APACHE2_OPTS in /etc/conf.d/apache2."
|
||||
elog
|
||||
elog "The apache module configuration file 70_mod_php.conf is"
|
||||
elog "provided (and maintained) by eselect-php."
|
||||
elog
|
||||
fi
|
||||
|
||||
# Create the symlinks for php
|
||||
for m in ${SAPIS}; do
|
||||
[[ ${m} == 'embed' ]] && continue;
|
||||
if use $m ; then
|
||||
local ci=$(eselect php show $m)
|
||||
if [[ -z $ci ]]; then
|
||||
eselect php set $m php${SLOT} || die
|
||||
einfo "Switched ${m} to use php:${SLOT}"
|
||||
einfo
|
||||
elif [[ $ci != "php${SLOT}" ]] ; then
|
||||
elog "To switch $m to use php:${SLOT}, run"
|
||||
elog " eselect php set $m php${SLOT}"
|
||||
elog
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove dead symlinks for SAPIs that were just disabled. For
|
||||
# example, if the user has the cgi SAPI enabled, then he has an
|
||||
# eselect-php symlink for it. If he later reinstalls PHP with
|
||||
# USE="-cgi", that symlink will break. This call to eselect is
|
||||
# supposed to remove that dead link per bug 572436.
|
||||
eselect php cleanup || die
|
||||
|
||||
if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
|
||||
elog "To build extensions for this version of PHP, you will need to"
|
||||
elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
|
||||
elog
|
||||
fi
|
||||
|
||||
# Warn about the removal of PHP_INI_VERSION if the user has it set.
|
||||
if [[ -n "${PHP_INI_VERSION}" ]]; then
|
||||
ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
|
||||
ewarn 'remove it from your configuration at your convenience. See'
|
||||
ewarn
|
||||
ewarn ' https://bugs.gentoo.org/611214'
|
||||
ewarn
|
||||
ewarn 'for more information.'
|
||||
fi
|
||||
|
||||
elog "For details on how version slotting works, please see"
|
||||
elog "the wiki:"
|
||||
elog
|
||||
elog " https://wiki.gentoo.org/wiki/PHP"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
# This serves two purposes. First, if we have just removed the last
|
||||
# installed version of PHP, then this will remove any dead symlinks
|
||||
# belonging to eselect-php. Second, if a user upgrades slots from
|
||||
# (say) 5.6 to 7.0 and depcleans the old slot, then this will update
|
||||
# his existing symlinks to point to the new 7.0 installation. The
|
||||
# latter is bug 432962.
|
||||
#
|
||||
# Note: the eselect-php package may not be installed at this point,
|
||||
# so we can't die() if this command fails.
|
||||
eselect php cleanup
|
||||
}
|
@ -0,0 +1,749 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
inherit flag-o-matic systemd autotools
|
||||
|
||||
DESCRIPTION="The PHP language runtime engine"
|
||||
HOMEPAGE="https://php.net/"
|
||||
SRC_URI="https://php.net/distributions/${P}.tar.xz"
|
||||
|
||||
LICENSE="PHP-3.01
|
||||
BSD
|
||||
Zend-2.0
|
||||
bcmath? ( LGPL-2.1+ )
|
||||
fpm? ( BSD-2 )
|
||||
gd? ( gd )
|
||||
unicode? ( BSD-2 LGPL-2.1 )"
|
||||
|
||||
SLOT="$(ver_cut 1-2)"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2 phpdbg"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
|
||||
coverage +ctype curl debug
|
||||
enchant exif +fileinfo +filter firebird
|
||||
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
||||
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb
|
||||
mhash mssql mysql mysqli nls
|
||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
||||
readline recode selinux +session session-mm sharedmem
|
||||
+simplexml snmp soap sockets sodium spell sqlite ssl
|
||||
sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp
|
||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib"
|
||||
|
||||
# The supported (that is, autodetected) versions of BDB are listed in
|
||||
# the ./configure script. Other versions *work*, but we need to stick to
|
||||
# the ones that can be detected to avoid a repeat of bug #564824.
|
||||
COMMON_DEPEND="
|
||||
>=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
|
||||
>=dev-libs/libpcre-8.32[unicode]
|
||||
fpm? ( acl? ( sys-apps/acl ) )
|
||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
||||
<www-servers/apache-2.4[threads=] ) )
|
||||
argon2? ( app-crypt/argon2:= )
|
||||
berkdb? ( || ( sys-libs/db:5.3
|
||||
sys-libs/db:5.1
|
||||
sys-libs/db:4.8
|
||||
sys-libs/db:4.7
|
||||
sys-libs/db:4.6
|
||||
sys-libs/db:4.5 ) )
|
||||
bzip2? ( app-arch/bzip2:0= )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
coverage? ( dev-util/lcov )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( <app-text/enchant-2.0:0 )
|
||||
firebird? ( dev-db/firebird )
|
||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
|
||||
gmp? ( dev-libs/gmp:0= )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[kerberos=,ssl=] )
|
||||
intl? ( dev-libs/icu:= )
|
||||
iodbc? ( dev-db/libiodbc )
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( >=net-nds/openldap-1.2.11 )
|
||||
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
|
||||
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
|
||||
lmdb? ( dev-db/lmdb:= )
|
||||
mssql? ( dev-db/freetds[mssql] )
|
||||
nls? ( sys-devel/gettext )
|
||||
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
|
||||
odbc? ( >=dev-db/unixODBC-1.8.13 )
|
||||
postgres? ( dev-db/postgresql:* )
|
||||
qdbm? ( dev-db/qdbm )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
recode? ( app-text/recode )
|
||||
session-mm? ( dev-libs/mm )
|
||||
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
||||
soap? ( >=dev-libs/libxml2-2.6.8 )
|
||||
sodium? ( dev-libs/libsodium:= )
|
||||
spell? ( >=app-text/aspell-0.50 )
|
||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
|
||||
tokyocabinet? ( dev-db/tokyocabinet )
|
||||
truetype? ( =media-libs/freetype-2* )
|
||||
unicode? ( dev-libs/oniguruma:= )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
webp? ( media-libs/libwebp:0= )
|
||||
xml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
|
||||
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xpm? ( x11-libs/libXpm )
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( sys-libs/zlib:0= )
|
||||
zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
|
||||
zlib? ( sys-libs/zlib:0= )
|
||||
"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
virtual/mta
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
# Bison isn't actually needed when building from a release tarball
|
||||
# However, the configure script will warn if it's absent or if you
|
||||
# have an incompatible version installed. See bug 593278.
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
app-arch/xz-utils
|
||||
>=sys-devel/bison-3.0.1"
|
||||
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
||||
REQUIRED_USE="
|
||||
|| ( cli cgi fpm apache2 embed phpdbg )
|
||||
cli? ( ^^ ( readline libedit ) )
|
||||
truetype? ( gd zlib )
|
||||
webp? ( gd zlib )
|
||||
cjk? ( gd zlib )
|
||||
exif? ( gd zlib )
|
||||
xpm? ( gd zlib )
|
||||
gd? ( zlib )
|
||||
simplexml? ( xml )
|
||||
soap? ( xml )
|
||||
wddx? ( xml )
|
||||
xmlrpc? ( || ( xml iconv ) )
|
||||
xmlreader? ( xml )
|
||||
xslt? ( xml )
|
||||
ldap-sasl? ( ldap )
|
||||
mhash? ( hash )
|
||||
phar? ( hash )
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
recode? ( !imap !mysqli !mysql )
|
||||
session-mm? ( session !threads )
|
||||
mysql? ( hash || ( mysqli pdo ) )
|
||||
mysqli? ( hash )
|
||||
zip-encryption? ( zip )
|
||||
"
|
||||
PATCHES=(
|
||||
"${FILESDIR}/php-freetype-2.9.1.patch"
|
||||
"${FILESDIR}/php-7.2.13-intl-use-icu-namespace.patch"
|
||||
)
|
||||
|
||||
PHP_MV="$(ver_cut 1)"
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
# Always install the production INI file, bug 611214.
|
||||
local phpinisrc="php.ini-production-${phpsapi}"
|
||||
cp php.ini-production "${phpinisrc}" || die
|
||||
|
||||
# default to /tmp for save_path, bug #282768
|
||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
|
||||
|
||||
# Set the extension dir
|
||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
|
||||
-i "${phpinisrc}" || die
|
||||
|
||||
# Set the include path to point to where we want to find PEAR packages
|
||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
|
||||
|
||||
dodir "${PHP_INI_DIR#${EPREFIX}}"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${phpinisrc}" php.ini
|
||||
|
||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
||||
elog
|
||||
|
||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
||||
|
||||
if use opcache; then
|
||||
elog "Adding opcache to $PHP_EXT_INI_DIR"
|
||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
|
||||
"${D}/${PHP_EXT_INI_DIR}"/opcache.ini
|
||||
dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
|
||||
"${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
|
||||
fi
|
||||
|
||||
# SAPI-specific handling
|
||||
if [[ "${sapi}" == "fpm" ]] ; then
|
||||
einfo "Installing FPM config files php-fpm.conf and www.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
doins sapi/fpm/php-fpm.conf
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
|
||||
doins sapi/fpm/www.conf
|
||||
fi
|
||||
|
||||
dodoc php.ini-{development,production}
|
||||
}
|
||||
|
||||
php_set_ini_dir() {
|
||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# In php-7.x, the FPM pool configuration files have been split off
|
||||
# of the main config. By default the pool config files go in
|
||||
# e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
|
||||
# include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
|
||||
# we'll install the pool configuration file "www.conf" there.
|
||||
php_set_ini_dir fpm
|
||||
sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
|
||||
sapi/fpm/php-fpm.conf.in \
|
||||
|| die 'failed to move the include directory in php-fpm.conf'
|
||||
|
||||
# Bug 669566 - necessary so that build tools are updated for commands like pecl
|
||||
# Force rebuilding aclocal.m4
|
||||
rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare"
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
||||
|
||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
||||
|
||||
# The php-fpm config file wants localstatedir to be ${EPREFIX}/var
|
||||
# and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
|
||||
local our_conf=(
|
||||
--prefix="${PHP_DESTDIR}"
|
||||
--mandir="${PHP_DESTDIR}/man"
|
||||
--infodir="${PHP_DESTDIR}/info"
|
||||
--libdir="${PHP_DESTDIR}/lib"
|
||||
--with-libdir="$(get_libdir)"
|
||||
--localstatedir="${EPREFIX}/var"
|
||||
--without-pear
|
||||
$(use_enable threads maintainer-zts)
|
||||
)
|
||||
|
||||
our_conf+=(
|
||||
$(use_with argon2 password-argon2 "${EPREFIX}/usr")
|
||||
$(use_enable bcmath bcmath)
|
||||
$(use_with bzip2 bz2 "${EPREFIX}/usr")
|
||||
$(use_enable calendar calendar)
|
||||
$(use_enable coverage gcov)
|
||||
$(use_enable ctype ctype)
|
||||
$(use_with curl curl "${EPREFIX}/usr")
|
||||
$(use_enable xml dom)
|
||||
$(use_with enchant enchant "${EPREFIX}/usr")
|
||||
$(use_enable exif exif)
|
||||
$(use_enable fileinfo fileinfo)
|
||||
$(use_enable filter filter)
|
||||
$(use_enable ftp ftp)
|
||||
$(use_with nls gettext "${EPREFIX}/usr")
|
||||
$(use_with gmp gmp "${EPREFIX}/usr")
|
||||
$(use_enable hash hash)
|
||||
$(use_with mhash mhash "${EPREFIX}/usr")
|
||||
$(use_with iconv iconv \
|
||||
$(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
|
||||
$(use_enable intl intl)
|
||||
$(use_enable ipv6 ipv6)
|
||||
$(use_enable json json)
|
||||
$(use_with kerberos kerberos "${EPREFIX}/usr")
|
||||
$(use_enable xml libxml)
|
||||
$(use_with xml libxml-dir "${EPREFIX}/usr")
|
||||
$(use_enable unicode mbstring)
|
||||
$(use_with unicode onig "${EPREFIX}/usr")
|
||||
$(use_with ssl openssl "${EPREFIX}/usr")
|
||||
$(use_with ssl openssl-dir "${EPREFIX}/usr")
|
||||
$(use_enable pcntl pcntl)
|
||||
$(use_enable phar phar)
|
||||
$(use_enable pdo pdo)
|
||||
$(use_enable opcache opcache)
|
||||
$(use_with postgres pgsql "${EPREFIX}/usr")
|
||||
$(use_enable posix posix)
|
||||
$(use_with spell pspell "${EPREFIX}/usr")
|
||||
$(use_with recode recode "${EPREFIX}/usr")
|
||||
$(use_enable simplexml simplexml)
|
||||
$(use_enable sharedmem shmop)
|
||||
$(use_with snmp snmp "${EPREFIX}/usr")
|
||||
$(use_enable soap soap)
|
||||
$(use_enable sockets sockets)
|
||||
$(use_with sodium sodium "${EPREFIX}/usr")
|
||||
$(use_with sqlite sqlite3 "${EPREFIX}/usr")
|
||||
$(use_enable sysvipc sysvmsg)
|
||||
$(use_enable sysvipc sysvsem)
|
||||
$(use_enable sysvipc sysvshm)
|
||||
$(use_with tidy tidy "${EPREFIX}/usr")
|
||||
$(use_enable tokenizer tokenizer)
|
||||
$(use_enable wddx wddx)
|
||||
$(use_enable xml xml)
|
||||
$(use_enable xmlreader xmlreader)
|
||||
$(use_enable xmlwriter xmlwriter)
|
||||
$(use_with xmlrpc xmlrpc)
|
||||
$(use_with xslt xsl "${EPREFIX}/usr")
|
||||
$(use_enable zip zip)
|
||||
$(use_with zip-encryption libzip "${EPREFIX}/usr")
|
||||
$(use_with zlib zlib "${EPREFIX}/usr")
|
||||
$(use_enable debug debug)
|
||||
)
|
||||
|
||||
# DBA support
|
||||
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
||||
|| use qdbm || use lmdb || use tokyocabinet ; then
|
||||
our_conf+=( "--enable-dba${shared}" )
|
||||
fi
|
||||
|
||||
# DBA drivers support
|
||||
our_conf+=(
|
||||
$(use_with cdb cdb)
|
||||
$(use_with berkdb db4 "${EPREFIX}/usr")
|
||||
$(use_enable flatfile flatfile)
|
||||
$(use_with gdbm gdbm "${EPREFIX}/usr")
|
||||
$(use_enable inifile inifile)
|
||||
$(use_with qdbm qdbm "${EPREFIX}/usr")
|
||||
$(use_with lmdb lmdb "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Support for the GD graphics library
|
||||
our_conf+=(
|
||||
$(use_with truetype freetype-dir "${EPREFIX}/usr")
|
||||
$(use_enable cjk gd-jis-conv)
|
||||
$(use_with gd jpeg-dir "${EPREFIX}/usr")
|
||||
$(use_with gd png-dir "${EPREFIX}/usr")
|
||||
$(use_with xpm xpm-dir "${EPREFIX}/usr")
|
||||
)
|
||||
if use webp; then
|
||||
our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
|
||||
fi
|
||||
# enable gd last, so configure can pick up the previous settings
|
||||
our_conf+=( $(use_with gd gd) )
|
||||
|
||||
# IMAP support
|
||||
if use imap ; then
|
||||
our_conf+=(
|
||||
$(use_with imap imap "${EPREFIX}/usr")
|
||||
$(use_with ssl imap-ssl "${EPREFIX}/usr")
|
||||
)
|
||||
fi
|
||||
|
||||
# Interbase/firebird support
|
||||
our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
|
||||
|
||||
# LDAP support
|
||||
if use ldap ; then
|
||||
our_conf+=(
|
||||
$(use_with ldap ldap "${EPREFIX}/usr")
|
||||
$(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
|
||||
)
|
||||
fi
|
||||
|
||||
# MySQL support
|
||||
local mysqllib="mysqlnd"
|
||||
local mysqlilib="mysqlnd"
|
||||
|
||||
our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
|
||||
|
||||
local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
||||
if use mysql || use mysqli ; then
|
||||
our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
|
||||
fi
|
||||
|
||||
# ODBC support
|
||||
our_conf+=(
|
||||
$(use_with odbc unixODBC "${EPREFIX}/usr")
|
||||
$(use_with iodbc iodbc "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Oracle support
|
||||
our_conf+=( $(use_with oci8-instant-client oci8) )
|
||||
|
||||
# PDO support
|
||||
if use pdo ; then
|
||||
our_conf+=(
|
||||
$(use_with mssql pdo-dblib "${EPREFIX}/usr")
|
||||
$(use_with mysql pdo-mysql "${mysqllib}")
|
||||
$(use_with postgres pdo-pgsql)
|
||||
$(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
|
||||
$(use_with firebird pdo-firebird "${EPREFIX}/usr")
|
||||
$(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
|
||||
$(use_with oci8-instant-client pdo-oci)
|
||||
)
|
||||
fi
|
||||
|
||||
# readline/libedit support
|
||||
our_conf+=(
|
||||
$(use_with readline readline "${EPREFIX}/usr")
|
||||
$(use_with libedit libedit "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Session support
|
||||
if use session ; then
|
||||
our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
|
||||
else
|
||||
our_conf+=( $(use_enable session session) )
|
||||
fi
|
||||
|
||||
# Use pic for shared modules such as apache2's mod_php
|
||||
our_conf+=( --with-pic )
|
||||
|
||||
# we use the system copy of pcre
|
||||
# --with-pcre-regex affects ext/pcre
|
||||
# --with-pcre-dir affects ext/filter and ext/zip
|
||||
# --with-pcre-valgrind cannot be enabled with system pcre
|
||||
# Many arches don't support pcre-jit
|
||||
our_conf+=(
|
||||
--with-pcre-regex="${EPREFIX}/usr"
|
||||
--with-pcre-dir="${EPREFIX}/usr"
|
||||
--without-pcre-valgrind
|
||||
--without-pcre-jit
|
||||
)
|
||||
|
||||
# Catch CFLAGS problems
|
||||
# Fixes bug #14067.
|
||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
||||
replace-cpu-flags "k6*" "i586"
|
||||
|
||||
# Cache the ./configure test results between SAPIs.
|
||||
our_conf+=( --cache-file="${T}/config.cache" )
|
||||
|
||||
# Support user-passed configuration parameters
|
||||
our_conf+=( ${EXTRA_ECONF:-} )
|
||||
|
||||
# Support the Apache2 extras, they must be set globally for all
|
||||
# SAPIs to work correctly, especially for external PHP extensions
|
||||
|
||||
mkdir -p "${WORKDIR}/sapis-build" || die
|
||||
for one_sapi in $SAPIS ; do
|
||||
use "${one_sapi}" || continue
|
||||
php_set_ini_dir "${one_sapi}"
|
||||
|
||||
# The BUILD_DIR variable is used to determine where to output
|
||||
# the files that autotools creates. This was all originally
|
||||
# based on the autotools-utils eclass.
|
||||
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
|
||||
cp -a "${S}" "${BUILD_DIR}" || die
|
||||
cd "${BUILD_DIR}" || die
|
||||
|
||||
local sapi_conf=(
|
||||
--with-config-file-path="${PHP_INI_DIR}"
|
||||
--with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
|
||||
)
|
||||
|
||||
for sapi in $SAPIS ; do
|
||||
case "$sapi" in
|
||||
cli|cgi|embed|fpm|phpdbg)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf+=( "--enable-${sapi}" )
|
||||
if [[ "fpm" == "${sapi}" ]] ; then
|
||||
sapi_conf+=(
|
||||
$(use_with acl fpm-acl)
|
||||
$(use_with systemd fpm-systemd)
|
||||
)
|
||||
fi
|
||||
else
|
||||
sapi_conf+=( "--disable-${sapi}" )
|
||||
fi
|
||||
;;
|
||||
|
||||
apache2)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
|
||||
else
|
||||
sapi_conf+=( --without-apxs2 )
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Construct the $myeconfargs array by concatenating $our_conf
|
||||
# (the common args) and $sapi_conf (the SAPI-specific args).
|
||||
local myeconfargs=( "${our_conf[@]}" )
|
||||
myeconfargs+=( "${sapi_conf[@]}" )
|
||||
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
econf "${myeconfargs[@]}"
|
||||
popd > /dev/null || die
|
||||
done
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# snmp seems to run during src_compile, too (bug #324739)
|
||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
||||
|
||||
for sapi in ${SAPIS} ; do
|
||||
if use "${sapi}"; then
|
||||
cd "${WORKDIR}/sapis-build/$sapi" || \
|
||||
die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
||||
emake
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# see bug #324739 for what happens when we don't have that
|
||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
||||
|
||||
# grab the first SAPI that got built and install common files from there
|
||||
local first_sapi=""
|
||||
for sapi in $SAPIS ; do
|
||||
if use $sapi ; then
|
||||
first_sapi=$sapi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Makefile forgets to create this before trying to write to it...
|
||||
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
|
||||
|
||||
# Install php environment (without any sapis)
|
||||
cd "${WORKDIR}/sapis-build/$first_sapi" || die
|
||||
emake INSTALL_ROOT="${D}" \
|
||||
install-build install-headers install-programs
|
||||
|
||||
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
|
||||
|
||||
# Create the directory where we'll put version-specific php scripts
|
||||
keepdir "/usr/share/php${PHP_MV}"
|
||||
|
||||
local sapi="", file=""
|
||||
local sapi_list=""
|
||||
|
||||
for sapi in ${SAPIS}; do
|
||||
if use "${sapi}" ; then
|
||||
einfo "Installing SAPI: ${sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${sapi}" || die
|
||||
|
||||
if [[ "${sapi}" == "apache2" ]] ; then
|
||||
# We're specifically not using emake install-sapi as libtool
|
||||
# may cause unnecessary relink failures (see bug #351266)
|
||||
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
|
||||
newins ".libs/libphp${PHP_MV}$(get_libname)" \
|
||||
"libphp${PHP_MV}$(get_libname)"
|
||||
keepdir "/usr/$(get_libdir)/apache2/modules"
|
||||
else
|
||||
# needed each time, php_install_ini would reset it
|
||||
local dest="${PHP_DESTDIR#${EPREFIX}}"
|
||||
into "${dest}"
|
||||
case "$sapi" in
|
||||
cli)
|
||||
source="sapi/cli/php"
|
||||
;;
|
||||
cgi)
|
||||
source="sapi/cgi/php-cgi"
|
||||
;;
|
||||
fpm)
|
||||
source="sapi/fpm/php-fpm"
|
||||
;;
|
||||
embed)
|
||||
source="libs/libphp${PHP_MV}$(get_libname)"
|
||||
;;
|
||||
phpdbg)
|
||||
source="sapi/phpdbg/phpdbg"
|
||||
;;
|
||||
*)
|
||||
die "unhandled sapi in src_install"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
||||
dolib.so "${source}"
|
||||
else
|
||||
dobin "${source}"
|
||||
local name="$(basename ${source})"
|
||||
dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
|
||||
fi
|
||||
fi
|
||||
|
||||
php_install_ini "${sapi}"
|
||||
|
||||
# construct correct SAPI string for php-config
|
||||
# thanks to ferringb for the bash voodoo
|
||||
if [[ "${sapi}" == "apache2" ]]; then
|
||||
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
|
||||
else
|
||||
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Installing opcache module
|
||||
if use opcache ; then
|
||||
into "${PHP_DESTDIR#${EPREFIX}}"
|
||||
dolib.so "modules/opcache$(get_libname)"
|
||||
fi
|
||||
|
||||
# Install env.d files
|
||||
newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
|
||||
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
||||
sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
||||
|
||||
# set php-config variable correctly (bug #278439)
|
||||
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
|
||||
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
|
||||
|
||||
if use fpm ; then
|
||||
if use systemd; then
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at.service" \
|
||||
"php-fpm@${SLOT}.service"
|
||||
else
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
|
||||
"php-fpm@${SLOT}.service"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
||||
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
|
||||
if [[ ! -x "${PHP_BIN}" ]] ; then
|
||||
ewarn "Test phase requires USE=cli, skipping"
|
||||
return
|
||||
else
|
||||
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
|
||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
|
||||
export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
|
||||
fi
|
||||
|
||||
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
|
||||
"session.save_path=${T}" \
|
||||
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
|
||||
"session.save_path=${T}"
|
||||
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
|
||||
done
|
||||
|
||||
local failed="$(find -name '*.out')"
|
||||
if [[ ${failed} != "" ]] ; then
|
||||
ewarn "The following test cases failed unexpectedly:"
|
||||
for name in ${failed}; do
|
||||
ewarn " ${name/.out/}"
|
||||
done
|
||||
else
|
||||
einfo "No unexpected test failures, all fine"
|
||||
fi
|
||||
|
||||
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
|
||||
local passed=""
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
[[ -f "${name}.diff" ]] && continue
|
||||
passed="${passed} ${name}"
|
||||
done
|
||||
if [[ ${passed} != "" ]] ; then
|
||||
einfo "The following test cases passed unexpectedly:"
|
||||
for name in ${passed}; do
|
||||
ewarn " ${passed}"
|
||||
done
|
||||
else
|
||||
einfo "None of the known-to-fail tests passed, all fine"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Output some general info to the user
|
||||
if use apache2 ; then
|
||||
elog
|
||||
elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
|
||||
elog "your apache2 command. OpenRC users can append that string to"
|
||||
elog "APACHE2_OPTS in /etc/conf.d/apache2."
|
||||
elog
|
||||
elog "The apache module configuration file 70_mod_php.conf is"
|
||||
elog "provided (and maintained) by eselect-php."
|
||||
elog
|
||||
fi
|
||||
|
||||
# Create the symlinks for php
|
||||
for m in ${SAPIS}; do
|
||||
[[ ${m} == 'embed' ]] && continue;
|
||||
if use $m ; then
|
||||
local ci=$(eselect php show $m)
|
||||
if [[ -z $ci ]]; then
|
||||
eselect php set $m php${SLOT} || die
|
||||
einfo "Switched ${m} to use php:${SLOT}"
|
||||
einfo
|
||||
elif [[ $ci != "php${SLOT}" ]] ; then
|
||||
elog "To switch $m to use php:${SLOT}, run"
|
||||
elog " eselect php set $m php${SLOT}"
|
||||
elog
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove dead symlinks for SAPIs that were just disabled. For
|
||||
# example, if the user has the cgi SAPI enabled, then he has an
|
||||
# eselect-php symlink for it. If he later reinstalls PHP with
|
||||
# USE="-cgi", that symlink will break. This call to eselect is
|
||||
# supposed to remove that dead link per bug 572436.
|
||||
eselect php cleanup || die
|
||||
|
||||
if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
|
||||
elog "To build extensions for this version of PHP, you will need to"
|
||||
elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
|
||||
elog
|
||||
fi
|
||||
|
||||
# Warn about the removal of PHP_INI_VERSION if the user has it set.
|
||||
if [[ -n "${PHP_INI_VERSION}" ]]; then
|
||||
ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
|
||||
ewarn 'remove it from your configuration at your convenience. See'
|
||||
ewarn
|
||||
ewarn ' https://bugs.gentoo.org/611214'
|
||||
ewarn
|
||||
ewarn 'for more information.'
|
||||
fi
|
||||
|
||||
elog "For details on how version slotting works, please see"
|
||||
elog "the wiki:"
|
||||
elog
|
||||
elog " https://wiki.gentoo.org/wiki/PHP"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
# This serves two purposes. First, if we have just removed the last
|
||||
# installed version of PHP, then this will remove any dead symlinks
|
||||
# belonging to eselect-php. Second, if a user upgrades slots from
|
||||
# (say) 5.6 to 7.0 and depcleans the old slot, then this will update
|
||||
# his existing symlinks to point to the new 7.0 installation. The
|
||||
# latter is bug 432962.
|
||||
#
|
||||
# Note: the eselect-php package may not be installed at this point,
|
||||
# so we can't die() if this command fails.
|
||||
eselect php cleanup
|
||||
}
|
@ -0,0 +1,750 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
inherit flag-o-matic systemd autotools
|
||||
|
||||
MY_PV=${PV/_rc/RC}
|
||||
DESCRIPTION="The PHP language runtime engine"
|
||||
HOMEPAGE="https://php.net/"
|
||||
SRC_URI="https://php.net/distributions/${P}.tar.xz"
|
||||
|
||||
LICENSE="PHP-3.01
|
||||
BSD
|
||||
Zend-2.0
|
||||
bcmath? ( LGPL-2.1+ )
|
||||
fpm? ( BSD-2 )
|
||||
gd? ( gd )
|
||||
unicode? ( BSD-2 LGPL-2.1 )"
|
||||
|
||||
SLOT="$(ver_cut 1-2)"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2 phpdbg"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
|
||||
coverage +ctype curl debug
|
||||
enchant exif +fileinfo +filter firebird
|
||||
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
||||
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb
|
||||
mhash mssql mysql mysqli nls
|
||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
||||
readline recode selinux +session session-mm sharedmem
|
||||
+simplexml snmp soap sockets sodium spell sqlite ssl
|
||||
sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp
|
||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib"
|
||||
|
||||
# The supported (that is, autodetected) versions of BDB are listed in
|
||||
# the ./configure script. Other versions *work*, but we need to stick to
|
||||
# the ones that can be detected to avoid a repeat of bug #564824.
|
||||
COMMON_DEPEND="
|
||||
>=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
|
||||
>=dev-libs/libpcre2-10.30[unicode]
|
||||
fpm? ( acl? ( sys-apps/acl ) )
|
||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
||||
<www-servers/apache-2.4[threads=] ) )
|
||||
argon2? ( app-crypt/argon2:= )
|
||||
berkdb? ( || ( sys-libs/db:5.3
|
||||
sys-libs/db:5.1
|
||||
sys-libs/db:4.8
|
||||
sys-libs/db:4.7
|
||||
sys-libs/db:4.6
|
||||
sys-libs/db:4.5 ) )
|
||||
bzip2? ( app-arch/bzip2:0= )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
coverage? ( dev-util/lcov )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( <app-text/enchant-2.0:0 )
|
||||
firebird? ( dev-db/firebird )
|
||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= >=sys-libs/zlib-1.2.0.4 )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
|
||||
gmp? ( dev-libs/gmp:0= )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[kerberos=,ssl=] )
|
||||
intl? ( dev-libs/icu:= )
|
||||
iodbc? ( dev-db/libiodbc )
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( >=net-nds/openldap-1.2.11 )
|
||||
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
|
||||
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
|
||||
lmdb? ( dev-db/lmdb:= )
|
||||
mssql? ( dev-db/freetds[mssql] )
|
||||
nls? ( sys-devel/gettext )
|
||||
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
|
||||
odbc? ( >=dev-db/unixODBC-1.8.13 )
|
||||
postgres? ( dev-db/postgresql:* )
|
||||
qdbm? ( dev-db/qdbm )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
recode? ( app-text/recode )
|
||||
session-mm? ( dev-libs/mm )
|
||||
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
||||
soap? ( >=dev-libs/libxml2-2.6.8 )
|
||||
sodium? ( dev-libs/libsodium:= )
|
||||
spell? ( >=app-text/aspell-0.50 )
|
||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-1.0.1:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
|
||||
tokyocabinet? ( dev-db/tokyocabinet )
|
||||
truetype? ( =media-libs/freetype-2* )
|
||||
unicode? ( dev-libs/oniguruma:= )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
webp? ( media-libs/libwebp:0= )
|
||||
xml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
|
||||
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xpm? ( x11-libs/libXpm )
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( >=sys-libs/zlib-1.2.0.4:0= )
|
||||
zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
|
||||
zlib? ( >=sys-libs/zlib-1.2.0.4:0= )
|
||||
"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
virtual/mta
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
# Bison isn't actually needed when building from a release tarball
|
||||
# However, the configure script will warn if it's absent or if you
|
||||
# have an incompatible version installed. See bug 593278.
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
app-arch/xz-utils
|
||||
>=sys-devel/bison-3.0.1"
|
||||
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
||||
REQUIRED_USE="
|
||||
|| ( cli cgi fpm apache2 embed phpdbg )
|
||||
cli? ( ^^ ( readline libedit ) )
|
||||
truetype? ( gd zlib )
|
||||
webp? ( gd zlib )
|
||||
cjk? ( gd zlib )
|
||||
exif? ( gd zlib )
|
||||
xpm? ( gd zlib )
|
||||
gd? ( zlib )
|
||||
simplexml? ( xml )
|
||||
soap? ( xml )
|
||||
wddx? ( xml )
|
||||
xmlrpc? ( || ( xml iconv ) )
|
||||
xmlreader? ( xml )
|
||||
xslt? ( xml )
|
||||
ldap-sasl? ( ldap )
|
||||
mhash? ( hash )
|
||||
phar? ( hash )
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
recode? ( !imap !mysqli !mysql )
|
||||
session-mm? ( session !threads )
|
||||
mysql? ( || ( mysqli pdo ) )
|
||||
zip-encryption? ( zip )
|
||||
"
|
||||
PATCHES=(
|
||||
"${FILESDIR}/php-freetype-2.9.1.patch"
|
||||
)
|
||||
|
||||
PHP_MV="$(ver_cut 1)"
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
# Always install the production INI file, bug 611214.
|
||||
local phpinisrc="php.ini-production-${phpsapi}"
|
||||
cp php.ini-production "${phpinisrc}" || die
|
||||
|
||||
# default to /tmp for save_path, bug #282768
|
||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
|
||||
|
||||
# Set the extension dir
|
||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
|
||||
-i "${phpinisrc}" || die
|
||||
|
||||
# Set the include path to point to where we want to find PEAR packages
|
||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
|
||||
|
||||
dodir "${PHP_INI_DIR#${EPREFIX}}"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${phpinisrc}" php.ini
|
||||
|
||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
||||
elog
|
||||
|
||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
||||
|
||||
if use opcache; then
|
||||
elog "Adding opcache to $PHP_EXT_INI_DIR"
|
||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
|
||||
"${D}/${PHP_EXT_INI_DIR}"/opcache.ini
|
||||
dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
|
||||
"${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
|
||||
fi
|
||||
|
||||
# SAPI-specific handling
|
||||
if [[ "${sapi}" == "fpm" ]] ; then
|
||||
einfo "Installing FPM config files php-fpm.conf and www.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
doins sapi/fpm/php-fpm.conf
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
|
||||
doins sapi/fpm/www.conf
|
||||
fi
|
||||
|
||||
dodoc php.ini-{development,production}
|
||||
}
|
||||
|
||||
php_set_ini_dir() {
|
||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# In php-7.x, the FPM pool configuration files have been split off
|
||||
# of the main config. By default the pool config files go in
|
||||
# e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
|
||||
# include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
|
||||
# we'll install the pool configuration file "www.conf" there.
|
||||
php_set_ini_dir fpm
|
||||
sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
|
||||
sapi/fpm/php-fpm.conf.in \
|
||||
|| die 'failed to move the include directory in php-fpm.conf'
|
||||
|
||||
# Bug 669566 - necessary so that build tools are updated for commands like pecl
|
||||
# Force rebuilding aclocal.m4
|
||||
rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare"
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
||||
|
||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
||||
|
||||
# The php-fpm config file wants localstatedir to be ${EPREFIX}/var
|
||||
# and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
|
||||
local our_conf=(
|
||||
--prefix="${PHP_DESTDIR}"
|
||||
--mandir="${PHP_DESTDIR}/man"
|
||||
--infodir="${PHP_DESTDIR}/info"
|
||||
--libdir="${PHP_DESTDIR}/lib"
|
||||
--with-libdir="$(get_libdir)"
|
||||
--localstatedir="${EPREFIX}/var"
|
||||
--without-pear
|
||||
$(use_enable threads maintainer-zts)
|
||||
)
|
||||
|
||||
our_conf+=(
|
||||
$(use_with argon2 password-argon2 "${EPREFIX}/usr")
|
||||
$(use_enable bcmath bcmath)
|
||||
$(use_with bzip2 bz2 "${EPREFIX}/usr")
|
||||
$(use_enable calendar calendar)
|
||||
$(use_enable coverage gcov)
|
||||
$(use_enable ctype ctype)
|
||||
$(use_with curl curl "${EPREFIX}/usr")
|
||||
$(use_enable xml dom)
|
||||
$(use_with enchant enchant "${EPREFIX}/usr")
|
||||
$(use_enable exif exif)
|
||||
$(use_enable fileinfo fileinfo)
|
||||
$(use_enable filter filter)
|
||||
$(use_enable ftp ftp)
|
||||
$(use_with nls gettext "${EPREFIX}/usr")
|
||||
$(use_with gmp gmp "${EPREFIX}/usr")
|
||||
$(use_enable hash hash)
|
||||
$(use_with mhash mhash "${EPREFIX}/usr")
|
||||
$(use_with iconv iconv \
|
||||
$(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
|
||||
$(use_enable intl intl)
|
||||
$(use_enable ipv6 ipv6)
|
||||
$(use_enable json json)
|
||||
$(use_with kerberos kerberos "${EPREFIX}/usr")
|
||||
$(use_enable xml libxml)
|
||||
$(use_with xml libxml-dir "${EPREFIX}/usr")
|
||||
$(use_enable unicode mbstring)
|
||||
$(use_with unicode onig "${EPREFIX}/usr")
|
||||
$(use_with ssl openssl "${EPREFIX}/usr")
|
||||
$(use_with ssl openssl-dir "${EPREFIX}/usr")
|
||||
$(use_enable pcntl pcntl)
|
||||
$(use_enable phar phar)
|
||||
$(use_enable pdo pdo)
|
||||
$(use_enable opcache opcache)
|
||||
$(use_with postgres pgsql "${EPREFIX}/usr")
|
||||
$(use_enable posix posix)
|
||||
$(use_with spell pspell "${EPREFIX}/usr")
|
||||
$(use_with recode recode "${EPREFIX}/usr")
|
||||
$(use_enable simplexml simplexml)
|
||||
$(use_enable sharedmem shmop)
|
||||
$(use_with snmp snmp "${EPREFIX}/usr")
|
||||
$(use_enable soap soap)
|
||||
$(use_enable sockets sockets)
|
||||
$(use_with sodium sodium "${EPREFIX}/usr")
|
||||
$(use_with sqlite sqlite3 "${EPREFIX}/usr")
|
||||
$(use_enable sysvipc sysvmsg)
|
||||
$(use_enable sysvipc sysvsem)
|
||||
$(use_enable sysvipc sysvshm)
|
||||
$(use_with tidy tidy "${EPREFIX}/usr")
|
||||
$(use_enable tokenizer tokenizer)
|
||||
$(use_enable wddx wddx)
|
||||
$(use_enable xml xml)
|
||||
$(use_enable xmlreader xmlreader)
|
||||
$(use_enable xmlwriter xmlwriter)
|
||||
$(use_with xmlrpc xmlrpc)
|
||||
$(use_with xslt xsl "${EPREFIX}/usr")
|
||||
$(use_enable zip zip)
|
||||
$(use_with zip-encryption libzip "${EPREFIX}/usr")
|
||||
$(use_with zlib zlib "${EPREFIX}/usr")
|
||||
$(use_enable debug debug)
|
||||
)
|
||||
|
||||
# DBA support
|
||||
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
||||
|| use qdbm || use lmdb || use tokyocabinet ; then
|
||||
our_conf+=( "--enable-dba${shared}" )
|
||||
fi
|
||||
|
||||
# DBA drivers support
|
||||
our_conf+=(
|
||||
$(use_with cdb cdb)
|
||||
$(use_with berkdb db4 "${EPREFIX}/usr")
|
||||
$(use_enable flatfile flatfile)
|
||||
$(use_with gdbm gdbm "${EPREFIX}/usr")
|
||||
$(use_enable inifile inifile)
|
||||
$(use_with qdbm qdbm "${EPREFIX}/usr")
|
||||
$(use_with lmdb lmdb "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Support for the GD graphics library
|
||||
our_conf+=(
|
||||
$(use_with truetype freetype-dir "${EPREFIX}/usr")
|
||||
$(use_enable cjk gd-jis-conv)
|
||||
$(use_with gd jpeg-dir "${EPREFIX}/usr")
|
||||
$(use_with gd png-dir "${EPREFIX}/usr")
|
||||
$(use_with xpm xpm-dir "${EPREFIX}/usr")
|
||||
)
|
||||
if use webp; then
|
||||
our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
|
||||
fi
|
||||
# enable gd last, so configure can pick up the previous settings
|
||||
our_conf+=( $(use_with gd gd) )
|
||||
|
||||
# IMAP support
|
||||
if use imap ; then
|
||||
our_conf+=(
|
||||
$(use_with imap imap "${EPREFIX}/usr")
|
||||
$(use_with ssl imap-ssl "${EPREFIX}/usr")
|
||||
)
|
||||
fi
|
||||
|
||||
# Interbase/firebird support
|
||||
our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
|
||||
|
||||
# LDAP support
|
||||
if use ldap ; then
|
||||
our_conf+=(
|
||||
$(use_with ldap ldap "${EPREFIX}/usr")
|
||||
$(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
|
||||
)
|
||||
fi
|
||||
|
||||
# MySQL support
|
||||
local mysqllib="mysqlnd"
|
||||
local mysqlilib="mysqlnd"
|
||||
|
||||
our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
|
||||
|
||||
local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
||||
if use mysql || use mysqli ; then
|
||||
our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
|
||||
fi
|
||||
|
||||
# ODBC support
|
||||
our_conf+=(
|
||||
$(use_with odbc unixODBC "${EPREFIX}/usr")
|
||||
$(use_with iodbc iodbc "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Oracle support
|
||||
our_conf+=( $(use_with oci8-instant-client oci8) )
|
||||
|
||||
# PDO support
|
||||
if use pdo ; then
|
||||
our_conf+=(
|
||||
$(use_with mssql pdo-dblib "${EPREFIX}/usr")
|
||||
$(use_with mysql pdo-mysql "${mysqllib}")
|
||||
$(use_with postgres pdo-pgsql)
|
||||
$(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
|
||||
$(use_with firebird pdo-firebird "${EPREFIX}/usr")
|
||||
$(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
|
||||
$(use_with oci8-instant-client pdo-oci)
|
||||
)
|
||||
fi
|
||||
|
||||
# readline/libedit support
|
||||
our_conf+=(
|
||||
$(use_with readline readline "${EPREFIX}/usr")
|
||||
$(use_with libedit libedit "${EPREFIX}/usr")
|
||||
)
|
||||
|
||||
# Session support
|
||||
if use session ; then
|
||||
our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
|
||||
else
|
||||
our_conf+=( $(use_enable session session) )
|
||||
fi
|
||||
|
||||
# Use pic for shared modules such as apache2's mod_php
|
||||
our_conf+=( --with-pic )
|
||||
|
||||
# we use the system copy of pcre
|
||||
# --with-pcre-regex affects ext/pcre
|
||||
# --with-pcre-dir affects ext/filter and ext/zip
|
||||
# --with-pcre-valgrind cannot be enabled with system pcre
|
||||
# Many arches don't support pcre-jit
|
||||
our_conf+=(
|
||||
--with-pcre-regex="${EPREFIX}/usr"
|
||||
--with-pcre-dir="${EPREFIX}/usr"
|
||||
--without-pcre-valgrind
|
||||
--without-pcre-jit
|
||||
)
|
||||
|
||||
# Catch CFLAGS problems
|
||||
# Fixes bug #14067.
|
||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
||||
replace-cpu-flags "k6*" "i586"
|
||||
|
||||
# Cache the ./configure test results between SAPIs.
|
||||
our_conf+=( --cache-file="${T}/config.cache" )
|
||||
|
||||
# Support user-passed configuration parameters
|
||||
our_conf+=( ${EXTRA_ECONF:-} )
|
||||
|
||||
# Support the Apache2 extras, they must be set globally for all
|
||||
# SAPIs to work correctly, especially for external PHP extensions
|
||||
|
||||
mkdir -p "${WORKDIR}/sapis-build" || die
|
||||
for one_sapi in $SAPIS ; do
|
||||
use "${one_sapi}" || continue
|
||||
php_set_ini_dir "${one_sapi}"
|
||||
|
||||
# The BUILD_DIR variable is used to determine where to output
|
||||
# the files that autotools creates. This was all originally
|
||||
# based on the autotools-utils eclass.
|
||||
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
|
||||
cp -a "${S}" "${BUILD_DIR}" || die
|
||||
cd "${BUILD_DIR}" || die
|
||||
|
||||
local sapi_conf=(
|
||||
--with-config-file-path="${PHP_INI_DIR}"
|
||||
--with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
|
||||
)
|
||||
|
||||
for sapi in $SAPIS ; do
|
||||
case "$sapi" in
|
||||
cli|cgi|embed|fpm|phpdbg)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf+=( "--enable-${sapi}" )
|
||||
if [[ "fpm" == "${sapi}" ]] ; then
|
||||
sapi_conf+=(
|
||||
$(use_with acl fpm-acl)
|
||||
$(use_with systemd fpm-systemd)
|
||||
)
|
||||
fi
|
||||
else
|
||||
sapi_conf+=( "--disable-${sapi}" )
|
||||
fi
|
||||
;;
|
||||
|
||||
apache2)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
|
||||
else
|
||||
sapi_conf+=( --without-apxs2 )
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Construct the $myeconfargs array by concatenating $our_conf
|
||||
# (the common args) and $sapi_conf (the SAPI-specific args).
|
||||
local myeconfargs=( "${our_conf[@]}" )
|
||||
myeconfargs+=( "${sapi_conf[@]}" )
|
||||
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
econf "${myeconfargs[@]}"
|
||||
popd > /dev/null || die
|
||||
done
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# snmp seems to run during src_compile, too (bug #324739)
|
||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
||||
|
||||
for sapi in ${SAPIS} ; do
|
||||
if use "${sapi}"; then
|
||||
cd "${WORKDIR}/sapis-build/$sapi" || \
|
||||
die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
||||
emake
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# see bug #324739 for what happens when we don't have that
|
||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
||||
|
||||
# grab the first SAPI that got built and install common files from there
|
||||
local first_sapi=""
|
||||
for sapi in $SAPIS ; do
|
||||
if use $sapi ; then
|
||||
first_sapi=$sapi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Makefile forgets to create this before trying to write to it...
|
||||
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
|
||||
|
||||
# Install php environment (without any sapis)
|
||||
cd "${WORKDIR}/sapis-build/$first_sapi" || die
|
||||
emake INSTALL_ROOT="${D}" \
|
||||
install-build install-headers install-programs
|
||||
|
||||
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
|
||||
|
||||
# Create the directory where we'll put version-specific php scripts
|
||||
keepdir "/usr/share/php${PHP_MV}"
|
||||
|
||||
local sapi="", file=""
|
||||
local sapi_list=""
|
||||
|
||||
for sapi in ${SAPIS}; do
|
||||
if use "${sapi}" ; then
|
||||
einfo "Installing SAPI: ${sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${sapi}" || die
|
||||
|
||||
if [[ "${sapi}" == "apache2" ]] ; then
|
||||
# We're specifically not using emake install-sapi as libtool
|
||||
# may cause unnecessary relink failures (see bug #351266)
|
||||
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
|
||||
newins ".libs/libphp${PHP_MV}$(get_libname)" \
|
||||
"libphp${PHP_MV}$(get_libname)"
|
||||
keepdir "/usr/$(get_libdir)/apache2/modules"
|
||||
else
|
||||
# needed each time, php_install_ini would reset it
|
||||
local dest="${PHP_DESTDIR#${EPREFIX}}"
|
||||
into "${dest}"
|
||||
case "$sapi" in
|
||||
cli)
|
||||
source="sapi/cli/php"
|
||||
;;
|
||||
cgi)
|
||||
source="sapi/cgi/php-cgi"
|
||||
;;
|
||||
fpm)
|
||||
source="sapi/fpm/php-fpm"
|
||||
;;
|
||||
embed)
|
||||
source="libs/libphp${PHP_MV}$(get_libname)"
|
||||
;;
|
||||
phpdbg)
|
||||
source="sapi/phpdbg/phpdbg"
|
||||
;;
|
||||
*)
|
||||
die "unhandled sapi in src_install"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
||||
dolib.so "${source}"
|
||||
else
|
||||
dobin "${source}"
|
||||
local name="$(basename ${source})"
|
||||
dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
|
||||
fi
|
||||
fi
|
||||
|
||||
php_install_ini "${sapi}"
|
||||
|
||||
# construct correct SAPI string for php-config
|
||||
# thanks to ferringb for the bash voodoo
|
||||
if [[ "${sapi}" == "apache2" ]]; then
|
||||
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
|
||||
else
|
||||
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Installing opcache module
|
||||
if use opcache ; then
|
||||
into "${PHP_DESTDIR#${EPREFIX}}"
|
||||
dolib.so "modules/opcache$(get_libname)"
|
||||
fi
|
||||
|
||||
# Install env.d files
|
||||
newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
|
||||
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
||||
sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
||||
|
||||
# set php-config variable correctly (bug #278439)
|
||||
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
|
||||
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
|
||||
|
||||
if use fpm ; then
|
||||
if use systemd; then
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at.service" \
|
||||
"php-fpm@${SLOT}.service"
|
||||
else
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
|
||||
"php-fpm@${SLOT}.service"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
||||
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
|
||||
if [[ ! -x "${PHP_BIN}" ]] ; then
|
||||
ewarn "Test phase requires USE=cli, skipping"
|
||||
return
|
||||
else
|
||||
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
|
||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
|
||||
export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
|
||||
fi
|
||||
|
||||
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
|
||||
"session.save_path=${T}" \
|
||||
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
|
||||
"session.save_path=${T}"
|
||||
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
|
||||
done
|
||||
|
||||
local failed="$(find -name '*.out')"
|
||||
if [[ ${failed} != "" ]] ; then
|
||||
ewarn "The following test cases failed unexpectedly:"
|
||||
for name in ${failed}; do
|
||||
ewarn " ${name/.out/}"
|
||||
done
|
||||
else
|
||||
einfo "No unexpected test failures, all fine"
|
||||
fi
|
||||
|
||||
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
|
||||
local passed=""
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
[[ -f "${name}.diff" ]] && continue
|
||||
passed="${passed} ${name}"
|
||||
done
|
||||
if [[ ${passed} != "" ]] ; then
|
||||
einfo "The following test cases passed unexpectedly:"
|
||||
for name in ${passed}; do
|
||||
ewarn " ${passed}"
|
||||
done
|
||||
else
|
||||
einfo "None of the known-to-fail tests passed, all fine"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Output some general info to the user
|
||||
if use apache2 ; then
|
||||
elog
|
||||
elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
|
||||
elog "your apache2 command. OpenRC users can append that string to"
|
||||
elog "APACHE2_OPTS in /etc/conf.d/apache2."
|
||||
elog
|
||||
elog "The apache module configuration file 70_mod_php.conf is"
|
||||
elog "provided (and maintained) by eselect-php."
|
||||
elog
|
||||
fi
|
||||
|
||||
# Create the symlinks for php
|
||||
for m in ${SAPIS}; do
|
||||
[[ ${m} == 'embed' ]] && continue;
|
||||
if use $m ; then
|
||||
local ci=$(eselect php show $m)
|
||||
if [[ -z $ci ]]; then
|
||||
eselect php set $m php${SLOT} || die
|
||||
einfo "Switched ${m} to use php:${SLOT}"
|
||||
einfo
|
||||
elif [[ $ci != "php${SLOT}" ]] ; then
|
||||
elog "To switch $m to use php:${SLOT}, run"
|
||||
elog " eselect php set $m php${SLOT}"
|
||||
elog
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove dead symlinks for SAPIs that were just disabled. For
|
||||
# example, if the user has the cgi SAPI enabled, then he has an
|
||||
# eselect-php symlink for it. If he later reinstalls PHP with
|
||||
# USE="-cgi", that symlink will break. This call to eselect is
|
||||
# supposed to remove that dead link per bug 572436.
|
||||
eselect php cleanup || die
|
||||
|
||||
if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
|
||||
elog "To build extensions for this version of PHP, you will need to"
|
||||
elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
|
||||
elog
|
||||
fi
|
||||
|
||||
# Warn about the removal of PHP_INI_VERSION if the user has it set.
|
||||
if [[ -n "${PHP_INI_VERSION}" ]]; then
|
||||
ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
|
||||
ewarn 'remove it from your configuration at your convenience. See'
|
||||
ewarn
|
||||
ewarn ' https://bugs.gentoo.org/611214'
|
||||
ewarn
|
||||
ewarn 'for more information.'
|
||||
fi
|
||||
|
||||
elog "For details on how version slotting works, please see"
|
||||
elog "the wiki:"
|
||||
elog
|
||||
elog " https://wiki.gentoo.org/wiki/PHP"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
# This serves two purposes. First, if we have just removed the last
|
||||
# installed version of PHP, then this will remove any dead symlinks
|
||||
# belonging to eselect-php. Second, if a user upgrades slots from
|
||||
# (say) 5.6 to 7.0 and depcleans the old slot, then this will update
|
||||
# his existing symlinks to point to the new 7.0 installation. The
|
||||
# latter is bug 432962.
|
||||
#
|
||||
# Note: the eselect-php package may not be installed at this point,
|
||||
# so we can't die() if this command fails.
|
||||
eselect php cleanup
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
--- a/libpolyml/polyffi.cpp 2019-04-05 23:10:23.509729312 +0200
|
||||
+++ b/libpolyml/polyffi.cpp 2019-04-05 23:10:38.895485058 +0200
|
||||
@@ -89,7 +89,6 @@
|
||||
// Unfortunately the ABI entries are enums rather than #defines so we
|
||||
// can't test individual entries.
|
||||
#ifdef X86_WIN32
|
||||
- {"sysv", FFI_SYSV},
|
||||
{"stdcall", FFI_STDCALL},
|
||||
{"thiscall", FFI_THISCALL},
|
||||
{"fastcall", FFI_FASTCALL},
|
||||
@@ -97,7 +96,6 @@
|
||||
#elif defined(X86_WIN64)
|
||||
{"win64", FFI_WIN64},
|
||||
#elif defined(X86_ANY)
|
||||
- {"sysv", FFI_SYSV},
|
||||
{"unix64", FFI_UNIX64},
|
||||
#endif
|
||||
{ "default", FFI_DEFAULT_ABI}
|
Binary file not shown.
@ -1,5 +1,6 @@
|
||||
DIST cudnn-10.0-linux-x64-v7.4.1.5.tgz 422699128 BLAKE2B e13b22428f011a4ad6532bfa35d836f23ea6298ad220eaea6c3a6fac7694f1c6b6920255690fac10d84388fb2bec7cc60a0319bd1816b20eac134c7b112822b9 SHA512 fd065c23b27416e2ace5f0eee854ea4a5e04f6ab4cf3a38cf806bb37a45d29756c3f138dfa01b991e96410de3668e0bb9d3cfc19cb7da7113c1f10d4147fcf67
|
||||
DIST cudnn-10.0-linux-x64-v7.4.2.24.tgz 424488399 BLAKE2B 9883cccf146e3ca3a05b8e7ebb2d265da3b7e05949ebb76369a865aa1c2c55c217b21a7847417264712882cc882b25380e5978e58c74279eb208ec593d85e919 SHA512 1e1533a62355bbebc3df62b4c0f306195c7301334390511fae2e0f071d58451edda69b72c3a257fd16470fe3ac5d3ec00aaf208dee2e30d7db0c1f9300a9c663
|
||||
DIST cudnn-10.1-linux-x64-v7.5.0.56.tgz 471291852 BLAKE2B 966a84e983631c827d7852e1dee0a87d80b61521a3c7c836c746f6ce5b60afb1da955a692dce5f0166600707c1f060231d7062d78acdf6085deb37c023301b8d SHA512 875e50669f7ab0b8f52e793285041c0a33dfc951a562869258dd22f85c94cc924c87325253f39fa64c4386768eafd3b0fe181188ef6dd5707f57fc88a6495e36
|
||||
DIST cudnn-8.0-linux-x64-v6.0.tgz 201134139 BLAKE2B a7e616c671272a3a0f0c51b93646c8c60302c3dec85b71144e011bc3460d0ce80ff75d39869c05c4ef183d2d09aff31bb470a3fd3fd3d79b581a7a2d5a349279 SHA512 ddeeacb5b449920d942a26b98c353d78fd6f7d7fb3b3ce42a078626473efdda25c7ae641232702d62eb5749e39ecfd03e88346119c920c19348ac3ee82d3ff47
|
||||
DIST cudnn-9.1-linux-x64-v7.tgz 343081241 BLAKE2B 22c2fbef38a05e7929ccc28410dfdbff906b2c3e97e0419cf83988c2fc2340005e4a944d43b1a215b0c3458b2cad03480b7e537ae93861924c28ec1010a530fb SHA512 7eadb64a3d5e49aec2761e6f7dc0295c1d356910b114eed450c47081fc81b6e3b7748f3a4153f6a9d957691e3689cd52823bfa12816b1950dfc8794d6f332749
|
||||
DIST cudnn-9.2-linux-x64-v7.1.tgz 421083972 BLAKE2B 1a1dd6708132d6ad6f8f541694b1406de4a26b7bb78b6198bc8ec5ddde2172d0cc0dc540c7c446a2f941ad11cfafa562235d17129ab8e6aa641433c35c8d31d6 SHA512 2f67c905976eb041512eb012a7cc98e1f408ec867f6a1d9d440afbcddc622c03c40de10386e44e4ab138c1a4ad040d39b0e9243f68e22975ca27ec297be25c5d
|
||||
|
@ -0,0 +1,34 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
CUDA_PV=10.1
|
||||
|
||||
DESCRIPTION="NVIDIA Accelerated Deep Learning on GPU library"
|
||||
HOMEPAGE="https://developer.nvidia.com/cuDNN"
|
||||
|
||||
MY_PV_MAJOR=$(ver_cut 1-2)
|
||||
SRC_URI="cudnn-${CUDA_PV}-linux-x64-v${PV}.tgz"
|
||||
|
||||
SLOT="0/7"
|
||||
KEYWORDS="~amd64 ~amd64-linux"
|
||||
RESTRICT="fetch"
|
||||
LICENSE="NVIDIA-cuDNN"
|
||||
QA_PREBUILT="*"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
DEPEND="=dev-util/nvidia-cuda-toolkit-${CUDA_PV}*"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_install() {
|
||||
insinto /opt/cuda
|
||||
doins cuda/NVIDIA_SLA_cuDNN_Support.txt
|
||||
|
||||
insinto /opt/cuda/targets/x86_64-linux/include
|
||||
doins -r cuda/include/*
|
||||
|
||||
insinto /opt/cuda/targets/x86_64-linux/lib
|
||||
doins -r cuda/lib*/*
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
DIST ell-0.16.tar.xz 409716 BLAKE2B 64dddac470f7de3384886a8790fcf429b7a254e86c22b50fd4045c551aa0d8d7569f93c8d8b5b472f880fb87fa6ce9830a544b83ae237774e5f8236a1bf1b033 SHA512 bf2b4c8b50841ce8eb5e90ab9fd76f0e8fa1993e7dab0a45a50c21f33537fd110f0bbf1326c6e4cefeb6b95b8db5874c2802ec957b47173fe3681f2522fa5816
|
||||
DIST ell-0.17.tar.xz 434024 BLAKE2B 1e6b1917d897eeb4d1308db388accad26077ec1f39b9fdd5fea7c79926d5b3eaa51178d0af9089a2614225f26188fc2c380ec5b1116c321658edac9a4c0573be SHA512 5ca82bf3dbfacb7770fe1132ec3d93d7ebd139f1781157f1def8d810b21c84b212c555c981f7b80152e49e0da0a82b46fbd6322aadc25c56f26c21065a8886ef
|
||||
DIST ell-0.18.tar.xz 439368 BLAKE2B 9e65ed73119f322fea7177771d21e46ce9ad7d4060e50d8850451939a66bc82dcc1731ddff56458f4cd60c1b6b82b5023bb96adaf3992d3ec982ed845283c8dd SHA512 cc62d01ffaa11a491d1a3ab2898da001f0a418b968350c2bdba2f381df931e53c4281cc4287937264eee72da263844886816af9baea96d7f65309b3e47e42d31
|
||||
DIST ell-0.9.tar.xz 396968 BLAKE2B 566735cedd3525c4fd3fec9cec0e9b089dd60c6b79416a9c254c771729b6db9137af050f4c7f9c4c6dfa1ce33b8c7d41b877c9e3caa582c6ab9be716bd986a8b SHA512 e1208066012b9ff927baae271f94116376ccd2577d7f6510cc1444eee912988aa1c25e8e8c9195cccfa39ed48fc8c2f07bd7a414719e6ce76ee1e5bd2a64b8c3
|
||||
|
@ -0,0 +1,46 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit flag-o-matic multilib-minimal
|
||||
|
||||
DESCRIPTION="Embedded Linux Library provides core, low-level functionality for system daemons"
|
||||
HOMEPAGE="https://01.org/ell"
|
||||
if [[ "${PV}" == *9999 ]] ; then
|
||||
inherit autotools git-r3
|
||||
EGIT_REPO_URI="https://git.kernel.org/pub/scm/libs/ell/ell.git"
|
||||
else
|
||||
SRC_URI="https://mirrors.edge.kernel.org/pub/linux/libs/${PN}/${P}.tar.xz"
|
||||
KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
|
||||
fi
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
|
||||
IUSE="glib pie"
|
||||
|
||||
RDEPEND="
|
||||
glib? ( dev-libs/glib:2[${MULTILIB_USEDEP}] )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
[[ "${PV}" == *9999 ]] && eautoreconf
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
append-cflags "-fsigned-char" #662694
|
||||
local myeconfargs=(
|
||||
$(use_enable glib)
|
||||
$(use_enable pie)
|
||||
)
|
||||
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
local DOCS=( ChangeLog README )
|
||||
einstalldocs
|
||||
|
||||
find "${ED}" -name "*.la" -delete || die
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST librdkafka-0.11.5.tar.gz 1984510 BLAKE2B 55a27482275726233b5c9b39dfac1b9f34235c68600b5720c1a9dec782de6a4d7d084ad71e50857c32a93b39beacc891933e02f45162d0de144ecaadb3640c41 SHA512 4a8dc46ad66f23cff4d4ef2fc8daa7207bfa3e77fd3580b3f141a73b449e60ea5381e97263235b4d0d762df027a8a2cad08637d88162d9605c82d74a1e64b67c
|
||||
DIST librdkafka-0.11.6.tar.gz 1994337 BLAKE2B 7b61e6ba02c5ed58c20e604d6765f6a57ff63ab0c61f2a4c64eff55bfb6c854ef089ac9eea9acc6d44b6abdb6d1425ff23e9d4e6037c733bc5719d6b69c74ae0 SHA512 9657dc53220bbff3eb44941cff2f50ab7f71a82f7486d64ea14f67eabd4abe8c67f225a752cc1f0339439a1cc512e99ade6536d087857979cd198c0102015718
|
||||
DIST librdkafka-1.0.0.tar.gz 2465603 BLAKE2B 7006dc421ae5c2c991853f4ede9d99e7dd308b49372a7c2c859ecc0e6ee7aa3b6cda9af7a71a5813610630b564bd65c6cf18ecaefd1a1880545838d7758aea88 SHA512 15ac1e4c9042debf8d4df602ccdc5eccae3a37b305be24d724fcaffc3d1d0aafa708fc8e29d6af51f51ed6c7daf74b3041b8b9b0444e6702cd73479c8078859a
|
||||
|
@ -0,0 +1,71 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="Apache Kafka C/C++ client library"
|
||||
HOMEPAGE="https://github.com/edenhill/librdkafka"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/edenhill/${PN}.git"
|
||||
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://github.com/edenhill/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="BSD-2"
|
||||
|
||||
# subslot = soname version
|
||||
SLOT="0/1"
|
||||
|
||||
IUSE="lz4 sasl ssl static-libs"
|
||||
|
||||
RDEPEND="
|
||||
lz4? ( app-arch/lz4:=[static-libs(-)?] )
|
||||
sasl? ( dev-libs/cyrus-sasl:= )
|
||||
ssl? ( dev-libs/openssl:0= )
|
||||
sys-libs/zlib
|
||||
"
|
||||
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
src_configure() {
|
||||
tc-export CC CXX LD NM OBJDUMP PKG_CONFIG STRIP
|
||||
|
||||
local myeconf=(
|
||||
--no-cache
|
||||
--no-download
|
||||
--disable-debug-symbols
|
||||
$(use_enable lz4)
|
||||
$(use_enable sasl)
|
||||
$(usex static-libs '--enable-static' '')
|
||||
$(use_enable ssl)
|
||||
)
|
||||
|
||||
econf ${myeconf[@]}
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake -C tests run_local
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local DOCS=(
|
||||
README.md
|
||||
CONFIGURATION.md
|
||||
INTRODUCTION.md
|
||||
)
|
||||
|
||||
default
|
||||
|
||||
if ! use static-libs; then
|
||||
find "${ED}"/usr/lib* -name '*.la' -o -name '*.a' -delete || die
|
||||
fi
|
||||
}
|
Binary file not shown.
@ -0,0 +1,26 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
PHP_EXT_NAME="${PN}"
|
||||
PHP_EXT_INI="yes"
|
||||
PHP_EXT_ZENDEXT="no"
|
||||
DOCS=( CREDITS NEWS README.md )
|
||||
PHP_EXT_ECONF_ARGS=( --enable-${PN} )
|
||||
|
||||
USE_PHP="php7-1 php7-2 php7-3"
|
||||
|
||||
inherit php-ext-source-r3
|
||||
|
||||
KEYWORDS="~amd64 ~arm ~x86"
|
||||
|
||||
DESCRIPTION="A fast drop-in replacement for the standard PHP serialize"
|
||||
HOMEPAGE="https://github.com/igbinary/igbinary"
|
||||
SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
@ -1,2 +1,3 @@
|
||||
DIST mailparse-2.1.6.tgz 36538 BLAKE2B c079a5f9980384ea90113d3e295b3de4182c8c3006a62439bfb73ab39dc67bb03202298e7bf5e42f71d599d645cf4d79fbf2d09a536e621efe73f8fff6bce56a SHA512 a7337dd2e99a953a55b38c236da95a6bd2950c2bca16fc0ddfec39be8b0ffe01007353fc7b562d0509e0bb1623c3d2b03935d1c98a07dcd9f0b14bb508bce374
|
||||
DIST mailparse-3.0.2.tgz 38206 BLAKE2B f50b3f5abfc6e2e5a3647eb33ad07de9e3e66a94933be612a51c868210745b109ddca8e3e174a7a4abcfdc72856f34848e65972b277cfa3e836bef3ee4c79897 SHA512 be04e15cf3577542447186d7ead4e31159c171c99de0a255d4ee2f6f760b80ecb44be056bd9089180601f622b9a71f4331f194e1adaa702d1d964009682896f6
|
||||
DIST mailparse-3.0.3.tgz 940370 BLAKE2B 1454750a90e367a2c9ade2d689a0bd3290005db170e6c2f601c23790fd5de701061b8a9cd0dea64eb501e44b3d0a3e40ff75a58ce5bb633837bad682979c097c SHA512 8bc99cb1a3331ee5d40076abe20a15870deb6e28e2b0adb6227a36a01999648a9341168e05f1db96d2458394a13cad643ee1c5dce4d15669165d01c29d95417b
|
||||
|
@ -0,0 +1,49 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PHP_EXT_NAME="mailparse"
|
||||
PHP_EXT_INI="yes"
|
||||
PHP_EXT_ZENDEXT="no"
|
||||
PHP_EXT_ECONF_ARGS=""
|
||||
DOCS=( README.md )
|
||||
|
||||
USE_PHP="php7-0 php7-1 php5-6 php7-2 php7-3"
|
||||
|
||||
inherit php-ext-pecl-r3
|
||||
|
||||
# Only build for 7.x
|
||||
USE_PHP="php7-0 php7-1 php7-2 php7-3"
|
||||
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
|
||||
|
||||
DESCRIPTION="PHP extension for parsing and working with RFC822 and MIME compliant messages"
|
||||
LICENSE="PHP-3.01"
|
||||
SLOT="7"
|
||||
IUSE=""
|
||||
|
||||
PHPUSEDEPEND="
|
||||
php_targets_php7-0? ( dev-lang/php:7.0[unicode] )
|
||||
php_targets_php7-1? ( dev-lang/php:7.1[unicode] )
|
||||
php_targets_php7-2? ( dev-lang/php:7.2[unicode] )
|
||||
"
|
||||
DEPEND="${PHPUSEDEPEND}
|
||||
dev-util/re2c"
|
||||
RDEPEND="${PHPUSEDEPEND} php_targets_php5-6? ( dev-php/pecl-mailparse:0[php_targets_php5-6] )"
|
||||
|
||||
src_prepare() {
|
||||
if use php_targets_php7-0 || use php_targets_php7-1 || use php_targets_php7-2 ; then
|
||||
# Missing test source files in archive. Fixed upstream in next release.
|
||||
rm tests/011.phpt tests/bug001.phpt || die
|
||||
php-ext-source-r3_src_prepare
|
||||
else
|
||||
default
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use php_targets_php7-0 || use php_targets_php7-1 || use php_targets_php7-2 ; then
|
||||
php-ext-pecl-r3_src_install
|
||||
fi
|
||||
}
|
Binary file not shown.
@ -0,0 +1,75 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
PYTHON_COMPAT=( python3_{5,6,7} )
|
||||
|
||||
if [ "${PV}" == "9999" ]; then
|
||||
inherit distutils-r1 git-r3
|
||||
EGIT_REPO_URI="https://github.com/python/${PN}"
|
||||
SRC_URI=""
|
||||
else
|
||||
inherit distutils-r1
|
||||
TYPESHED_COMMIT="f7c00b8"
|
||||
SRC_URI="https://github.com/python/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
https://api.github.com/repos/python/typeshed/tarball/${TYPESHED_COMMIT} -> mypy-typeshed-${PV}-${TYPESHED_COMMIT}.tar.gz"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Optional static typing for Python"
|
||||
HOMEPAGE="http://www.mypy-lang.org/"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="doc test"
|
||||
|
||||
DEPEND="
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/flake8[${PYTHON_USEDEP}] )
|
||||
doc? (
|
||||
dev-python/sphinx[${PYTHON_USEDEP}]
|
||||
dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
CDEPEND="
|
||||
!dev-util/stubgen
|
||||
>=dev-python/psutil-5.4.0[${PYTHON_USEDEP}]
|
||||
<dev-python/psutil-5.5.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/typed-ast-1.3.1[${PYTHON_USEDEP}]
|
||||
<dev-python/typed-ast-1.4.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/mypy_extensions-0.4.0[${PYTHON_USEDEP}]
|
||||
<dev-python/mypy_extensions-0.5.0[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
if [ "${PV}" == "9999" ]; then
|
||||
git-r3_src_unpack
|
||||
else
|
||||
unpack ${A}
|
||||
rmdir "${S}/mypy/typeshed"
|
||||
mv "${WORKDIR}/python-typeshed-${TYPESHED_COMMIT}" "${S}/mypy/typeshed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
sed -i -e 's/mypy_extensions >= 0.4.0, < 0.5.0/mypy_extensions >= 0.4.0, < 0.6.0/' "${S}/setup.py"
|
||||
default
|
||||
}
|
||||
|
||||
python_compile_all() {
|
||||
use doc && emake -C docs html
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local PYTHONPATH="$(pwd)"
|
||||
|
||||
"${PYTHON}" runtests.py || die "tests failed under ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && local HTML_DOCS=( docs/build/html/. )
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} pypy{,3} )
|
||||
PYTHON_REQ_USE="xml(+)"
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/pypa/setuptools.git"
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Collection of extensions to Distutils"
|
||||
HOMEPAGE="https://github.com/pypa/setuptools https://pypi.org/project/setuptools/"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
app-arch/unzip
|
||||
test? (
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
dev-python/pip[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytest-3.7.0[${PYTHON_USEDEP}]
|
||||
<dev-python/pytest-4
|
||||
dev-python/pytest-fixture-config[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-virtualenv[${PYTHON_USEDEP}]
|
||||
dev-python/wheel[${PYTHON_USEDEP}]
|
||||
virtual/python-futures[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
PDEPEND="
|
||||
>=dev-python/certifi-2016.9.26[${PYTHON_USEDEP}]"
|
||||
|
||||
# Force in-source build because build system modifies sources.
|
||||
DISTUTILS_IN_SOURCE_BUILD=1
|
||||
|
||||
DOCS=( {CHANGES,README}.rst docs/{easy_install.txt,pkg_resources.txt,setuptools.txt} )
|
||||
|
||||
python_prepare_all() {
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
python_setup
|
||||
${EPYTHON} bootstrap.py || die
|
||||
fi
|
||||
|
||||
# disable tests requiring a network connection
|
||||
rm setuptools/tests/test_packageindex.py || die
|
||||
|
||||
# don't run integration tests
|
||||
rm setuptools/tests/test_integration.py || die
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_test() {
|
||||
# test_easy_install raises a SandboxViolation due to ${HOME}/.pydistutils.cfg
|
||||
# It tries to sandbox the test in a tempdir
|
||||
HOME="${PWD}" pytest -vv ${PN} || die "Tests failed under ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install() {
|
||||
export DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT=1
|
||||
distutils-r1_python_install
|
||||
}
|
Binary file not shown.
@ -1,2 +1,3 @@
|
||||
DIST backports-3.11.4.gem 157696 BLAKE2B 0c341380e350a61fac7ad09a2425598214945f1ecb26abf8f17494a2fc6ee256ee20517555bfde433cd2f564fd1148211c2cfd1c16d21ecbe574492837f610ef SHA512 bbc2afae9b40d2e3b14e46321200fb5e8290a2494a86187939e8e51b4a960b62aec55bee3ee37da4ece3d575a50653e63b950915eaedff745125ab39926765ad
|
||||
DIST backports-3.12.0.gem 151040 BLAKE2B 476332d9f684b66609863ba5e2146676acfc1ceedfca7155b421d6aaef0e934a477952f3c8a4805e38d98a74af564453b73f4f17be28abf35abcbafb5553852c SHA512 13a3749e9d223518dd78544a4f3db9a14422d633116a5d4a4b024ef72df80c44751e8068db7b5fa785eebd4a0cfdb0ec5e36749fc42ac0410d88daa439ea4e64
|
||||
DIST backports-3.8.0.gem 146944 BLAKE2B 20798893f692d69cdf39d64f1f5568bb74780875ca9c6a36e788ea44c46d133aa954f2882b3802a2c483ee486d1ea3ef968db397914191273978e40ac1ae0bda SHA512 898472ee88dd0df46067de12ef38bb033b270573ff09db99982336b9eb264c90003e6e150101f7fc0034998961d81eac7b2f72e1e843e0a7e683b6b98980153f
|
||||
|
@ -0,0 +1,23 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
USE_RUBY="ruby24 ruby25 ruby26"
|
||||
RUBY_FAKEGEM_RECIPE_DOC="rdoc"
|
||||
RUBY_FAKEGEM_TASK_TEST="test"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="Backports of Ruby features for older Ruby"
|
||||
HOMEPAGE="https://github.com/marcandre/backports"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE=""
|
||||
|
||||
all_ruby_prepare() {
|
||||
# Avoid activesupport test that no longer works in Rails 5. This also avoids
|
||||
# a dependency on activesupport
|
||||
sed -i -e '/test_rails/,/^ end/ s:^:#:' test/_backport_guards_test.rb || die
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST bcrypt_pbkdf-1.0.0.gem 24576 BLAKE2B 0d5b1d90d57dbae986fcbb92cabb0ea598d6b928dc97026e8d2078f41898e0c143544a004a561c0a392504baa4b845a27f9c1e19c369f6342f7ace9de7f04d3f SHA512 b582407617633f5277cde9251ed1fd2ca408ae8bd19cc73f107d7932bed38061dc0099d3033ff5def1b586507392c33d8c50815fb156322f0dd08fbbe4a8e967
|
||||
DIST bcrypt_pbkdf-1.0.1.gem 24576 BLAKE2B 7ccade2b5eeabcdcffe5c53bf8ed2e4163536229b7ccd356e173c0b2a27c720aa5429ea0081d2a3e7e7cfc52613c32a48529233156b56db4bbd48da61bbd9cdf SHA512 7caf65dc48ec9d51dbde7741b0960e2606129f888787db31fe36f3cf103d51f06156e942badb10310faa8ca9dcf8f7f8dd86358431942a6e2097714ae3462dee
|
||||
|
@ -0,0 +1,41 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
|
||||
USE_RUBY="ruby23 ruby24 ruby25 ruby26"
|
||||
|
||||
RUBY_FAKEGEM_RECIPE_DOC="rdoc"
|
||||
RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="Implements bcrypt_pdkfd (a variant of PBKDF2 with bcrypt-based PRF)"
|
||||
HOMEPAGE="https://github.com/net-ssh/bcrypt_pbkdf-ruby"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="1"
|
||||
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
ruby_add_bdepend "test? ( virtual/ruby-ssl )"
|
||||
|
||||
all_ruby_prepare() {
|
||||
# Don't use a ruby-bundled version of libsodium
|
||||
sed -i -e '/rbnacl\/libsodium/ s:^:#:' test/bcrypt_pnkdf/engine_test.rb || die
|
||||
|
||||
# Avoid unneeded rake-compiler dependency
|
||||
sed -i -e '/extensiontask/ s:^:#:' -e '/ExtensionTask/,/^end/ s:^:#:' Rakefile || die
|
||||
}
|
||||
|
||||
each_ruby_configure() {
|
||||
${RUBY} -Cext/mri extconf.rb || die
|
||||
|
||||
# Some methods may not be inlined on x86 but they are not defined either, bug 629164
|
||||
sed -i -e 's:-Wl,--no-undefined::' ext/mri/Makefile || die
|
||||
}
|
||||
|
||||
each_ruby_compile() {
|
||||
emake V=1 -Cext/mri
|
||||
cp ext/mri/bcrypt_pbkdf_ext.so lib/ || die
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
DIST parser-2.5.1.2.gem 654336 BLAKE2B bc6960730337d39d60fc63d6da15023c31986230260358bb64b172d06978ec7fd7cd031e1c9db3cf8a04c96c87b034d8043351c3ee4875402ff8fbac7bcc217c SHA512 d7c06cdf77c2efcedd656dc541ca5f4cd80e3c7c16977a87ce29d51515f4d724ec6bdc3367527d14d93b8339e64103b3cb757dbc2f8731b8941aa6ee4ff838d8
|
||||
DIST parser-2.5.3.0.gem 654336 BLAKE2B dff1b0e0b593a5603f1b0fd9c39f59b6126ad9575d8c077d5a7e2feb16e6f9ef72321a3c7d3a0c21e2f7c26446132c8c30120785390f2b450a0f42a1b2d11128 SHA512 3721b5064ebd9a7de4e50f299001f1640ecdb27b99d932f0a509b89c0b5bf2b337b0298466e6267c61d2b5fcf2e556e0d1a10f6c29dc6f64bd042667f9d79d5b
|
||||
DIST parser-2.6.0.0.gem 655360 BLAKE2B 83b6814ad2b812fa89b1885d1362dbfc900df31998603672d6ade0e67cce6d82ddb18face2ed6b498c901cd4b27d002a34ef90187d8a1ccbfef48c7fa154f489 SHA512 34a5a0ff8d400644bf907d0959dd63ad6ce7cccdbd4842c8009d1b8a520ea87d5a8a61886d386d0490a2d266ca7897aceb725335e7ab88d757c6795b193c8ef2
|
||||
DIST parser-2.6.2.0.gem 701952 BLAKE2B 5c9fd1479c7bf95e43877a39c07697b766452bd9d712b140a313384adc50356949479f6a24e6d0dcba5238d8281cba952aed97ed002142c084fc73a64e96c3ec SHA512 c729767d8d2e7ddf293e6945226e219e297862a39bb22c52be0ae02e288cdf1a468cf372caef48cb858cd130b407e531efe9b1462a169c1f8ad3f3e56085e4ca
|
||||
DIST parser-2.6.2.1.gem 701952 BLAKE2B bce964f69d80b8385e1c3c5f7fb3b549b418536cf2b617bf278d776878da516c6922553e66cbd0ba7e26b8d4253a138e15f61fa602639cf639f74e1f0521b0f6 SHA512 339e3a3c4eb6d1d7b2008d7aa49a7857f06e767a23b148a68edd2509b3540a442ea6c62fcab2dce72416b15a7b80e448546589b0e82105a83514c66496edc636
|
||||
|
@ -1,32 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
USE_RUBY="ruby23 ruby24 ruby25"
|
||||
|
||||
RUBY_FAKEGEM_RECIPE_DOC="yard"
|
||||
RUBY_FAKEGEM_TASK_TEST="test"
|
||||
RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md"
|
||||
|
||||
RUBY_FAKEGEM_VERSION="${PV/_pre/.pre.}"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="A production-ready Ruby parser written in pure Ruby"
|
||||
HOMEPAGE="https://github.com/whitequark/parser"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
|
||||
ruby_add_bdepend "test? (
|
||||
dev-ruby/minitest:5
|
||||
dev-ruby/racc
|
||||
dev-ruby/cliver )"
|
||||
ruby_add_rdepend "=dev-ruby/ast-2.4*"
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -i -e "/[Bb]undler/d" Rakefile || die
|
||||
sed -i -e '/simplecov/ s:^:#:' test/helper.rb || die
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
DIST pkg-config-1.2.8.gem 20480 BLAKE2B cc11b5eff30f0f5e1a91e64902931ed540da108fd326fe731b71527c9c4310f55e9002617e1baae4f71a4b705b20cf10f6fa112f8ef56971e82868145d372a47 SHA512 d83a599a48c7d404946054c6846b6cfd9fce2a264c288519a6eccd9787f05d45397dd46300bf97c80700921456318154ea6d44ba32cd159803471073c2a2b065
|
||||
DIST pkg-config-1.3.2.gem 20992 BLAKE2B 53881385d6751fb77b91428aeac553863d97c1792c30194733fdfc48746dde2178d2e3ad30157ae0061a16e7c0e094fae4fadb3148b4c9c1da0a66e0937d7cd7 SHA512 19f3ba9eaf8e81504ead9445a735e1afbb1726be8671e5146f31e31ad311b34ed17a5c01769aaadc9450667c1f69f14451eed68cfe87339b00f0b87e3e7d592a
|
||||
DIST pkg-config-1.3.3.gem 20992 BLAKE2B 694553ba12025d80a13597b8ab526fdac291badb9ed320e88d5234d56ecfcaf71d27482375aa39bd5262012d7e20be6a080db10733c18e977ff8fa15fd1c4461 SHA512 449bca982c6f367cfdb219848907f9ebabd7b0c41750d6e95a58d627db3a809b01a80846117ce3c7858ec1829ee5de9bbbb4b16184e6f269d56af737954ce207
|
||||
DIST pkg-config-1.3.4.gem 20992 BLAKE2B 3e9ab485f4b375abfc7e90287a11f8c8a65afcad1f296c35db9bd7206064d45961078e5664381b5250716da6f9ceb2ca1433e360f8bf9bc26f569a132df8e7f4 SHA512 c0caf3f0254e2dd64cd258ca7936a26c7c1525922f0e214b67ee09f9b54455077a2dfe23251a5e985685975a6b4597d0dcd4cd3ad19a80866028450fb4bfcbdf
|
||||
DIST pkg-config-1.3.5.gem 20992 BLAKE2B 4b2285f976c2652e1dcc7e5f9454b9e00d489ccb620e89346638014453c1936b516652cf2353375c5611481c7558820f3062a3585b69e242e2e77e51bb7f2594 SHA512 d659d43b0a787961cfb550344311083c7177d2d5b6066c0d0af3ee8edce245235c2b459ac002f645d8be62850a8a2ecda7247e527f7be14fbaa5e71993e7a1b5
|
||||
DIST pkg-config-1.3.6.gem 20992 BLAKE2B dbca483bb35b7b52d6df92f366e7b75e503378248a9b9d5fc78b42d04ccbd89955bc9f50d86d3948154292bda825a26b9e47b3b26510656492e5302ecc084e01 SHA512 c0e44101c52d32113992a1952528faa70e000cf94318d5a29eb52856dc7be670749d2f59bb3601907e4fc136a47eccaf5fc2a713346ca769112e3917bb5402e3
|
||||
DIST pkg-config-1.3.7.gem 20992 BLAKE2B 4927cbe744b88e11ece71e554b07092d671a1b0775aa0c647abab6718c1903b888d98aa97ce5eae89033c13a542e45880b28fc886225c226d6e525c0004ec05f SHA512 cceef2b8f0b92582256660f50be21b446e6ef8ca9edd3c7736d2dbcbf2bf8ab60a1ef8f2fed21448d01ab155fd92fe9a3e8cf1f8bda4f80a8e0a8896f1eedd60
|
||||
|
@ -1,33 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
USE_RUBY="ruby23 ruby24 ruby25 ruby26"
|
||||
|
||||
RUBY_FAKEGEM_EXTRADOC="README.rdoc NEWS"
|
||||
|
||||
RUBY_FAKEGEM_TASK_DOC=""
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="A pkg-config implementation by Ruby"
|
||||
HOMEPAGE="https://github.com/rcairo/pkg-config"
|
||||
LICENSE="|| ( LGPL-2 LGPL-2.1 LGPL-3 )"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
SLOT="0"
|
||||
IUSE="test"
|
||||
|
||||
ruby_add_bdepend "test? ( >=dev-ruby/test-unit-2.5.1-r1 )"
|
||||
# this is used for testing
|
||||
DEPEND+=" test? ( x11-libs/cairo )"
|
||||
|
||||
all_ruby_prepare() {
|
||||
# drop failing tests
|
||||
sed -i -e "/test_cflags/,/end/d"\
|
||||
-e "/test_cflags_only_I/,/end/d" test/test_pkg_config.rb || die
|
||||
}
|
||||
|
||||
each_ruby_test() {
|
||||
ruby-ng_testrb-2 -Ilib test/test_${PN/-/_}.rb || die
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST radius-0.7.4.gem 220160 BLAKE2B 9d5c04c955aa1540a33615e8adcad9b1723c601ea71202bca03aa425966e1a2c361cd88be5e98d6c159e7a2c2cc4cf80e0854a6d9a5d77f515e1853815cf8b5f SHA512 68d28f4bcf7122b729bc92fec8021bd9844407d65e3ee9075c909b1b9fe7e0227ff70c678829b8fc9386b46dbc2983f835486609f74eba99a2511cc43ea78526
|
||||
DIST radius-0.7.5.gem 147456 BLAKE2B c62c06196bc42cd83b7d898744fd655c3332d14348318974de272491eb823861a650b5466958ea5e0b7be2a5a119c75a75a7e6c53975d7099ef1c45d912c7595 SHA512 2e1f94c45bfa23ffbcbc00b7dc6be04d4f085e513554e7a6c4193270ae2bc2ef952dac72e4995b6f7ce43e92363df3ca7e7b183758ccd1f8aafe64f82cacb074
|
||||
|
@ -0,0 +1,23 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
USE_RUBY="ruby23 ruby24 ruby25"
|
||||
|
||||
RUBY_FAKEGEM_EXTRADOC="CHANGELOG QUICKSTART.rdoc README.rdoc"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="Powerful tag-based template system"
|
||||
HOMEPAGE="https://github.com/jlong/radius"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm"
|
||||
IUSE=""
|
||||
|
||||
ruby_add_bdepend "test? ( dev-ruby/kramdown )"
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -i -e "/simplecov/,/end/d" -e "/coveralls/d" test/test_helper.rb || die
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
USE_RUBY="ruby23 ruby24 ruby25 ruby26"
|
||||
|
||||
RUBY_FAKEGEM_TASK_DOC=""
|
||||
RUBY_FAKEGEM_DOCDIR="doc"
|
||||
RUBY_FAKEGEM_EXTRADOC="README.md"
|
||||
|
||||
RUBY_FAKEGEM_EXTRAINSTALL="rails init.rb VERSION VERSION_NAME"
|
||||
|
||||
inherit ruby-fakegem eapi7-ver
|
||||
|
||||
DESCRIPTION="An extension of CSS3, adding nested rules, variables, mixins, and more"
|
||||
HOMEPAGE="https://sass-lang.com/"
|
||||
SRC_URI="https://github.com/sass/ruby-sass/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
RUBY_S="ruby-sass-${PV}"
|
||||
|
||||
LICENSE="MIT"
|
||||
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux"
|
||||
SLOT="$(ver_cut 1-2)"
|
||||
IUSE=""
|
||||
|
||||
ruby_add_bdepend "doc? ( >=dev-ruby/yard-0.5.3 )"
|
||||
|
||||
ruby_add_rdepend "
|
||||
!!<dev-ruby/sass-3.2.19-r1:0
|
||||
!!<dev-ruby/sass-3.4.25-r1:3.4
|
||||
!!<dev-ruby/sass-3.5.7-r1:3.5
|
||||
dev-ruby/sass-listen:4"
|
||||
|
||||
# tests could use `less` if we had it
|
||||
|
||||
all_ruby_prepare() {
|
||||
# Don't require maruku as markdown provider but let yard decide.
|
||||
sed -i -e '/maruku/d' .yardopts || die
|
||||
|
||||
# Keep VERSION_DATE around since we don't create a new package
|
||||
sed -i -e '/at_exit/,/end/ s:^:#:' Rakefile || die
|
||||
}
|
||||
|
||||
each_ruby_test() {
|
||||
RUBOCOP=false ${RUBY} -S rake test:ruby || die
|
||||
}
|
Binary file not shown.
@ -0,0 +1,143 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit check-reqs cuda toolchain-funcs unpacker
|
||||
|
||||
MYD=$(ver_cut 1-2 ${PV})
|
||||
DRIVER_PV="418.39"
|
||||
|
||||
DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)"
|
||||
HOMEPAGE="https://developer.nvidia.com/cuda-zone"
|
||||
SRC_URI="https://developer.nvidia.com/compute/cuda/${MYD}/Prod/local_installers/cuda_${PV}_${DRIVER_PV}_linux.run -> cuda_${PV}_${DRIVER_PV}_linux.run"
|
||||
|
||||
LICENSE="NVIDIA-CUDA"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="-* ~amd64 ~amd64-linux"
|
||||
IUSE="debugger doc eclipse profiler"
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="${DEPEND}
|
||||
<sys-devel/gcc-9[cxx]
|
||||
>=x11-drivers/nvidia-drivers-396.24[X,uvm]
|
||||
debugger? (
|
||||
sys-libs/libtermcap-compat
|
||||
sys-libs/ncurses:5/5[tinfo]
|
||||
)
|
||||
eclipse? ( >=virtual/jre-1.6 )
|
||||
profiler? ( >=virtual/jre-1.6 )"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
QA_PREBUILT="opt/cuda/*"
|
||||
|
||||
CHECKREQS_DISK_BUILD="6100M"
|
||||
|
||||
pkg_setup() {
|
||||
# We don't like to run cuda_pkg_setup as it depends on us
|
||||
check-reqs_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
local cuda_supported_gcc
|
||||
|
||||
cuda_supported_gcc="4.7 4.8 4.9 5.3 5.4 6.3 6.4 7.2 7.3 8.2 8.3"
|
||||
|
||||
sed \
|
||||
-e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \
|
||||
"${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local i remove=( doc jre run_files install-linux.pl cuda-installer.pl )
|
||||
local cudadir=/opt/cuda
|
||||
local ecudadir="${EPREFIX}${cudadir}"
|
||||
|
||||
cd builds/cuda-toolkit
|
||||
if use doc; then
|
||||
DOCS+=( doc/pdf/. )
|
||||
HTML_DOCS+=( doc/html/. )
|
||||
fi
|
||||
einstalldocs
|
||||
|
||||
mv doc/man/man3/{,cuda-}deprecated.3 || die
|
||||
doman doc/man/man*/*
|
||||
|
||||
use debugger || remove+=( bin/cuda-gdb bin/cuda-gdbserver extras/Debugger share/gdb extras/cuda-gdb-${PV}.src.tar.gz )
|
||||
|
||||
if use profiler; then
|
||||
# hack found in install-linux.pl
|
||||
for i in nvvp nsight; do
|
||||
cat > bin/${i} <<- EOF || die
|
||||
#!/usr/bin/env sh
|
||||
LD_LIBRARY_PATH=\${LD_LIBRARY_PATH}:${ecudadir}/lib:${ecudadir}/lib64 \
|
||||
UBUNTU_MENUPROXY=0 LIBOVERLAY_SCROLLBAR=0 \
|
||||
${ecudadir}/lib${i}/${i} -vm ${EPREFIX}/usr/bin/java
|
||||
EOF
|
||||
chmod a+x bin/${i} || die
|
||||
done
|
||||
else
|
||||
use eclipse || remove+=( libnvvp libnsight nsightee_plugins NsightCompute-2019.1 NsightSystems-2018.3 bin/nsight bin/nsight_ee_plugins_manage.sh bin/nvvp bin/computeprof )
|
||||
remove+=( extras/CUPTI bin/nvprof )
|
||||
fi
|
||||
|
||||
for i in "${remove[@]}"; do
|
||||
ebegin "Cleaning ${i}..."
|
||||
rm -rf "${i}" || die
|
||||
eend
|
||||
done
|
||||
|
||||
dodir ${cudadir} || die
|
||||
# Install binaries separately to amke sure the X permission is set
|
||||
into ${cudadir} || die
|
||||
dobin $(find bin nvvm/bin -type f) || die
|
||||
find bin nvvm/bin -type f -delete || die
|
||||
|
||||
# Install the rest
|
||||
insinto ${cudadir} || die
|
||||
doins -r * || die
|
||||
|
||||
cat > "${T}"/99cuda <<- EOF || die
|
||||
PATH=${ecudadir}/bin$(usex profiler ":${ecudadir}/libnvvp" "")
|
||||
ROOTPATH=${ecudadir}/bin
|
||||
LDPATH=${ecudadir}/lib64:${ecudadir}/lib:${ecudadir}/nvvm/lib64
|
||||
EOF
|
||||
doenvd "${T}"/99cuda
|
||||
|
||||
use profiler && \
|
||||
make_wrapper nvprof "${ecudadir}/bin/nvprof" "." "${ecudadir}/lib64:${ecudadir}/lib"
|
||||
|
||||
dobin "${T}"/cuda-config
|
||||
}
|
||||
|
||||
pkg_postinst_check() {
|
||||
local a b
|
||||
a="$(${EROOT%/}/opt/cuda/bin/cuda-config -s)"
|
||||
b="0.0"
|
||||
for v in $a; do
|
||||
if ver_test "${v}" -gt "${b}"; then
|
||||
b="${v}"
|
||||
fi
|
||||
done
|
||||
|
||||
# if gcc and if not gcc-version is at least greatest supported
|
||||
if tc-is-gcc && \
|
||||
ver_test $(gcc-version) -gt ${b}; then
|
||||
ewarn ""
|
||||
ewarn "gcc >= ${b} will not work with CUDA"
|
||||
ewarn "Make sure you set an earlier version of gcc with gcc-config"
|
||||
ewarn "or append --compiler-bindir= pointing to a gcc bindir like"
|
||||
ewarn "--compiler-bindir=${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${b}"
|
||||
ewarn "to the nvcc compiler flags"
|
||||
ewarn ""
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
||||
pkg_postinst_check
|
||||
fi
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
DIST mako-1.2.tar.gz 34443 BLAKE2B d505cbc7d25755ef3880adceaf8e33c277a90583c37ebd2691cd3d8d142f19f7eedca2ad167c0174723706c6f0a9b0688ddb34ed824e8231330265f1b5e3d645 SHA512 2552590f690a9749e9ef897052ca6aecf70eb01d77b1afe21335c84e257c6c8347abbd7f33150d561e8f52a9ae3a91c7a199a93cecf64a305934886522fc1454
|
@ -0,0 +1,46 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit meson
|
||||
|
||||
DESCRIPTION="A lightweight notification daemon for Wayland. Works on Sway."
|
||||
HOMEPAGE="https://github.com/emersion/mako"
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/emersion/${PN}.git"
|
||||
else
|
||||
SRC_URI="https://github.com/emersion/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="
|
||||
dev-libs/wayland
|
||||
x11-libs/pango
|
||||
x11-libs/cairo
|
||||
|| (
|
||||
sys-apps/systemd
|
||||
sys-auth/elogind
|
||||
)
|
||||
sys-apps/dbus[user-session]
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
"
|
||||
BDEPEND="
|
||||
virtual/pkgconfig
|
||||
app-text/scdoc
|
||||
"
|
||||
|
||||
src_configure() {
|
||||
local emesonargs=(
|
||||
"-Dwerror=false"
|
||||
)
|
||||
meson_src_configure
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue