* add libxslt

* fix libxslt test

* fix libxslt test

* fix libxslt test

* build w/ libxml2 include prefix

* add libxml2 prefix to inlcude

* restart ci

* test fix

* use pkg-config

* fix

* wip

* wip

* wip

* wip

---------

Co-authored-by: Max Howell <mxcl@me.com>
This commit is contained in:
Marc Seitz 2023-02-19 19:02:44 +01:00 committed by GitHub
parent e12e121d3b
commit 3833cf86b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 73 additions and 0 deletions

2
.gitignore vendored
View file

@ -1 +1,3 @@
/tea.out
/tea.linux
.DS_Store

View file

@ -0,0 +1,45 @@
distributable:
url: https://download.gnome.org/sources/libxslt/{{ version.marketing }}/libxslt-{{ version }}.tar.xz
strip-components: 1
versions:
github: GNOME/libxslt/tags
dependencies:
gnome.org/libxml2: '*'
build:
dependencies:
freedesktop.org/pkg-config: ^0.29
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
gnu.org/patch: '*'
script: |
patch -p1 < props/xslt-config.patch.in
./configure $ARGS
make --jobs {{ hw.concurrency }}
make install
cd "{{prefix}}/bin"
sed -i.bak \
-e 's|{{prefix}}|"$prefix"|g' \
-e 's|{{deps.gnome.org/libxml2.prefix}}|""$libxml2_prefix""|g' \
xslt-config
rm xslt-config.bak
env:
ARGS:
- --prefix={{prefix}}
- --without-python # we dont yet know how to support this
- --without-plugins # doesnt build and we couldnt debug
test:
dependencies:
tea.xyz/gx/cc: c99
script: |
cc `xslt-config --cflags --libs` test.c
./a.out
provides:
- bin/xslt-config
- bin/xsltproc

View file

@ -0,0 +1,13 @@
#include <libxml/parser.h>
#include <libxslt/xslt.h>
#include <libxslt/xsltInternals.h>
int main() {
xmlDocPtr doc = xmlNewDoc(BAD_CAST "1.0");
xsltStylesheetPtr cur = NULL;
cur = xsltLoadStylesheetPI(doc);
xsltFreeStylesheet(cur);
xmlFreeDoc(doc);
return 0;
}

View file

@ -0,0 +1,13 @@
diff --git a/xslt-config.in b/xslt-config.in
index f68df0f..b9bd2f4 100644
--- a/xslt-config.in
+++ b/xslt-config.in
@@ -1,6 +1,7 @@
#! /bin/sh
-prefix=@prefix@
+prefix="$(cd "$(dirname "$0")/.." && pwd)"
+libxml2_prefix="$(cd "$prefix/../../libxml2/v2" && pwd)"
exec_prefix=@exec_prefix@
exec_prefix_set=no
includedir=@includedir@