ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Alexander Bokovoy <ab@avilink.net>
To: sisyphus@altlinux.ru
Subject: Re: [sisyphus] php --with-dom
Date: Sat, 26 May 2001 17:53:49 +0300
Message-ID: <20010526175348.A5423@boids.avilink.net> (raw)
In-Reply-To: <3B0FBFF1.8040206@rtcom.tver.ru>; from dv@rtcom.tver.ru on Sat, May 26, 2001 at 06:38:41PM +0400

[-- Attachment #1: Type: text/plain, Size: 2703 bytes --]

On Sat, May 26, 2001 at 06:38:41PM +0400, Dmitry V. Popkov wrote:
> Alexander Bokovoy wrote:
> 
> >>
> >>../../shared/libphp_common.so: undefined reference to `xmlNewNode'
> >>collect2: ld returned 1 exit status
> >>Неверный код возврата из /var/tmp/rpm-tmp.10273 (%build)
> >>
> >>Возможно, для кого-то это прозрачно, но я зашел в тупик...
> >>
> >Поскольку мы собираем разделяемую библиотеку libphp_common.so вручную
> >(сборочный механизм PHP этого пока не обеспечивает, но движение в этом
> >направлении наблюдается), то нужно вручную добавлять недостающие
> >библиотеки.
> >
> >Вы действительно хотели модуль dom вкомпилировать, а не загружать
> >динамически?
> >
> С этим разобрался, спасибо (добавил -lxml2) .
Я бы посоветовал Вам все-таки собирать модули динамическими.
Концепция сборки PHP и модулей к нему у нас такова:
- php.spec содержит основной код и вкомпилированные модули (как правило, то,
что не вызывает дополнительных зависимостей)

- все остальные модули при сборке опираются на установленный php-devel и
  берут свой исходный текст из /usr/src/php-devel/extensions/%name

Таким образом отпадает необходимость усложнять основной spec-файл, который
и без того немаленький.

Версия в Spring2001 использует слегка иной способ (nosrc.rpm вместо
src.rpm для модулей + зависимость при сборке от php-%version.tar.bz2
вместо установленного php-devel в /usr/src/php-devel), новая версия,
которая будет в Сизифе в начале недели, собирается так, как указано
абзацем выше. Шаблонный SPEC-файл для модулей из нее (пример для модуля
Curl) прикладываю.

> Но мне нужна еще поддержка qtdom :
> сборка с опцией --with-qtdom выдает следующее
> /bin/sh /usr/src/RPM/BUILD/php4/libtool --silent --mode=compile c++ -I. 
> -I/usr/src/RPM/BUILD/php4/ext/qtdom -I/usr/src/RPM/BUILD/php4/main 
> -I/usr/src/RPM/BUILD/php4 -I/usr/include/apache 
> -I/usr/src/RPM/BUILD/php4/Zend -I/include 
> -I/usr/src/RPM/BUILD/php4/TSRM  -DLINUX=22 -DRUSSIAN_APACHE 
> -DDEV_RANDOM=/dev/random -DEAPI -DEAPI_MM 
> -DEAPI_MM_CORE_PATH="/var/run/mm" -DUSE_EXPAT -DSUPPORT_UTF8 -pipe -g 
> -Wall -O2 -fexpensive-optimizations -march=i686  -c qtdom_qt.cpp
> qtdom_qt.cpp:20:18: qdom.h: No such file or directory
> qtdom_qt.cpp:21:21: qstring.h: No such file or directory
> qtdom_qt.cpp:22:21: qglobal.h: No such file or directory
> qtdom_qt.cpp:24: `QDomNode' was not declared in this scope
> и т.д.
> 
> А здесь что можно сделать?
export QTDIR=/usr/lib/qt2
в SPEC-файле перед сборкой.
 
-- 
Sincerely yours, Alexander Bokovoy 
  The Midgard Project    | ALT  Linux  Team | Minsk Linux Users Group
 www.midgard-project.org | www.altlinux.ru  |    www.minsk-lug.net 
-- You won't skid if you stay in a rut.
		-- Frank Hubbard

[-- Attachment #2: php-curl.spec --]
[-- Type: text/plain, Size: 6187 bytes --]

###############################################################
# This SPEC file is a configurable skeleton for PHP modules
# which are distributed with PHP4 tarball.
# Copyright (c) 2001 Alexander Bokovoy <ab@avilink.net>
# This SPEC file is available under terms of GNU GPL license
# versions 2 or greater
###############################################################
#  <Configuration>
#_/---------------\____________________________________________
# Package should be added into mod_php and/or console php?
# Some modules can be used under both, others (like php_gtk
# or midgard) are not.
%define 	use_mod_php	1
%define		use_con_php	1
#
# Package name without php prefix
%define		package_name	curl
###############################################################
%define		php_version	%(rpm -q --queryformat '%{VERSION}' php)
%define		php_release	%(rpm -q --queryformat '%{RELEASE}' php)

Name:	 	php-%package_name
Version:	%php_version
Release:	alt0.1RC1
Group:		System/Servers
Requires:	libcurl >= 7.7.3-alt2
License:	PHP Licence
Prereq:		php = %php_version-%php_release, perl
# Automatically added by buildreq on Thu Mar 08 2001
BuildRequires:  libbfd, libpam, php-devel = %php_version, libcurl-devel >= 7.7.3-alt2
Summary:	cURL module for PHP4
%add_serial php-devel

%description
The php-%package_name includes a dynamic shared object (DSO) that adds
cURL support to PHP4. cURL is a library that enables you to send and
receive files through various protocols, including HTTP, FTP, TELNET,
LDAP, DICT, and GOPHER. PHP4 is an HTML-embedded scripting language. If
you need cURL support for PHP4 applications, you will need to install
this package in addition to the php package.

%prep
%setup -T -c
cp -pr /usr/src/php-devel/extensions/%package_name/* .

%build
# Fix includes so that local config header file will always supercede global options
for j in `ls *.c` ; do
    perl -pi -e "s/#include \"php.h\"/#include \"php.h\"\n#include \"config.h\"/" $j
done
phpize

BUILD_HAVE=`echo %package_name | tr '[:lower:]-' '[:upper:]_'`
CFLAGS="$RPM_OPT_FLAGS -fPIC -L%{_libdir} -DHAVE_${BUILD_HAVE}=1 -DCOMPILE_DL_${BUILD_HAVE}=1"; export CFLAGS  

%configure --with-%package_name=/usr

BUILD_ENV_VARS="top_srcdir=$RPM_BUILD_DIR/%name-%version \
		bindir=$RPM_BUILD_ROOT/usr/bin \
		sbindir=$RPM_BUILD_ROOT/usr/sbin \
		includedir=$RPM_BUILD_ROOT/usr/include \
		exec_prefix=$RPM_BUILD_ROOT/usr \
		libdir=$RPM_BUILD_ROOT/usr/lib \
		prefix=$RPM_BUILD_ROOT/usr \
		localstatedir=$RPM_BUILD_ROOT/var/lib \
		PEAR_INSTALLDIR=$RPM_BUILD_ROOT/usr/lib/php \
		EXTENSION_DIR=$RPM_BUILD_ROOT/usr/lib/php/extensions"
make $BUILD_ENV_VARS 

%install
# Set them again because this is _different_ script
BUILD_ENV_VARS="top_srcdir=$RPM_BUILD_DIR/%name-%version \
		bindir=$RPM_BUILD_ROOT/usr/bin \
		sbindir=$RPM_BUILD_ROOT/usr/sbin \
		includedir=$RPM_BUILD_ROOT/usr/include \
		exec_prefix=$RPM_BUILD_ROOT/usr \
		libdir=$RPM_BUILD_ROOT/usr/lib \
		prefix=$RPM_BUILD_ROOT/usr \
		localstatedir=$RPM_BUILD_ROOT/var/lib \
		PEAR_INSTALLDIR=$RPM_BUILD_ROOT/usr/lib/php \
		EXTENSION_DIR=$RPM_BUILD_ROOT/usr/lib/php/extensions"

make $BUILD_ENV_VARS install 

%clean

%files
%{_libdir}/php/extensions/*
%doc CREDITS

%post
# Common part: all modules need to 
if [ `uname` = "Linux" ]; then perl="%{_bindir}/perl"; fi
if [ `uname` = "SunOS" ]; then perl="%{_prefix}/local/bin/perl"; fi
%if %use_con_php
    if [ -f %{_sysconfdir}/php.ini ] ; then
	unset LC_ALL
        $perl -pi -e 's|^;extension=%{package_name}.so|extension=%{package_name}.so|g' %{_sysconfdir}/php.ini
    fi
%endif
%if %use_mod_php
    if [ -f %{_sysconfdir}/httpd/conf/php.ini ] ; then
	unset LC_ALL
        $perl -pi -e 's|^;extension=%{package_name}.so|extension=%{package_name}.so|g' %{_sysconfdir}/httpd/conf/php.ini
    fi
%endif
%if %use_mod_php
    %{_sbindir}/apachectl update
%endif
# Local script, specific to package

%preun
if [ `uname` = "Linux" ]; then perl="%{_bindir}/perl"; fi
if [ `uname` = "SunOS" ]; then perl="%{_prefix}/local/bin/perl"; fi
if [ $1 = "0" ]; then
%if %use_con_php
    if [ -f %{_sysconfdir}/php.ini ] ; then
	unset LC_ALL
	$perl -pi -e 's|^extension=%{package_name}.so|;extension=%{package_name}.so|g' %{_sysconfdir}/php.ini
    fi
%endif
%if %use_mod_php
    if [ -f %{_sysconfdir}/httpd/conf/php.ini ] ; then
	unset LC_ALL
        $perl -pi -e 's|^extension=%{package_name}.so|;extension=%{package_name}.so|g' %{_sysconfdir}/httpd/conf/php.ini
    fi
%endif
fi

%postun
%if %use_mod_php
    %{_sbindir}/apachectl update
%endif

%changelog
* Tue May 22 2001 Alexander Bokovoy <ab@altlinux.ru> 4.0.6-alt0.1RC1
- PHP 4.0.6 Release Candidate 1
- Dependencies fixed because curl >= 7.7.3-alt2 is required now

* Tue May 08 2001 Alexander Bokovoy <ab@altlinux.ru> 4.0.5-alt1
- PHP 4.0.5 release

* Thu Apr 05 2001 Alexander Bokovoy <ab@avilink.net> 4.0.5.RC6-alt1
- ALTification
- Last release candidate for 4.0.5
- SPEC file changes:
    + Reference to PHP source removed, php-devel is used to acquire sources of module 
    + locale-specific info unset during installation
    + nosrc -> src because NoSource tag cannot be used without corresponding Source one

* Sat Mar 17 2001 Alexander Bokovoy <ab@avilink.net> 4.0.5-ipl1
- First stable build

* Thu Mar 15 2001 Alexander Bokovoy <ab@avilink.net> 4.0.5-ipl0.4
- Rebuild with fixed version of PHP4

* Sun Mar 11 2001 Alexander Bokovoy <ab@avilink.net> 4.0.5-ipl0.3
- Fixed:
    + Build process for self-contained shared modules in PHP is generally broken,
      fixed by automatically adding -DHAVE_{MODULE}=1 -DCOMPILE_DL_{MODULE}=1 to
      configure
* Sat Mar 10 2001 Alexander Bokovoy <ab@avilink.net> 4.0.5-ipl0.2
- More enhancements in SPEC file:
    + Automatically gather PHP version, so no need to synchronize
      spec file's Version: field when new version of PHP is installed

* Thu Mar 08 2001 Alexander Bokovoy <ab@avilink.net> 4.0.5-ipl0.1
- Created new generalized spec file for nosrc.rpm for PHP modules
- Added ability to tune module installation for Console/Apache-based PHP
  Some modules cannot work in Web-server environment (php_gtk), some --
  in Console mode (midgard), some will be happy in both environments
  

      parent reply	other threads:[~2001-05-26 14:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-26 13:39 Dmitry V. Popkov
2001-05-26 14:14 ` Alexander Bokovoy
2001-05-26 14:38   ` Dmitry V. Popkov
2001-05-26 11:41     ` Aleksey Novodvorsky
2001-05-26 14:53     ` Alexander Bokovoy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010526175348.A5423@boids.avilink.net \
    --to=ab@avilink.net \
    --cc=sisyphus@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git