-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
libgphoto2: add new recipe #7664
Conversation
This comment has been minimized.
This comment has been minimized.
This needs to be added to the |
self._autotools = AutoToolsBuildEnvironment(self) | ||
self._autotools.libs = [] | ||
yes_no = lambda v: "yes" if v else "no" | ||
auto_no = lambda v: "auto" if v else "no" |
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.
Please don't use auto
. auto
might mean yes or no, so it's kinda random.
If a library is not detected when using yes
, that means we must help the build system to find it.
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.
I'm not sure that would work. There is no yes
option
--with-libcurl=PREFIX where to find libcurl, "no" or "auto"
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.
I think auto
here means "try to find it"
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.
I checked the m4 files, and those --with
options accept prefixes.
Perhaps you can pass "--with-libcurl={}".format(tools.unix_path(self.deps_cpp_info["libcurl"].rootpath))
?
It indeed does not accept yes
.
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.
I just tried that, doesn't work. Everything seems to go well except a warning like below:
* Warning:
* libtool file libxml-2.0.la could not be found.
* We may be linking against the WRONG library.```
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.
I checked again, and your current approach looks fine after all.
no
disabled the functionality, and it will fall back to the pc files.
So LGTM.
Indeed, libgphoto uses a main library + loadable libraries. Feel free to add |
"utilsdir={}".format(tools.unix_path(os.path.join(self.package_folder, "bin"))), | ||
] | ||
if not self.options.with_libjpeg: | ||
args.append("--without-jpeg") |
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.
You can do: "with-jpeg={}".format(yes_no(self.options.with_libjpeg)
and add it to the list above.
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.
Are you sure? ./configure --help
does not list with-jpeg
as an option
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.
You're right about with-jpeg
. It doesn't support yes
.
I checked configure.ac
and it's behavior is "unsafe".
AC_ARG_WITH([jpeg], AS_HELP_STRING([--without-jpeg], [Build without jpeg library (default: no)]))
AS_IF([test "x$with_jpeg" != "xno"], [
AC_CHECK_LIB(jpeg,jpeg_start_decompress,[
AC_CHECK_HEADER(jpeglib.h,[
AC_DEFINE(HAVE_LIBJPEG,1,[define if we found LIBJPEG and its headers])
LIBJPEG="-ljpeg"
libjpeg_msg="yes"
])
])
])
If it cannot find the jpeg_start_decompress
symbol or find the jpeglib.h
header, it fails.
It can potentially not find libjpeg.
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
All green in build 4 (
|
* add libgphoto2 recipe * WIP * support only shared build; change test_package.c * Update recipes/libgphoto2/all/test_package/conanfile.py Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com> * patch for snprintf on macos Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Specify library name and version: libgphoto2/2.5.27
conan-center hook activated.