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

mpdecimal: Add version 4.0.0, fix mac cross-builds #25896

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Ahajha
Copy link
Contributor

@Ahajha Ahajha commented Nov 9, 2024

CPython 3.13 uses this version.

One of the patches related to mingw I believe is no longer necessary:

  • configure.ac now has explicit checks for mingw
  • The patch no longer cleanly applies, the code has significantly diverged

Also, autoreconf is never called, so these patches are useless anyways. I'll remove them in a future cleanup PR. I've tested locally with Mingw.

I also have two other mpdecimal PRs out: #25889 #25903

And one more after all 3 have been merged: #25918

@Ahajha Ahajha changed the title mpdecimal: Add version 4.0.0 mpdecimal: Add version 4.0.0, fix mac cross-builds Nov 9, 2024
Comment on lines 207 to +209
copy(self, "mpdecimal.h", src=mpdecdir, dst=pkg_dir / "include")
if self.options.cxx:
copy(self, "decimal.hh", src=mpdecppdir, dst=pkg_dir / "include")
copy(self, "decimal.hh", src=self.source_path / "libmpdec++", dst=pkg_dir / "include")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This section is weird. For some reason, in the cache folder, most of the the files are symlinks in 4.0.0, but actual files in 2.5.1. So we need to copy from the source folder instead. But this only affects the libmpdec++ folder. In fact, making this change to the libmpdec folder causes the C header to not get packaged. I don't understand any of why this is the case, but it works like this.

Also to note: I'm just being consistent here with the usage of *_path variables, I know they're deprecated.

Comment on lines 25 to 30
-MPD_CXXFLAGS = $(WARN) /nologo $(OPT)
-MPD_CXXFLAGS_SHARED = /DBUILD_LIBMPDECXX $(WARN) /nologo $(OPT_SHARED) $(PGOFLAGS)
-MPD_BIN_CXXFLAGS_SHARED = $(WARN) /nologo $(OPT_SHARED) $(PGOFLAGS)
+MPD_CXXFLAGS = $(WARN) /nologo $(OPT) $(CONAN_CXXFLAGS) $(CONAN_CFLAGS)
+MPD_CXXFLAGS_SHARED = /DBUILD_LIBMPDECXX $(WARN) /nologo $(OPT_SHARED) $(PGOFLAGS) $(CONAN_LDFLAGS)
+MPD_BIN_CXXFLAGS_SHARED = $(WARN) /nologo $(OPT_SHARED) $(PGOFLAGS) $(CONAN_LDFLAGS)
Copy link
Contributor Author

@Ahajha Ahajha Nov 9, 2024

Choose a reason for hiding this comment

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

Not sure if this section is still necessary, is this 1.x legacy? If so, I can remove from previous versions too. (there are a few other sections like this too)

This reverts commit 441adc7.
@Ahajha Ahajha mentioned this pull request Nov 12, 2024
@@ -1,4 +1,6 @@
versions:
"4.0.0":
folder: "2.5.x"
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking good! But it seems a little bit weird to have the 4.x.x versions inside the 2.5.x folder...
Maybe if changes aren't that big, we could consider renaming the 2.5.x folder to all

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That seems reasonable to me!

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you dare to do it?!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, yes I can :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@perseoGI perseoGI self-assigned this Nov 14, 2024
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.

2 participants