libredwg icon indicating copy to clipboard operation
libredwg copied to clipboard

memmem issue on Apple's 10.6 SDK (was: Package the code to vcpkg)

Open msclock opened this issue 2 years ago • 8 comments

Can we package the code to vcpkg?

Are there any guidelines or permits I should follow?

msclock avatar Mar 02 '23 03:03 msclock

Sure you can. See the various cmake or mingw autotools recipes.

rurban avatar Mar 02 '23 05:03 rurban

I have submit a pr to vcpkg. https://github.com/microsoft/vcpkg/pull/30005.

This is the usage: https://github.com/msclock/vcpkg/blob/bfa07fd074023fe0b4eb835363d280c80256572e/ports/libredwg/usage#L1-L4

All scripts I configured are based on the cmake build system.

I came across a configuration item that needed to be lowered.

  • memmem could be checked by cmake but it reports an error on Apple, so the my_memmem option is opened by replacing defined(COMMON_TEST_C) with a true condition all the time. https://github.com/msclock/vcpkg/blob/bfa07fd074023fe0b4eb835363d280c80256572e/ports/libredwg/portfile.cmake#L37-L46

msclock avatar Mar 03 '23 19:03 msclock

The memmem issue on Apple's 10.6 SDK is already handled by the 2nd case in common.h, just the declaration is missing. There I assume HAVE_MEMMEM is 1, but the decl in string.h is missing.

rurban avatar Mar 04 '23 09:03 rurban

The memmem issue on Apple's 10.6 SDK is already handled by the 2nd case in common.h, just the declaration is missing. There I assume HAVE_MEMMEM is 1, but the decl in string.h is missing.

Well, it is. HAVE_MEMMEM was evalated as 1 but it reports implicitly decl error. The assumption is not valid so that I have to set an eternal true condition on Apple.

msclock avatar Mar 04 '23 16:03 msclock

So I'll try to come up with a better fix

rurban avatar Mar 04 '23 22:03 rurban

I've added now a vcpkg.json

rurban avatar Aug 03 '23 11:08 rurban

@rurban Got it. I've noticed that with the current quick iteration, maybe we can create our own registry for quick iterative updates, and then push it to the official VCPKG registry when it stabilizes. Please refer to:

I will create a pr implement it a bit later.

msclock avatar Aug 04 '23 03:08 msclock

msclock @.***> schrieb am Fr., 4. Aug. 2023, 05:01:

@rurban https://github.com/rurban Got it. I've noticed that with the current quick iteration, maybe we can create our own registry for quick iterative updates, and then push it to the official VCPKG registry when it stabilizes. Please refer to:

I'm rather happy with you pushing to the registry for releases. Nightlies not so much.

Reini

rurban avatar Aug 04 '23 05:08 rurban