diff --git a/config/pkg/ext/ext-wikidiff2.yml b/config/pkg/ext/ext-wikidiff2.yml new file mode 100644 index 000000000..5c1ac0c49 --- /dev/null +++ b/config/pkg/ext/ext-wikidiff2.yml @@ -0,0 +1,18 @@ +ext-wikidiff2: + type: php-extension + artifact: + source: + type: git + url: 'https://github.com/wikimedia/mediawiki-php-wikidiff2' + rev: master + metadata: + license-files: [COPYING] + license: GPL-2.0-or-later + depends: + - libthai + lang: cpp + php-extension: + os: + - Linux + - Darwin + arg-type: enable diff --git a/config/pkg/lib/libdatrie.yml b/config/pkg/lib/libdatrie.yml new file mode 100644 index 000000000..f68842a50 --- /dev/null +++ b/config/pkg/lib/libdatrie.yml @@ -0,0 +1,17 @@ +libdatrie: + type: library + artifact: + source: + type: ghrel + repo: tlwg/libdatrie + match: libdatrie-.+\.tar\.xz + prefer-stable: true + metadata: + license-files: [COPYING] + license: LGPL-2.1-or-later + headers: + - datrie/trie.h + pkg-configs: + - datrie-0.2 + static-libs@unix: + - libdatrie.a diff --git a/config/pkg/lib/libthai.yml b/config/pkg/lib/libthai.yml new file mode 100644 index 000000000..eaf08b4ce --- /dev/null +++ b/config/pkg/lib/libthai.yml @@ -0,0 +1,19 @@ +libthai: + type: library + artifact: + source: + type: ghrel + repo: tlwg/libthai + match: libthai-.+\.tar\.xz + prefer-stable: true + metadata: + license-files: [COPYING] + license: LGPL-2.1-or-later + depends: + - libdatrie + headers: + - thai/thailib.h + pkg-configs: + - libthai + static-libs@unix: + - libthai.a diff --git a/src/Package/Extension/wikidiff2.php b/src/Package/Extension/wikidiff2.php new file mode 100644 index 000000000..002ab0914 --- /dev/null +++ b/src/Package/Extension/wikidiff2.php @@ -0,0 +1,29 @@ +getTargetPackage('php')->getSourceDir() . '/ext/wikidiff2'; + $src_h = "{$ext_dir}/src/php_wikidiff2.h"; + $dst_h = "{$ext_dir}/php_wikidiff2.h"; + if (file_exists($src_h)) { + FileSystem::copy($src_h, $dst_h); + } + } +} diff --git a/src/Package/Library/libdatrie.php b/src/Package/Library/libdatrie.php new file mode 100644 index 000000000..1145e2971 --- /dev/null +++ b/src/Package/Library/libdatrie.php @@ -0,0 +1,24 @@ +addConfigureArgs('--disable-doxygen-doc') + ->configure() + ->make('SUBDIRS=datrie', with_install: 'SUBDIRS=datrie install'); + } +} diff --git a/src/Package/Library/libthai.php b/src/Package/Library/libthai.php new file mode 100644 index 000000000..a405f002f --- /dev/null +++ b/src/Package/Library/libthai.php @@ -0,0 +1,26 @@ +addConfigureArgs('--disable-doxygen-doc', '--disable-dict') + ->configure() + ->make('dictdatadir=/usr/share/libthai'); + } +} diff --git a/src/globals/ext-tests/wikidiff2.php b/src/globals/ext-tests/wikidiff2.php new file mode 100644 index 000000000..9c6020a2a --- /dev/null +++ b/src/globals/ext-tests/wikidiff2.php @@ -0,0 +1,16 @@ +