代码拉取完成,页面将自动刷新
同步操作将从 OpenCloudOS Stream/php-pecl-http 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
%undefine _strict_symbol_defs_build
%global proj_name pecl_http
%global pecl_name http
%global with_zts 0%{?__ztsphp:1}
%global ini_name 50-%{pecl_name}.ini
%ifarch %{arm} aarch64
%global with_tests 0%{?_with_tests:1}
%else
%global with_tests 0%{!?_without_tests:1}
%endif
%global upstream_version 4.2.4
%global sources %{proj_name}-%{upstream_version}%{?upstream_prever}
%global _configure ../%{sources}/configure
Name: php-pecl-http
Version: 4.2.4
Release: 2%{?dist}
Summary: Extended HTTP support
License: BSD-2-Clause
URL: https://pecl.php.net/package/pecl_http
Source0: https://pecl.php.net/get/%{sources}.tgz
Source1: %{proj_name}.ini
BuildRequires: make
BuildRequires: gcc
BuildRequires: php-devel >= 8.0
BuildRequires: php-iconv
BuildRequires: php-spl
BuildRequires: php-pear
BuildRequires: zlib-devel >= 1.2.0.4
BuildRequires: curl-devel >= 7.18.2
BuildRequires: libicu-devel
BuildRequires: php-pecl-raphf-devel >= 2
BuildRequires: libevent-devel >= 1.4
BuildRequires: brotli-devel >= 1.0
BuildRequires: pkgconfig
BuildRequires: openssl-devel
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}
Requires: php-iconv
Requires: php-spl
Requires: php-raphf >= 2
Provides: php-pecl(%{proj_name}) = %{version}
Provides: php-pecl(%{proj_name}) = %{version}
Provides: php-pecl(%{pecl_name}) = %{version}
Provides: php-pecl(%{pecl_name}) = %{version}
Provides: php-%{pecl_name} = %{version}
Provides: php-%{pecl_name} = %{version}
%description
The HTTP extension aims to provide a convenient and powerful set of
functionality for major applications.
The HTTP extension eases handling of HTTP URLs, dates, redirects, headers
and messages in a HTTP context (both incoming and outgoing). It also provides
means for client negotiation of preferred language and charset, as well as
a convenient way to exchange arbitrary data with caching and resuming
capabilities.
Also provided is a powerful request and parallel interface.
Version 2 is completely incompatible to previous version.
Documentation : https://mdref.m6w6.name/http
%package devel
Summary: Extended HTTP support developer files (header)
Requires: php-pecl-http = %{version}-%{release}
Requires: php-devel >= 5.3.0
%description devel
These are the files needed to compile programs using HTTP extension.
%prep
%setup -c -q
sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml
cd %{sources}
extver=$(sed -n '/#define PHP_PECL_HTTP_VERSION/{s/.* "//;s/".*$//;p}' php_http.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}%{?gh_date:dev}"; then
: Error: Upstream HTTP version is now ${extver}, expecting %{upstream_version}%{?upstream_prever}%{?gh_date:dev}.
: Update the pdover macro and rebuild.
exit 1
fi
cd ..
cp %{SOURCE1} %{ini_name}
mkdir NTS
%if %{with_zts}
mkdir ZTS
%endif
%build
peclconf() {
%configure \
--with-http \
--with-http-zlib-dir=%{_prefix} \
--with-http-libcurl-dir=%{_prefix} \
--without-http-libidn-dir \
--without-http-libidn2-dir \
--without-http-libidnkit-dir \
--without-http-libidnkit2-dir \
--with-http-libicu-dir=%{_prefix} \
--with-http-libevent-dir=%{_prefix} \
--with-http-libbrotli-dir=%{_prefix} \
--with-libdir=%{_lib} \
--with-php-config=$1
grep IDNA config.h
}
cd %{sources}
%{__phpize}
cd ../NTS
peclconf %{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
peclconf %{__ztsphpconfig}
make %{?_smp_mflags}
%endif
%install
make -C NTS install INSTALL_ROOT=%{buildroot}
install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
install -Dpm644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
%if %{with_zts}
make -C ZTS install INSTALL_ROOT=%{buildroot}
install -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
cd %{sources}
for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{proj_name}/$i
done
for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{proj_name}/$i
done
%check
cd %{sources}
export SKIP_ONLINE_TESTS=1
: ignore tests with erratic results
rm tests/client021.phpt
rm tests/client022.phpt
rm tests/client025.phpt
rm tests/client027.phpt
rm tests/client016.phpt
rm tests/client028.phpt
rm tests/etag001.phpt
modules=""
for mod in iconv raphf; do
if [ -f %{php_extdir}/${mod}.so ]; then
modules="$modules -d extension=${mod}.so"
fi
done
: Minimal load test for NTS extension
%{__php} --no-php-ini \
$modules \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
%if %{with_tests}
: Upstream test suite NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n $modules -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \
%{__php} -n run-tests.php -q --show-diff
%endif
%if %{with_zts}
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
$modules \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
%endif
%files
%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{proj_name}
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
%{pecl_xmldir}/%{name}.xml
%if %{with_zts}
%config(noreplace) %{php_ztsinidir}/%{ini_name}
%{php_ztsextdir}/%{pecl_name}.so
%endif
%files devel
%doc %{pecl_testdir}/%{proj_name}
%{php_incldir}/ext/%{pecl_name}
%if %{with_zts}
%{php_ztsincldir}/ext/%{pecl_name}
%endif
%changelog
* Thu Jan 09 2025 bbrucezhang <bbrucezhang@tencent.com> - 4.2.4-2
- Rebuild for icu-74.2
* Fri Apr 12 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 4.2.4-1
- initial build
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。