Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76314 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20772 invoked from network); 3 Aug 2014 00:24:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Aug 2014 00:24:08 -0000 Authentication-Results: pb1.pair.com header.from=ingwie2000@googlemail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ingwie2000@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 74.125.82.169 as permitted sender) X-PHP-List-Original-Sender: ingwie2000@googlemail.com X-Host-Fingerprint: 74.125.82.169 mail-we0-f169.google.com Received: from [74.125.82.169] ([74.125.82.169:63356] helo=mail-we0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 40/41-02246-7218DD35 for ; Sat, 02 Aug 2014 20:24:08 -0400 Received: by mail-we0-f169.google.com with SMTP id u56so5964850wes.14 for ; Sat, 02 Aug 2014 17:24:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=uDYiNyqYVjmyk1rF8xmSoe9luz8VJ3TUmeYBPBGbBng=; b=GefYmjjamNf5XHdhUGKVYvmFsonTaVdFZYNtAjldiqaAzwMGvRnF4UcMGAITxEusXG OsSaPZqwDeFUUXgp7j3L3yoZKZQOWFm/N/7WgIglXq7Izh7CwHwqUzx3NYXB05wj4lYh ph6HOs23PvBShS70mFk0/TKspM4AmoTZliHd7mf+ehK2A8J+F/PTetLrIaW76Y1n3VQV coxp6cTFwZNkdyog1HO7ervGuRWg/NoO7bcOtM07p8tx8QXcovueXNE2BKaacYfypWUB h4Ut1nca63m7/T5VuyRmluhR8KZbXq3nb6cab/rUegAiCTpXRe+rPPw76aJriscq1GXY m2hw== X-Received: by 10.180.102.98 with SMTP id fn2mr18930498wib.39.1407025467808; Sat, 02 Aug 2014 17:24:27 -0700 (PDT) Received: from juergenensimac6.speedport_w723_v_typ_a_1_01_001 (p5B152858.dip0.t-ipconnect.de. [91.21.40.88]) by mx.google.com with ESMTPSA id xn12sm24076658wib.13.2014.08.02.17.24.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 02 Aug 2014 17:24:27 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Message-ID: Date: Sun, 3 Aug 2014 02:24:26 +0200 To: Kevin Ingwersen Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) X-Mailer: Apple Mail (2.1878.6) Subject: Custom build rule From: ingwie2000@googlemail.com (Ingwie Phoenix) Hello internals! I have almost completed a SAPI, that allows NodeJS scripters to enable = PHP from within their HTTP servers. Originally, I wanted to write this extension just for my own use, but as = I see the many =84dirty=93 hacks that people use to run PHP inside their = http server, I decided to make this extension more available, once its = done and working. However, the build process is a bit complicated, as it plays between = worlds; the autoconf based PHP build system and the GYP driven node = extension build system. So far, I am working on the first solution: = Building the extension using PHP=92s build mechanism. As I know the procedure for building nodejs addons by their commands, = I=92d just need to add a custom action/rule to the build, that builds a = static library/bundle with .node as file extension isntead of the usual = .so/.dll. How do I do that? Its two C++ files (tinythread.cpp, v8php.cc) that need = to be compiled. v8php.cc houses the entire SAPI code as well as the = nodejs bindings. And as a side note: When the user has previously built PHP with ZTS and = Embed-SAPI, so that libphp5 is built, can they just link a SAPI against = that? I see that php-config lists the SAPIs, and I wondered if there is = a generated file that lists/depends on all the SAPIs. Kind regards,=20 Ingwie=