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

pexports: add pexports/0.47 recipe #7050

Merged
merged 3 commits into from
Aug 31, 2021

Conversation

madebr
Copy link
Contributor

@madebr madebr commented Aug 25, 2021

Specify library name and version: pexports/0.47


  • 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.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

All green in build 3 (fc02d13f5908b02a810ac3b1c10afb1951f6401e):

  • pexports/0.47@:
    All packages built successfully! (All logs)

- extern __declspec(dllimport) void __stdcall *GetModuleHandleA(char *name);
- extern __declspec(dllimport) void __stdcall *GetProcAddress(void *module, char *name);
+ extern __declspec(dllimport) void * __stdcall GetModuleHandleA(char *name);
+ extern __declspec(dllimport) void * __stdcall GetProcAddress(void *module, char *name);
Copy link
Contributor

Choose a reason for hiding this comment

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

for sure, these functions return pointers (HMODULE/HINSTANCE and a function pointer)
seems like upstream has a bug

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 think the C standard says to assume that EAX (=result variable) is clobbered.

message(FATAL_ERROR "pexports only supports Windows")
endif()

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
Copy link
Contributor

Choose a reason for hiding this comment

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

why so complex CMakeLists.txt for test_package?
did you borrow it somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it's homebrew.
It's just creating a dll -> running pexports on the dll -> running dlltool/lib to create an import library -> create an exe using the import library.

It's do-able outside cmake by just sequentially executing the commands, but I can re-use some cmake variables here.

@@ -0,0 +1,32 @@
--- pexports.c
+++ pexports.c
Copy link
Member

Choose a reason for hiding this comment

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

it seems be a feature patch, but doesn't break when missing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed. I added it to be able to test pexports on non-Windows systems.

@conan-center-bot conan-center-bot merged commit a16efdd into conan-io:master Aug 31, 2021
@madebr madebr deleted the pexports_recipe branch August 31, 2021 12:40
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.

5 participants