-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d04bc88
commit 032adca
Showing
54 changed files
with
743 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ jobs: | |
- "8.1" | ||
- "8.2" | ||
- "8.3" | ||
- "8.4" | ||
dockerfile: | ||
- "Dockerfile" | ||
- "Dockerfile.alpine" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: "php-headers-84" | ||
version: "1.0" | ||
php_source_version: 8.4.1 | ||
|
||
sources: | ||
7.2.34: | ||
linux: | ||
- url: "https://www.php.net/distributions/php-7.2.34.tar.gz" | ||
contentsRoot: "php-7.2.34" | ||
7.3.33: | ||
linux: | ||
- url: "https://www.php.net/distributions/php-7.3.33.tar.gz" | ||
contentsRoot: "php-7.3.33" | ||
7.4.33: | ||
linux: | ||
- url: "https://www.php.net/distributions/php-7.4.33.tar.gz" | ||
contentsRoot: "php-7.4.33" | ||
8.0.28: | ||
linux: | ||
- url: "https://www.php.net/distributions/php-8.0.28.tar.gz" | ||
contentsRoot: "php-8.0.28" | ||
8.1.18: | ||
linux: | ||
- url: "https://www.php.net/distributions/php-8.1.18.tar.gz" | ||
contentsRoot: "php-8.1.18" | ||
8.2.5: | ||
linux: | ||
- url: "https://www.php.net/distributions/php-8.2.5.tar.gz" | ||
contentsRoot: "php-8.2.5" | ||
8.3.2: | ||
linux: | ||
- url: "https://www.php.net/distributions/php-8.3.2.tar.gz" | ||
contentsRoot: "php-8.3.2" | ||
8.4.1: | ||
linux: | ||
- url: "https://www.php.net/distributions/php-8.4.1.tar.gz" | ||
contentsRoot: "php-8.4.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import os | ||
import shutil | ||
|
||
from conans import tools, ConanFile, AutoToolsBuildEnvironment | ||
|
||
class PhpHeadersForPHP81Conan(ConanFile): | ||
description = "PHP headers package required to build Elastic APM agent without additional PHP dependencies" | ||
license = "The PHP License, version 3.01" | ||
homepage = "https://php.net/" | ||
url = "https://php.net/" | ||
author = "[email protected]" | ||
|
||
settings = "os", "compiler", "build_type", "arch" | ||
platform = "linux" | ||
|
||
def init(self): | ||
self.name = self.conan_data["name"] | ||
self.version = self.conan_data["version"] # version of the package | ||
self.php_version = self.conan_data["php_source_version"] # version of the PHP to build | ||
self.source_temp_dir = "php-src" | ||
|
||
def requirements(self): | ||
self.requires("libxml2/2.9.9") | ||
self.requires("sqlite3/3.29.0") | ||
|
||
def source(self): | ||
for source in self.conan_data["sources"][self.php_version][self.platform]: | ||
|
||
if "contentsRoot" in source: | ||
# small hack - it can't contain custom fields, so we're removing it from source (got an unexpected keyword argument) | ||
contentRoot = source["contentsRoot"] | ||
del source["contentsRoot"] | ||
tools.get(**source) | ||
os.rename(contentRoot, self.source_temp_dir) | ||
else: | ||
self.output.error("Could not find 'contentsRoot' in conandata.yml") | ||
raise Exception("Could not find 'contentsRoot' in conandata.yml") | ||
|
||
def build(self): | ||
with tools.chdir(os.path.join(self.source_folder, self.source_temp_dir)): | ||
buildEnv = AutoToolsBuildEnvironment(self) | ||
envVariables = buildEnv.vars | ||
envVariables['ac_cv_php_xml2_config_path'] = os.path.join(self.deps_cpp_info["libxml2"].rootpath, "bin/xml2-config") | ||
envVariables['LIBXML_LIBS'] = os.path.join(self.deps_cpp_info["libxml2"].rootpath, self.deps_cpp_info["libxml2"].libdirs[0]) | ||
envVariables['LIBXML_CFLAGS'] = "-I{}".format(os.path.join(self.deps_cpp_info["libxml2"].rootpath, self.deps_cpp_info["libxml2"].includedirs[0])) | ||
envVariables['SQLITE_LIBS'] = os.path.join(self.deps_cpp_info["sqlite3"].rootpath, self.deps_cpp_info["sqlite3"].libdirs[0]) | ||
envVariables['SQLITE_CFLAGS'] = "-I{}".format(os.path.join(self.deps_cpp_info["sqlite3"].rootpath, self.deps_cpp_info["sqlite3"].includedirs[0])) | ||
self.run("./buildconf --force") | ||
buildEnv.configure(args=[""], vars=envVariables, build=False, host=False) | ||
|
||
def package(self): | ||
source = os.path.join(self.source_folder, self.source_temp_dir) | ||
self.copy("*.h", src=source, dst='include', keep_path=True) | ||
|
||
def package_id(self): | ||
del self.info.settings.compiler.version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.