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

New package: Gpp #26487

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions recipes/gpp/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sources:
"2.28":
url: "https://github.com/logological/gpp/releases/download/2.28/gpp-2.28.tar.bz2"
sha256: "343d33d562e2492ca9b51ff2cc4b06968a17a85fdc59d5d4e78eed3b1d854b70"
63 changes: 63 additions & 0 deletions recipes/gpp/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@

import os

from conan import ConanFile
from conan.tools.gnu import AutotoolsToolchain, Autotools
from conan.tools.layout import basic_layout
from conan.tools.files import chdir, get
from conan.tools.env import VirtualBuildEnv

class GppConan(ConanFile):
name = "gpp"
version = "2.28"
package_type = "application"

# Optional metadata
license = "GPL-3.0"
author = "Dan Weatherill <[email protected]>"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://logological.org/gpp"
description = "A generic preprocessor"
# Binary configuration
settings = "os", "compiler", "build_type", "arch"

def build_requirements(self):
self.tool_requires("automake/1.16.5")
self.tool_requires("autoconf/2.71")

if self.settings_build.os == "Windows":
self.win_bash = True
self.tool_requires("msys2/cci.latest")
self.tool_requires("mingw-builds/14.2.0")

def configure(self):
# The library is C only
self.settings.rm_safe("compiler.libcxx")
self.settings.rm_safe("compiler.cppstd")

def package_id(self):
del self.info.settings.arch
del self.info.settings.compiler
del self.info.settings.build_type

def layout(self):
basic_layout(self, src_folder="src")

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

def generate(self):
env = VirtualBuildEnv(self)
env.generate()
at_toolchain = AutotoolsToolchain(self)
at_toolchain.generate()

def build(self):
autotools = Autotools(self)
autotools.autoreconf()
autotools.configure()
autotools.make()

def package(self):
autotools = Autotools(self)
autotools.install()
3 changes: 3 additions & 0 deletions recipes/gpp/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
versions:
"2.28":
folder: all