From patchwork Thu Sep 20 23:02:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dallas Clement X-Patchwork-Id: 185522 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 21ABC2C0080 for ; Fri, 21 Sep 2012 09:03:04 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 31A4D8D5A1; Thu, 20 Sep 2012 23:02:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KZ-sGvHejqp3; Thu, 20 Sep 2012 23:02:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 5A0658D4CF; Thu, 20 Sep 2012 23:02:48 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id A7FB28F74A for ; Thu, 20 Sep 2012 23:02:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id CE79810B870 for ; Thu, 20 Sep 2012 23:02:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sfw4NMDzaQf6 for ; Thu, 20 Sep 2012 23:02:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-vb0-f46.google.com (mail-vb0-f46.google.com [209.85.212.46]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 71AB010B863 for ; Thu, 20 Sep 2012 23:02:42 +0000 (UTC) Received: by vbbff1 with SMTP id ff1so3753733vbb.33 for ; Thu, 20 Sep 2012 16:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=HPG7NW1umSKD3+i2xUgFvKEPtT3Lds8Mbs82TFW+9+Q=; b=QHrqy4ELYHXKz7w31Hjkq5HvSr7FvDQ/fqQ50EhvdaEs1kJGX1+5HWGum3ITEA/TE4 o2hqlBHOnc72i3crjJqlxd1VauSgijixKe1ywP9mpFodkeesDY0KKUihH2/a72mNupCX U5M+vC7TfRCBISBpWpgv2QCy9dhcUvfqs1d6mIuSP/11aSo39rH9ctpdaIMpaPwl+Nz/ C/9B+RBXq6zqbMvWadJV9b/xWvOrCpGR+3DPPbbUl/zPrI1rXKAB+GlD1PQFKGK02NvE 7W2ZAEJ5CD1CKJ7tmYg/UZNz60D4QURwPk+UaztM7UAWLB0N8jzgDI9PENtLvCvv+uyo OqIQ== MIME-Version: 1.0 Received: by 10.52.76.40 with SMTP id h8mr1540338vdw.123.1348182163355; Thu, 20 Sep 2012 16:02:43 -0700 (PDT) Received: by 10.58.4.5 with HTTP; Thu, 20 Sep 2012 16:02:43 -0700 (PDT) In-Reply-To: <20120920204417.784829de@skate> References: <20120919221012.3646aa7b@skate> <20120920111001.371f5b01@skate> <20120920204417.784829de@skate> Date: Thu, 20 Sep 2012 18:02:43 -0500 Message-ID: From: Dallas Clement To: Thomas Petazzoni Cc: buildroot@uclibc.org Subject: Re: [Buildroot] eaccelerator X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Hello Thomas, Please have a look at these refinements. Thanks, Dallas Author: Dallas Clement Date: Thu Sep 20 17:59:19 2012 -0500 Add config for PHP eaccelerator package. Signed-off-by: Dallas Clement +$(eval $(autotools-package)) On Thu, Sep 20, 2012 at 1:44 PM, Thomas Petazzoni 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 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 +