Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add asfernandes-cloop/0.0.0 #8951

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions recipes/asfernandes-cloop/all/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 3.1)

project(cloop CXX)

include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
conan_basic_setup(TARGETS)

# ---- cloop executable ----

add_executable(
cloop
src/cloop/Expr.cpp
src/cloop/Generator.cpp
src/cloop/Lexer.cpp
src/cloop/Main.cpp
src/cloop/Parser.cpp
src/cloop/Expr.h
src/cloop/Generator.h
src/cloop/Lexer.h
src/cloop/Parser.h
)

# ---- Install rules ----

include(GNUInstallDirs)
install(TARGETS cloop RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
4 changes: 4 additions & 0 deletions recipes/asfernandes-cloop/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sources:
"0.0.0":
sha256: "9f1415b08b5ac287656e08d2abbc78be99ba53f52713b5979aba312609bd5baf"
url: https://github.com/asfernandes/cloop/archive/c5bd2516985660264a0ea72ade89f95a4bef3fd1.zip
52 changes: 52 additions & 0 deletions recipes/asfernandes-cloop/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import functools
import os

from conans import CMake, ConanFile, tools

required_conan_version = ">=1.43.0"


class CloopConan(ConanFile):
name = "asfernandes-cloop"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/asfernandes/cloop"
description = "Cross Language Object Oriented Programming"
topics = ("parser", "idl")
license = "???"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This project uses the IDPL. This license does not have a SPDX identifier. What should it be named here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uilianries I think we had some format for custom licenses not listed in SPDX, do you remember?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, we are using Unlicensed when there is no license or is using Public Domain. But here is a different case, we just don't have a short name. IDPL is very close to Interbase-1.0, only the last paragraph is different. I would suggest using Developer's Public License Version 1.0 for now and adding a # TODO for later. I see the developer involved is Brazilian (whata luck), I'll send an email asking him about the license.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @SSE4! I just the email now and pointed this thread.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this. FirebirdSQL is also licensed with IDPL, so it will prove to be useful for that.

settings = ("os", "arch", "compiler", "build_type")
options = {
"fPIC": [True, False],
}
default_options = {
"fPIC": True,
}
generators = ("cmake",)
# FIXME: remove the CML once https://github.com/asfernandes/cloop/pull/7 is
# merged
exports_sources = ("CMakeLists.txt", "idpl.txt")
no_copy_source = True

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC

def source(self):
tools.get(**self.conan_data["sources"][self.version], strip_root=True)

@functools.lru_cache(1)
def _configure_cmake(self):
cmake = CMake(self)
cmake.configure()
return cmake

def build(self):
self._configure_cmake().build()

def package(self):
self.copy("idpl.txt", "licenses")
self._configure_cmake().install()

def package_info(self):
bindir = os.path.join(self.package_folder, "bin")
self.output.info(f"Appending PATH environment variable: {bindir}")
self.env_info.PATH.append(bindir)
203 changes: 203 additions & 0 deletions recipes/asfernandes-cloop/all/idpl.txt

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions recipes/asfernandes-cloop/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import os

from conans import ConanFile, tools


class TestPackageConan(ConanFile):
settings = ("os", "arch", "compiler", "build_type")

def test(self):
if not tools.cross_building(self):
idl = os.path.join(self.source_folder, "idl.idl")
self.run(f"cloop {idl} json idl.json", run_environment=True)
4 changes: 4 additions & 0 deletions recipes/asfernandes-cloop/all/test_package/idl.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface Disposable
{
void dispose();
}
3 changes: 3 additions & 0 deletions recipes/asfernandes-cloop/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
versions:
"0.0.0":
folder: all