Skip to content

Commit

Permalink
Attempt to use Conan port of pdf2htmlEX
Browse files Browse the repository at this point in the history
  • Loading branch information
ViliusSutkus89 committed Jun 18, 2024
1 parent 4412bac commit 56c0a08
Show file tree
Hide file tree
Showing 11 changed files with 396 additions and 5 deletions.
56 changes: 56 additions & 0 deletions .github/conan/profiles/android
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{% set android_home = os.getenv("ANDROID_HOME") %}
{% set ndk_version = "26.1.10909125" %}
{% set api_level = "21" %}

[settings]
os=Android
os.api_level={{api_level}}
arch=x86
build_type=RelWithDebInfo
compiler=clang
compiler.version=17
compiler.cppstd=20
compiler.libcxx=c++_static

[conf]
tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}}

[buildenv]
# Cross compile toolchain evn vars are required to build
# libffi, libgettext, libiconv, libxml2 and other autotools packages for Android
# https://github.com/conan-io/conan-center-index/issues/24349
# https://github.com/conan-io/conan/issues/15376
# https://github.com/conan-io/conan-center-index/issues/22114
# https://github.com/conan-io/conan/issues/14077
AR={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
AS={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as
RANLIB={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib
CC={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android{{api_level}}-clang
CXX={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android{{api_level}}-clang++
LD={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/ld
STRIP={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip

[options]
# gobject introspection not yet available for conan 2
poppler/*:with_gobject_introspection=False

# We are not using xorg functionality in cairo
cairo/*:with_xlib=False
cairo/*:with_xlib_xrender=False
cairo/*:with_xcb=False
cairo/*:with_symbol_lookup=False

# Unused functionality in GLib
glib/*:with_elf=False
glib/*:with_mount=False
glib/*:with_selinux=False

# @TODO: These dependencies are currently problematic
freetype/*:with_bzip2=False
freetype/*:with_brotli=False
poppler/*:with_tiff=False
fontforge/*:with_tiff=False

[replace_requires]
libjpeg/9e: libjpeg/9f
libdeflate/1.19: libdeflate/1.20
56 changes: 56 additions & 0 deletions .github/conan/profiles/android-armv7
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{% set android_home = os.getenv("ANDROID_HOME") %}
{% set ndk_version = "26.1.10909125" %}
{% set api_level = "21" %}

[settings]
os=Android
os.api_level={{api_level}}
arch=armv7
build_type=RelWithDebInfo
compiler=clang
compiler.version=17
compiler.cppstd=20
compiler.libcxx=c++_static

[conf]
tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}}

[buildenv]
# Cross compile toolchain evn vars are required to build
# libffi, libgettext, libiconv, libxml2 and other autotools packages for Android
# https://github.com/conan-io/conan-center-index/issues/24349
# https://github.com/conan-io/conan/issues/15376
# https://github.com/conan-io/conan-center-index/issues/22114
# https://github.com/conan-io/conan/issues/14077
AR={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
AS={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as
RANLIB={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib
CC={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi{{api_level}}-clang
CXX={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi{{api_level}}-clang++
LD={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/ld
STRIP={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip

[options]
# gobject introspection not yet available for conan 2
poppler/*:with_gobject_introspection=False

# We are not using xorg functionality in cairo
cairo/*:with_xlib=False
cairo/*:with_xlib_xrender=False
cairo/*:with_xcb=False
cairo/*:with_symbol_lookup=False

# Unused functionality in GLib
glib/*:with_elf=False
glib/*:with_mount=False
glib/*:with_selinux=False

# @TODO: These dependencies are currently problematic
freetype/*:with_bzip2=False
freetype/*:with_brotli=False
poppler/*:with_tiff=False
fontforge/*:with_tiff=False

[replace_requires]
libjpeg/9e: libjpeg/9f
libdeflate/1.19: libdeflate/1.20
56 changes: 56 additions & 0 deletions .github/conan/profiles/android-armv8
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{% set android_home = os.getenv("ANDROID_HOME") %}
{% set ndk_version = "26.1.10909125" %}
{% set api_level = "21" %}

[settings]
os=Android
os.api_level={{api_level}}
arch=armv8
build_type=RelWithDebInfo
compiler=clang
compiler.version=17
compiler.cppstd=20
compiler.libcxx=c++_static

[conf]
tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}}

[buildenv]
# Cross compile toolchain evn vars are required to build
# libffi, libgettext, libiconv, libxml2 and other autotools packages for Android
# https://github.com/conan-io/conan-center-index/issues/24349
# https://github.com/conan-io/conan/issues/15376
# https://github.com/conan-io/conan-center-index/issues/22114
# https://github.com/conan-io/conan/issues/14077
AR={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
AS={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as
RANLIB={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib
CC={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android{{api_level}}-clang
CXX={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android{{api_level}}-clang++
LD={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/ld
STRIP={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip

[options]
# gobject introspection not yet available for conan 2
poppler/*:with_gobject_introspection=False

# We are not using xorg functionality in cairo
cairo/*:with_xlib=False
cairo/*:with_xlib_xrender=False
cairo/*:with_xcb=False
cairo/*:with_symbol_lookup=False

# Unused functionality in GLib
glib/*:with_elf=False
glib/*:with_mount=False
glib/*:with_selinux=False

# @TODO: These dependencies are currently problematic
freetype/*:with_bzip2=False
freetype/*:with_brotli=False
poppler/*:with_tiff=False
fontforge/*:with_tiff=False

[replace_requires]
libjpeg/9e: libjpeg/9f
libdeflate/1.19: libdeflate/1.20
56 changes: 56 additions & 0 deletions .github/conan/profiles/android-x86
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{% set android_home = os.getenv("ANDROID_HOME") %}
{% set ndk_version = "26.1.10909125" %}
{% set api_level = "21" %}

[settings]
os=Android
os.api_level={{api_level}}
arch=x86
build_type=RelWithDebInfo
compiler=clang
compiler.version=17
compiler.cppstd=20
compiler.libcxx=c++_static

[conf]
tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}}

[buildenv]
# Cross compile toolchain evn vars are required to build
# libffi, libgettext, libiconv, libxml2 and other autotools packages for Android
# https://github.com/conan-io/conan-center-index/issues/24349
# https://github.com/conan-io/conan/issues/15376
# https://github.com/conan-io/conan-center-index/issues/22114
# https://github.com/conan-io/conan/issues/14077
AR={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
AS={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as
RANLIB={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib
CC={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android{{api_level}}-clang
CXX={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android{{api_level}}-clang++
LD={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/ld
STRIP={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip

[options]
# gobject introspection not yet available for conan 2
poppler/*:with_gobject_introspection=False

# We are not using xorg functionality in cairo
cairo/*:with_xlib=False
cairo/*:with_xlib_xrender=False
cairo/*:with_xcb=False
cairo/*:with_symbol_lookup=False

# Unused functionality in GLib
glib/*:with_elf=False
glib/*:with_mount=False
glib/*:with_selinux=False

# @TODO: These dependencies are currently problematic
freetype/*:with_bzip2=False
freetype/*:with_brotli=False
poppler/*:with_tiff=False
fontforge/*:with_tiff=False

[replace_requires]
libjpeg/9e: libjpeg/9f
libdeflate/1.19: libdeflate/1.20
56 changes: 56 additions & 0 deletions .github/conan/profiles/android-x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{% set android_home = os.getenv("ANDROID_HOME") %}
{% set ndk_version = "26.1.10909125" %}
{% set api_level = "21" %}

[settings]
os=Android
os.api_level={{api_level}}
arch=x86_64
build_type=RelWithDebInfo
compiler=clang
compiler.version=17
compiler.cppstd=20
compiler.libcxx=c++_static

[conf]
tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}}

[buildenv]
# Cross compile toolchain evn vars are required to build
# libffi, libgettext, libiconv, libxml2 and other autotools packages for Android
# https://github.com/conan-io/conan-center-index/issues/24349
# https://github.com/conan-io/conan/issues/15376
# https://github.com/conan-io/conan-center-index/issues/22114
# https://github.com/conan-io/conan/issues/14077
AR={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
AS={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as
RANLIB={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib
CC={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android{{api_level}}-clang
CXX={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android{{api_level}}-clang++
LD={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/ld
STRIP={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip

[options]
# gobject introspection not yet available for conan 2
poppler/*:with_gobject_introspection=False

# We are not using xorg functionality in cairo
cairo/*:with_xlib=False
cairo/*:with_xlib_xrender=False
cairo/*:with_xcb=False
cairo/*:with_symbol_lookup=False

# Unused functionality in GLib
glib/*:with_elf=False
glib/*:with_mount=False
glib/*:with_selinux=False

# @TODO: These dependencies are currently problematic
freetype/*:with_bzip2=False
freetype/*:with_brotli=False
poppler/*:with_tiff=False
fontforge/*:with_tiff=False

[replace_requires]
libjpeg/9e: libjpeg/9f
libdeflate/1.19: libdeflate/1.20
36 changes: 36 additions & 0 deletions .github/conan/profiles/default
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[settings]
os=Linux
arch=x86_64
build_type=RelWithDebInfo
compiler=clang
compiler.version=15
compiler.cppstd=20
compiler.libcxx=libstdc++11

[conf]
tools.build:compiler_executables={'c': 'clang-15', 'cpp': 'clang++-15'}

[options]
# gobject introspection not yet available for conan 2
poppler/*:with_gobject_introspection=False

# We are not using xorg functionality in cairo
cairo/*:with_xlib=False
cairo/*:with_xlib_xrender=False
cairo/*:with_xcb=False
cairo/*:with_symbol_lookup=False

# Unused functionality in GLib
glib/*:with_elf=False
glib/*:with_mount=False
glib/*:with_selinux=False

# @TODO: These dependencies are currently problematic
freetype/*:with_bzip2=False
freetype/*:with_brotli=False
poppler/*:with_tiff=False
fontforge/*:with_tiff=False

[replace_requires]
libjpeg/9e: libjpeg/9f
libdeflate/1.19: libdeflate/1.20
36 changes: 36 additions & 0 deletions .github/conan/profiles/ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[settings]
os=Linux
arch=x86_64
build_type=RelWithDebInfo
compiler=clang
compiler.version=15
compiler.cppstd=20
compiler.libcxx=libstdc++11

[conf]
tools.build:compiler_executables={'c': 'clang-15', 'cpp': 'clang++-15'}

[options]
# gobject introspection not yet available for conan 2
poppler/*:with_gobject_introspection=False

# We are not using xorg functionality in cairo
cairo/*:with_xlib=False
cairo/*:with_xlib_xrender=False
cairo/*:with_xcb=False
cairo/*:with_symbol_lookup=False

# Unused functionality in GLib
glib/*:with_elf=False
glib/*:with_mount=False
glib/*:with_selinux=False

# @TODO: These dependencies are currently problematic
freetype/*:with_bzip2=False
freetype/*:with_brotli=False
poppler/*:with_tiff=False
fontforge/*:with_tiff=False

[replace_requires]
libjpeg/9e: libjpeg/9f
libdeflate/1.19: libdeflate/1.20
14 changes: 13 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License
#
# Copyright (c) 2021 - 2023 ViliusSutkus89.com
# Copyright (c) 2021 - 2024 ViliusSutkus89.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -53,6 +53,18 @@ jobs:
java-version: 17
- uses: android-actions/setup-android@v3

- name: install python dependencies
run: pip install --upgrade pip conan setuptools

- run: conan config install .github/conan/profiles
- uses: actions/checkout@v4
with:
repository: ViliusSutkus89/conan-odr-index
ref: pdf2htmlEX_and_deps
path: conan-odr-index

- run: python conan-odr-index/scripts/conan_export_all_packages.py

- run: ./gradlew lintRelease publishToMavenLocal

- uses: actions/upload-artifact@v4
Expand Down
Loading

0 comments on commit 56c0a08

Please sign in to comment.