-
Notifications
You must be signed in to change notification settings - Fork 2k
New: Usr: Added gtkmm/2.24.5 #3410
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
sources: | ||
"2.24.5": | ||
sha256: 0680a53b7bf90b4e4bf444d1d89e6df41c777e0bacc96e9c09fc4dd2f5fe6b72 | ||
url: https://download.gnome.org/sources/gtkmm/2.24/gtkmm-2.24.5.tar.xz | ||
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,80 @@ | ||||||||||||||||||||||||
import os | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
from conans import ConanFile, tools, AutoToolsBuildEnvironment | ||||||||||||||||||||||||
from conans.errors import ConanException | ||||||||||||||||||||||||
bverhagen marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||
|
||||||||||||||||||||||||
class ConanGTK(ConanFile): | ||||||||||||||||||||||||
bverhagen marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||
name = "gtkmm" | ||||||||||||||||||||||||
url = "https://github.com/conan-io/conan-center-index" | ||||||||||||||||||||||||
license = "LGPL-2.1-or-later" | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is also a |
||||||||||||||||||||||||
homepage = "https://www.gtk.org" | ||||||||||||||||||||||||
description = "The C++ API for GTK." | ||||||||||||||||||||||||
settings = {"os": "Linux"} | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||
options = {"version": [2]} | ||||||||||||||||||||||||
default_options = {"version": 2} | ||||||||||||||||||||||||
Comment on lines
+13
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This option depends on the value Also, I don't see you using this gtk version value anywhere in the recipe. I would do the following:
Suggested change
and use |
||||||||||||||||||||||||
topics = ("gui", "widget", "graphical") | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
settings = "os", "compiler", "build_type", "arch" | ||||||||||||||||||||||||
options = {"shared": [True, False], | ||||||||||||||||||||||||
"fPIC": [True, False], | ||||||||||||||||||||||||
} | ||||||||||||||||||||||||
default_options = {"shared": False, | ||||||||||||||||||||||||
"fPIC": True} | ||||||||||||||||||||||||
generators = "pkg_config" | ||||||||||||||||||||||||
_autoconf = None | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
@property | ||||||||||||||||||||||||
def _source_subfolder(self): | ||||||||||||||||||||||||
return "source_subfolder" | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
@property | ||||||||||||||||||||||||
def _build_subfolder(self): | ||||||||||||||||||||||||
return "build_subfolder" | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
def config_options(self): | ||||||||||||||||||||||||
if self.settings.os == "Windows": | ||||||||||||||||||||||||
del self.options.fPIC | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
def configure(self): | ||||||||||||||||||||||||
if self.settings.compiler == "Visual Studio" and \ | ||||||||||||||||||||||||
"MT" in str(self.settings.compiler.runtime) and self.options.shared: | ||||||||||||||||||||||||
raise ConanInvalidConfiguration("Visual Studio and Runtime MT is not supported for shared library.") | ||||||||||||||||||||||||
if self.options.shared: | ||||||||||||||||||||||||
del self.options.fPIC | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
def source(self): | ||||||||||||||||||||||||
tools.get(**self.conan_data["sources"][self.version]) | ||||||||||||||||||||||||
extracted_dir = self.name + "-" + self.version | ||||||||||||||||||||||||
os.rename(extracted_dir, self._source_subfolder) | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
def requirements(self): | ||||||||||||||||||||||||
self.requires('gtk/system') | ||||||||||||||||||||||||
self.requires('libsigcpp/3.0.0') | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
def _configure_build(self): | ||||||||||||||||||||||||
if self._autoconf: | ||||||||||||||||||||||||
return self._autoconf | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
self._autoconf = AutoToolsBuildEnvironment(self) | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. gtkmm has meson support. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I preferred to use Meson too, but the |
||||||||||||||||||||||||
return self._autoconf | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
def build(self): | ||||||||||||||||||||||||
tools.replace_in_file(self._source_subfolder + '/configure', "gtk+-2.0 >= 2.24.0", "gtk+-2.0") | ||||||||||||||||||||||||
bverhagen marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||
|
||||||||||||||||||||||||
autoconf = self._configure_build() | ||||||||||||||||||||||||
autoconf.configure(configure_dir=self._source_subfolder, | ||||||||||||||||||||||||
vars = { | ||||||||||||||||||||||||
'cross_compiling': 'no' | ||||||||||||||||||||||||
} | ||||||||||||||||||||||||
) | ||||||||||||||||||||||||
autoconf.make() | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
def package(self): | ||||||||||||||||||||||||
self.copy("LICENSE", dst="licenses", src=self._source_subfolder) | ||||||||||||||||||||||||
autoconf = self._configure_build() | ||||||||||||||||||||||||
autoconf.install() | ||||||||||||||||||||||||
tools.rmdir(os.path.join(self.package_folder, "share")) | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I see a lot of html files in res/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not. Are we talking about the same package? |
||||||||||||||||||||||||
|
||||||||||||||||||||||||
def package_info(self): | ||||||||||||||||||||||||
self.cpp_info.includedirs = ['include', 'include/gtkmm-2.4', 'include/gdkmm-2.4'] | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you know how this |
||||||||||||||||||||||||
self.cpp_info.libs = tools.collect_libs(self) | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not see that file. Are we talking about the same package ( |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
versions: | ||
"system": | ||
folder: "system" | ||
"2.24.5": | ||
folder: "2.x.x" |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this actually co-operate with the current cci
gtk/system
recipe?We don't have a gtk recipe built from sources (yet).