Skip to content

Conversation

Renari
Copy link
Contributor

@Renari Renari commented Jun 10, 2021

Specify library name and version: ImageMagick/7.0.11-14

For #5502, copied from bincrafters/conan-imagemagick


  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the
    conan-center hook activated.

@CLAassistant
Copy link

CLAassistant commented Jun 10, 2021

CLA assistant check
All committers have signed the CLA.

@conan-center-bot

This comment has been minimized.

@madebr
Copy link
Contributor

madebr commented Jun 10, 2021

Thanks for the recipe!
It looks like a great start.
Please ask for EAP in #4 and let's see what c3i (=CI infrastructure) has to say about this.

@Croydon
Copy link
Contributor

Croydon commented Jun 11, 2021

Copied from https://github.com/bincrafters/conan-imagemagick as mentioned by me in #5502. Please mention this in the PR description to provide direct credits 🙂

@conan-center-bot

This comment has been minimized.

2 similar comments
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@Renari
Copy link
Contributor Author

Renari commented Jun 14, 2021

Does anyone know of a package that downloads multiple sources using conandata.yml that I can use for a reference?

@SpaceIm
Copy link
Contributor

SpaceIm commented Jun 14, 2021

cryptopp: source code and build system files split in 2 archives
cspice: 1 archive per os/arch/compiler

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@Renari
Copy link
Contributor Author

Renari commented Jun 14, 2021

I'm not sure why this is failing on windows, since the error given appears to be missing Visual C++ libraries. However on Linux the includes fail due to:

    def _copy_pkg_config(self, name):
        if name not in self.deps_cpp_info.deps:
            return
        root = self.deps_cpp_info[name].rootpath
        pc_dir = os.path.join(root, 'lib', 'pkgconfig')
        pc_files = glob.glob('%s/*.pc' % pc_dir)
        if not pc_files:
            pc_files = glob.glob('%s/*.pc' % root)
        for pc_name in pc_files:
            new_pc = os.path.join('pkgconfig', os.path.basename(pc_name))
            self.output.info('copying .pc file %s' % os.path.basename(pc_name))
            shutil.copy(pc_name, new_pc)
            prefix = tools.unix_path(root) if os.name == 'nt' else root
            tools.replace_prefix_in_pc_file(new_pc, prefix)

This is trying to copy pc files from other libraries lib directory to configure automake, CCI recipes do not ship these files and I'm not sure what the alternative is.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@Renari
Copy link
Contributor Author

Renari commented Jun 14, 2021

c:\j\w\buildsinglereference@3.conan\data\imagemagick\7.0.11-14__\build\e9c0c93677ff85fb899e6dbfa8bdb4a1d1209f98\visualmagick\configure\stdafx.h(17): fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory [C:\J\w\BuildSingleReference@3.conan\data\imagemagick\7.0.11-14__\build\e9c0c93677ff85fb899e6dbfa8bdb4a1d1209f98\VisualMagick\configure\configure.vcxproj]

I'm not sure how to fix this, build is working for me on linux.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@Renari
Copy link
Contributor Author

Renari commented Jun 28, 2021

It looks like afxwin.h is a MFC file which is not shipped in the express version of Visual C++. I'm not sure if it can be disabled.

@Renari
Copy link
Contributor Author

Renari commented Jun 28, 2021

https://github.com/ImageMagick/ImageMagick-Windows

It looks like MFC is required, I'm not sure there's anything I can do to add that.

@conan-center-bot

This comment has been minimized.

SSE4
SSE4 previously approved these changes Sep 25, 2021
Copy link
Contributor

@prince-chrismc prince-chrismc left a comment

Choose a reason for hiding this comment

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

Overwhelming this looks good just a couple follow-up questions

Comment on lines +159 to +163
for patch in self.conan_data.get("patches", {}).get(self.version, {}):
tools.patch(**patch)
Copy link
Contributor

Choose a reason for hiding this comment

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

The only patch is "remove deps" should it not be applied on all systems?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure this is from the original bincrafters recipe, I haven't changed anything related to windows builds since they don't currently work.


msbuild = MSBuild(self)
# fatal error C1189: #error: Please use the /MD switch for _AFXDLL builds
msbuild.build_env.flags = ["/MD"]
Copy link
Contributor

Choose a reason for hiding this comment

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

I've never worked with windows builds

Is the code provided function on your system? It seems odd to merge a lot of complicated logic if it's not somewhat working

@conan-center-bot

This comment has been minimized.

add conandata.yml


change source and build subfolders to property methods


additional library options use 'with_' prefix


os.name -> tools.os_info.is_windows


remove fPIC for shared build


add support for libjpeg turbo


crossbuilding support for test package


remove disabling of pango


change homepage to imagemagick.org


specify run_environment=True


download sources using conandata.yml


correct typo in directory name


run install during package step


move visualmagick to be a subelement of sources in conandata.yml


change handling of visualmagick in conandata.yml


move some tools.replace_in_file calls to patches


remove license export


remove shebang


update minimum cmake version


remove verbose make files


add with_pango option


remove cstdlib import


remove pc file generation


add pkg_config generator


correct some test keys


remove etc, pkgconfig and .la files


remove share directory


correct path for file removal


Add an option to control compilation of djvu support.

add components sourced from pc files


add pkg_config names


split pkg_config names into separate declarations


use requires to remove some duplicate component declarations


add FIXME for modeling FindImageMagick


move pthread to system_libs

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
update libtiff to  4.3.0


update openexr to 2.5.7


throw invalid configuration exception for windows due to mfc


remove unused shutil import


workaround for xorg/system includes

conan-io#6880
remove conan topic

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
change TOGO to FIXME

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
add info for modifying path

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
remove settings from cross_building

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
remove _is_mingw_windows property


condense source acquisition

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
condense source acquisition for visualmagick

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
convert test package to c implementation


replace self._major with tools.Version(self.version).major


remove copying pdb


clean up arguments


use msvs_toolset


add newer visual studio versions


formatting


define visualmagick_version


fix args redefinition removing some configure arguments


format visualmagick_version


Update recipes/imagemagick/all/conanfile.py

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Update recipes/imagemagick/all/conanfile.py

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
finish converting test package to run using C


move configuration check to validate method


Revert "finish converting test package to run using C"

This reverts commit 4f9ab48.

finish converting test package to run using C

fixed refactor issue where this modified the automake recipe
@conan-center-bot
Copy link
Contributor

All green in build 46 (74591351d70d432de2be514c75b9a04beec2ae0c):

  • imagemagick/7.0.11-14@:
    All packages built successfully! (All logs)

@prince-chrismc
Copy link
Contributor

Please do not force push 🙏 GitHub forces us to restart the review which is not fun!

Copy link
Contributor

@prince-chrismc prince-chrismc left a comment

Choose a reason for hiding this comment

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

🤞 we can short out the windows section soon

@Renari
Copy link
Contributor Author

Renari commented Sep 27, 2021

Please do not force push GitHub forces us to restart the review which is not fun!

Sorry I was rebasing and squashing all the commits so it shows up nicely on master.

@jgsogo
Copy link
Contributor

jgsogo commented Sep 27, 2021

Please do not force push GitHub forces us to restart the review which is not fun!

Sorry I was rebasing and squashing all the commits so it shows up nicely on master.

On the merge commit to master we squash all commits from the branch so only the title is visible in the history... but thanks for taking care of it (although it has some disadvantages for the review process).

image

@Renari
Copy link
Contributor Author

Renari commented Sep 27, 2021

Please do not force push GitHub forces us to restart the review which is not fun!

Sorry I was rebasing and squashing all the commits so it shows up nicely on master.

On the merge commit to master we squash all commits from the branch so only the title is visible in the history... but thanks for taking care of it (although it has some disadvantages for the review process).

![image](https://user-images.githubusercontent.com/1406456/134937440-3bf6930e-4723-4e67-aeea-4fb6494917e5.png)

Ah good to know I'll refrain from doing it in the future then.

@conan-center-bot conan-center-bot merged commit 3583871 into conan-io:master Sep 27, 2021
@prince-chrismc
Copy link
Contributor

Ah good to know I'll refrain from doing it in the future then.

Thank you and keep up the great contributions!

@Renari Renari deleted the imagemagick branch September 28, 2021 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.