Skip to content

Commit

Permalink
initial commit with some placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwand committed May 23, 2024
0 parents commit 8222cc2
Show file tree
Hide file tree
Showing 5 changed files with 213 additions and 0 deletions.
Empty file added .github/workflows/build.yml
Empty file.
141 changes: 141 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Conan specific
**/test_package/build/
**/test_package/build-*/
**/test_package/test_output/
conan.lock
conanbuildinfo.cmake
conanbuildinfo.txt
conaninfo.txt
graph_info.json
build/

# CMake
CMakeUserPresets.json

# IDEs
.idea
.vs
.vscode
.project
.pydevproject
.settings/
.ropeproject/
.devcontainer/
## emacs
*~

# Byte-compiled / optimized / DLL files / Cache
__pycache__/
**/test_package/__pycache__/
*.pyc
*.py[cod]
*$py.class
tmp/
.DS_Store

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# scons build files
*.dblite

# vim temp files
.*.sw?
.sw?
Session.vim
*~
.undodir
Empty file.
72 changes: 72 additions & 0 deletions recipes/odrcore/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import os
from conan import ConanFile
from conan.tools.build import check_min_cppstd
from conan.tools.files import copy
from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake


class OpenDocumentCoreConan(ConanFile):
name = "odrcore"
version = ""
url = ""
homepage = "https://github.com/opendocument-app/OpenDocument.core"
description = "C++ library that translates office documents to HTML"
topics = "open document", "openoffice xml", "open document reader"
license = "GPL 3.0"

settings = "os", "arch", "compiler", "build_type"
options = {
"shared": [True, False],
"fPIC": [True, False],
}
default_options = {
"shared": False,
"fPIC": True,
}

exports_sources = ["cli/*", "cmake/*", "src/*", "CMakeLists.txt"]

def requirements(self):
self.requires("pugixml/1.14")
self.requires("cryptopp/8.8.0")
self.requires("miniz/3.0.2")
self.requires("nlohmann_json/3.11.3")
self.requires("vincentlaucsb-csv-parser/2.1.3")
self.requires("uchardet/0.0.7")
self.requires("utfcpp/4.0.4")

def build_requirements(self):
self.test_requires("gtest/1.14.0")

def validate_build(self):
if self.settings.get_safe("compiler.cppstd"):
check_min_cppstd(self, 17)

def generate(self):
tc = CMakeToolchain(self)
tc.variables["CMAKE_PROJECT_VERSION"] = self.version
tc.variables["BUILD_SHARED_LIBS"] = self.options.shared
tc.variables["ODR_TEST"] = False
tc.generate()

deps = CMakeDeps(self)
deps.generate()

def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()

def package(self):
copy(
self,
"*.hpp",
src=os.path.join(self.recipe_folder, "src"),
dst=os.path.join(self.export_sources_folder, "include"),
)

cmake = CMake(self)
cmake.install()

def package_info(self):
self.cpp_info.libs = ["odr"]
Empty file added recipes/odrcore/config.yml
Empty file.

0 comments on commit 8222cc2

Please sign in to comment.