* [Buildroot] eaccelerator @ 2012-09-19 15:34 Dallas Clement 2012-09-19 20:10 ` Thomas Petazzoni 0 siblings, 1 reply; 7+ messages in thread From: Dallas Clement @ 2012-09-19 15:34 UTC (permalink / raw) To: buildroot Hello All, Can any of you provide guidance on the proper way to build a PHP extension such as eaccelerator? Should I create its own .mk or should I modify the php.mk to extract into $(PHP_DIR)/ext and make all together? I have examined the eaccelerator tar ball contents and there is no configure script present, so I am assuming the intent is for it to be built with PHP. Would appreciate any tips you might have. Thanks, Dallas ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] eaccelerator 2012-09-19 15:34 [Buildroot] eaccelerator Dallas Clement @ 2012-09-19 20:10 ` Thomas Petazzoni 2012-09-19 20:36 ` Dallas Clement 0 siblings, 1 reply; 7+ messages in thread From: Thomas Petazzoni @ 2012-09-19 20:10 UTC (permalink / raw) To: buildroot Dear Dallas Clement, On Wed, 19 Sep 2012 10:34:51 -0500, Dallas Clement wrote: > Can any of you provide guidance on the proper way to build a PHP > extension such as eaccelerator? Should I create its own .mk or should > I modify the php.mk to extract into $(PHP_DIR)/ext and make all > together? I have examined the eaccelerator tar ball contents and > there is no configure script present, so I am assuming the intent is > for it to be built with PHP. Would appreciate any tips you might > have. The compilation instructions are detailed in https://github.com/eaccelerator/eaccelerator/blob/master/README. Apparently, you need to call phpize (which comes with PHP, but I don't know if we build it for the host at the moment, I don't think so), it probably generates a configure script, that you execute, and then you can build the extension. For sure, this extension needs to be a separate package from the php package. Best regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] eaccelerator 2012-09-19 20:10 ` Thomas Petazzoni @ 2012-09-19 20:36 ` Dallas Clement 2012-09-20 9:10 ` Thomas Petazzoni 0 siblings, 1 reply; 7+ messages in thread From: Dallas Clement @ 2012-09-19 20:36 UTC (permalink / raw) To: buildroot Thanks Thomas. You are sure right. I figured this out earlier today. I have a .mk file for it which I am happy to share with anyone who cares. How dost one go about sharing build recipes? I realize this one may not be one that you want to include in the general buildroot distribution. On Wed, Sep 19, 2012 at 3:10 PM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > Dear Dallas Clement, > > On Wed, 19 Sep 2012 10:34:51 -0500, Dallas Clement wrote: > >> Can any of you provide guidance on the proper way to build a PHP >> extension such as eaccelerator? Should I create its own .mk or should >> I modify the php.mk to extract into $(PHP_DIR)/ext and make all >> together? I have examined the eaccelerator tar ball contents and >> there is no configure script present, so I am assuming the intent is >> for it to be built with PHP. Would appreciate any tips you might >> have. > > The compilation instructions are detailed in > https://github.com/eaccelerator/eaccelerator/blob/master/README. > Apparently, you need to call phpize (which comes with PHP, but I don't > know if we build it for the host at the moment, I don't think so), it > probably generates a configure script, that you execute, and then you > can build the extension. > > For sure, this extension needs to be a separate package from the php > package. > > Best regards, > > Thomas > -- > Thomas Petazzoni, Free Electrons > Kernel, drivers, real-time and embedded Linux > development, consulting, training and support. > http://free-electrons.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] eaccelerator 2012-09-19 20:36 ` Dallas Clement @ 2012-09-20 9:10 ` Thomas Petazzoni 2012-09-20 16:37 ` Dallas Clement [not found] ` <CAE9DZUSLuiDgK0fPGoSE=bBQLinvDRKFLBq6ifzPxJwpMBD-zQ@mail.gmail.com> 0 siblings, 2 replies; 7+ messages in thread From: Thomas Petazzoni @ 2012-09-20 9:10 UTC (permalink / raw) To: buildroot Dear Dallas Clement, On Wed, 19 Sep 2012 15:36:58 -0500, Dallas Clement wrote: > Thanks Thomas. You are sure right. I figured this out earlier today. > I have a .mk file for it which I am happy to share with anyone who > cares. How dost one go about sharing build recipes? I realize this > one may not be one that you want to include in the general buildroot > distribution. Why so? Just sent a patch that adds your new package, so that we can include it in Buildroot. Best regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] eaccelerator 2012-09-20 9:10 ` Thomas Petazzoni @ 2012-09-20 16:37 ` Dallas Clement [not found] ` <CAE9DZUSLuiDgK0fPGoSE=bBQLinvDRKFLBq6ifzPxJwpMBD-zQ@mail.gmail.com> 1 sibling, 0 replies; 7+ messages in thread From: Dallas Clement @ 2012-09-20 16:37 UTC (permalink / raw) To: buildroot Here it is: Config.in ====== config BR2_PACKAGE_EACCELERATOR bool "eaccelerator" depends on BR2_PACKAGE_PHP help PHP accelerator and optimizer. http://eaccelerator.net/ eaccelerator.mk ============ ############################################################# # # eaccelerator # ############################################################# EACCELERATOR_VERSION = 0.9.6.1 EACCELERATOR_SITE = http://eaccelerator.net/ EACCELERATOR_SOURCE = eaccelerator-$(EACCELERATOR_VERSION).tar.bz2 EACCELERATOR_UNZIP = bzcat EACCELERATOR_DEPENDENCIES = php EACCELERATOR_DIR = $(BUILD_DIR)/eaccelerator-$(EACCELERATOR_VERSION) EACCELERATOR_CONF_OPT = --prefix=/usr --enable-eaccelerator=shared \ --with-php-config=$(STAGING_DIR)/usr/bin/php-config STAGING_INCLUDE_DIR = $(STAGING_DIR)/usr/include EACCELERATOR_CONF_ENV = CPPFLAGS="$(TARGET_CFLAGS) -DMM_SEM_IPC -DMM_SHM_IPC -I$(STAGING_INCLUDE_DIR)/php -I$(STAGING_INCLUDE_DIR)/php/main -I$(STAGING_INCLUDE_DIR)/php/Zend -I$(STAGING_INCLUDE_DIR)/php/TSRM" EACCELERATOR_MAKE_ENV = INSTALL_ROOT="$(TARGET_DIR)" EACCELERATOR_CONFFILES = /etc/php/cgi-php5/ext/eaccelerator.ini define PHPIZE_HOOK cd $(EACCELERATOR_DIR) && phpize endef define FIXUP_HOOK sed -i 's/mm_shm_mmap_anon=no/mm_shm_mmap_anon=yes\n mm_sem_pthread=yes/' $(EACCELERATOR_DIR)/config.m4 endef EACCELERATOR_PRE_CONFIGURE_HOOKS += FIXUP_HOOK EACCELERATOR_PRE_CONFIGURE_HOOKS += PHPIZE_HOOK $(eval $(autotools-package)) On Thu, Sep 20, 2012 at 4:10 AM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > Dear Dallas Clement, > > On Wed, 19 Sep 2012 15:36:58 -0500, Dallas Clement wrote: >> Thanks Thomas. You are sure right. I figured this out earlier today. >> I have a .mk file for it which I am happy to share with anyone who >> cares. How dost one go about sharing build recipes? I realize this >> one may not be one that you want to include in the general buildroot >> distribution. > > Why so? Just sent a patch that adds your new package, so that we can > include it in Buildroot. > > Best regards, > > Thomas > -- > Thomas Petazzoni, Free Electrons > Kernel, drivers, real-time and embedded Linux > development, consulting, training and support. > http://free-electrons.com ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CAE9DZUSLuiDgK0fPGoSE=bBQLinvDRKFLBq6ifzPxJwpMBD-zQ@mail.gmail.com>]
* [Buildroot] eaccelerator [not found] ` <CAE9DZUSLuiDgK0fPGoSE=bBQLinvDRKFLBq6ifzPxJwpMBD-zQ@mail.gmail.com> @ 2012-09-20 18:44 ` Thomas Petazzoni 2012-09-20 23:02 ` Dallas Clement 0 siblings, 1 reply; 7+ messages in thread From: Thomas Petazzoni @ 2012-09-20 18:44 UTC (permalink / raw) To: buildroot Dear Dallas Clement, You should send such contributions to the Buildroot list and not just to me. Also, your contribution should be a proper Git patch, see http://elinux.org/Buildroot_how_to_contribute. On Thu, 20 Sep 2012 11:34:54 -0500, Dallas Clement wrote: > ############################################################# > # > # eaccelerator > # > ############################################################# > EACCELERATOR_VERSION = 0.9.6.1 > EACCELERATOR_SITE = http://eaccelerator.net/ > EACCELERATOR_SOURCE = eaccelerator-$(EACCELERATOR_VERSION).tar.bz2 > EACCELERATOR_UNZIP = bzcat Line useless. > EACCELERATOR_DEPENDENCIES = php > EACCELERATOR_DIR = $(BUILD_DIR)/eaccelerator-$(EACCELERATOR_VERSION) Line useless. > EACCELERATOR_CONF_OPT = --prefix=/usr --enable-eaccelerator=shared \ > --with-php-config=$(STAGING_DIR)/usr/bin/php-config The --prefix=/usr is useless, this is already passed by default. > STAGING_INCLUDE_DIR = $(STAGING_DIR)/usr/include > EACCELERATOR_CONF_ENV = CPPFLAGS="$(TARGET_CFLAGS) -DMM_SEM_IPC > -DMM_SHM_IPC -I$(STAGING_INCLUDE_DIR)/php > -I$(STAGING_INCLUDE_DIR)/php/main -I$(STAGING_INCLUDE_DIR)/php/Zend > -I$(STAGING_INCLUDE_DIR)/php/TSRM" This big sequence of -I looks strange. Doesn't the configure script figures those one out? > EACCELERATOR_MAKE_ENV = INSTALL_ROOT="$(TARGET_DIR)" > > EACCELERATOR_CONFFILES = /etc/php/cgi-php5/ext/eaccelerator.ini Is this used somewhere? > > define PHPIZE_HOOK > cd $(EACCELERATOR_DIR) && phpize > endef The hook should have a name starting with EACCELERATOR, to avoid clashing with other packages. EACCELERATOR_DIR should be replaced by $(@D). > define FIXUP_HOOK > sed -i 's/mm_shm_mmap_anon=no/mm_shm_mmap_anon=yes\n > mm_sem_pthread=yes/' $(EACCELERATOR_DIR)/config.m4 > endef EACCELERATOR_DIR should be replaced by $(@D). A comment is needed to explain what you are doing. > EACCELERATOR_PRE_CONFIGURE_HOOKS += FIXUP_HOOK > EACCELERATOR_PRE_CONFIGURE_HOOKS += PHPIZE_HOOK Then you could probably do both things within a single hook. > $(eval $(autotools-package)) There is a bit of rework to do, but it is good start. Keep posting updated versions that take into account the comments! Thanks, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] eaccelerator 2012-09-20 18:44 ` Thomas Petazzoni @ 2012-09-20 23:02 ` Dallas Clement 0 siblings, 0 replies; 7+ messages in thread From: Dallas Clement @ 2012-09-20 23:02 UTC (permalink / raw) To: buildroot Hello Thomas, Please have a look at these refinements. Thanks, Dallas Author: Dallas Clement <dallasc@buffalotech.com> Date: Thu Sep 20 17:59:19 2012 -0500 Add config for PHP eaccelerator package. Signed-off-by: Dallas Clement <dallasc@buffalotech.com> diff --git a/package/Config.in b/package/Config.in index 58dd5e8..083cad8 100644 --- a/package/Config.in +++ b/package/Config.in @@ -272,6 +272,7 @@ endmenu endif source "package/microperl/Config.in" source "package/php/Config.in" +source "package/eaccelerator/Config.in" source "package/python/Config.in" if BR2_PACKAGE_PYTHON menu "external python modules" diff --git a/package/eaccelerator/Config.in b/package/eaccelerator/Config.in new file mode 100644 index 0000000..36600e1 --- /dev/null +++ b/package/eaccelerator/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_EACCELERATOR + bool "eaccelerator" + depends on BR2_PACKAGE_PHP + help + PHP accelerator and optimizer. + + http://eaccelerator.net/ diff --git a/package/eaccelerator/eaccelerator.mk b/package/eaccelerator/eaccelerator.mk new file mode 100644 index 0000000..5ecd355 --- /dev/null +++ b/package/eaccelerator/eaccelerator.mk @@ -0,0 +1,23 @@ +############################################################# +# +# eaccelerator +# +############################################################# +EACCELERATOR_VERSION = 0.9.6.1 +EACCELERATOR_SITE = http://eaccelerator.net/ +EACCELERATOR_SOURCE = eaccelerator-$(EACCELERATOR_VERSION).tar.bz2 +EACCELERATOR_DEPENDENCIES = php +EACCELERATOR_CONF_OPT = --enable-eaccelerator=shared \ + --with-php-config=$(STAGING_DIR)/usr/bin/php-config +EACCELERATOR_MAKE_ENV = INSTALL_ROOT="$(TARGET_DIR)" + +define EACCELERATOR_PRE_CONFIGURE_HOOK + # Must set shared memory config manually for cross-compilation + sed -i "s/mm_shm_mmap_anon=no/mm_shm_mmap_anon=yes\n mm_sem_pthread=yes/" $(@D)/config.m4 + # Need to run this command to create the autoconf configure script + cd $(@D) && phpize +endef + +EACCELERATOR_PRE_CONFIGURE_HOOKS += EACCELERATOR_PRE_CONFIGURE_HOOK + +$(eval $(autotools-package)) On Thu, Sep 20, 2012 at 1:44 PM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > Dear Dallas Clement, > > You should send such contributions to the Buildroot list and not just > to me. Also, your contribution should be a proper Git patch, see > http://elinux.org/Buildroot_how_to_contribute. > > On Thu, 20 Sep 2012 11:34:54 -0500, Dallas Clement wrote: >> ############################################################# >> # >> # eaccelerator >> # >> ############################################################# >> EACCELERATOR_VERSION = 0.9.6.1 >> EACCELERATOR_SITE = http://eaccelerator.net/ >> EACCELERATOR_SOURCE = eaccelerator-$(EACCELERATOR_VERSION).tar.bz2 >> EACCELERATOR_UNZIP = bzcat > > Line useless. > >> EACCELERATOR_DEPENDENCIES = php >> EACCELERATOR_DIR = $(BUILD_DIR)/eaccelerator-$(EACCELERATOR_VERSION) > > Line useless. > >> EACCELERATOR_CONF_OPT = --prefix=/usr --enable-eaccelerator=shared \ >> --with-php-config=$(STAGING_DIR)/usr/bin/php-config > > The --prefix=/usr is useless, this is already passed by default. > >> STAGING_INCLUDE_DIR = $(STAGING_DIR)/usr/include >> EACCELERATOR_CONF_ENV = CPPFLAGS="$(TARGET_CFLAGS) -DMM_SEM_IPC >> -DMM_SHM_IPC -I$(STAGING_INCLUDE_DIR)/php >> -I$(STAGING_INCLUDE_DIR)/php/main -I$(STAGING_INCLUDE_DIR)/php/Zend >> -I$(STAGING_INCLUDE_DIR)/php/TSRM" > > This big sequence of -I looks strange. Doesn't the configure script > figures those one out? > >> EACCELERATOR_MAKE_ENV = INSTALL_ROOT="$(TARGET_DIR)" >> >> EACCELERATOR_CONFFILES = /etc/php/cgi-php5/ext/eaccelerator.ini > > Is this used somewhere? > >> >> define PHPIZE_HOOK >> cd $(EACCELERATOR_DIR) && phpize >> endef > > The hook should have a name starting with EACCELERATOR, to avoid > clashing with other packages. > > EACCELERATOR_DIR should be replaced by $(@D). > >> define FIXUP_HOOK >> sed -i 's/mm_shm_mmap_anon=no/mm_shm_mmap_anon=yes\n >> mm_sem_pthread=yes/' $(EACCELERATOR_DIR)/config.m4 >> endef > > EACCELERATOR_DIR should be replaced by $(@D). A comment is needed to > explain what you are doing. > >> EACCELERATOR_PRE_CONFIGURE_HOOKS += FIXUP_HOOK >> EACCELERATOR_PRE_CONFIGURE_HOOKS += PHPIZE_HOOK > > Then you could probably do both things within a single hook. > >> $(eval $(autotools-package)) > > There is a bit of rework to do, but it is good start. Keep posting > updated versions that take into account the comments! > > Thanks, > > Thomas > -- > Thomas Petazzoni, Free Electrons > Kernel, drivers, real-time and embedded Linux > development, consulting, training and support. > http://free-electrons.com ^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-09-20 23:02 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-19 15:34 [Buildroot] eaccelerator Dallas Clement
2012-09-19 20:10 ` Thomas Petazzoni
2012-09-19 20:36 ` Dallas Clement
2012-09-20 9:10 ` Thomas Petazzoni
2012-09-20 16:37 ` Dallas Clement
[not found] ` <CAE9DZUSLuiDgK0fPGoSE=bBQLinvDRKFLBq6ifzPxJwpMBD-zQ@mail.gmail.com>
2012-09-20 18:44 ` Thomas Petazzoni
2012-09-20 23:02 ` Dallas Clement
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox