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

[portmidi] Add non-Windows support, refactory install process #19710

Merged
merged 16 commits into from
Sep 17, 2021

Conversation

JackBoosY
Copy link
Contributor

@JackBoosY JackBoosY commented Aug 23, 2021

This PR will:

  1. Add support for non-Windows.
  2. Refactory all the install process by adding patch instead of write code in portfile.cmake.
  3. Disable java support and test.
  4. Enable build dynamic on Windows by adding compile option USE_DLL to the target (the upstream leave it in the header but didn't use it).

Fixes #19694.

@JackBoosY JackBoosY added category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist info:internal This PR or Issue was filed by the vcpkg team. labels Aug 23, 2021
@JackBoosY JackBoosY requested a review from PhoebeHui August 24, 2021 06:57
@JackBoosY JackBoosY changed the title [portmidi] Add *inx support, refactory install process [portmidi] Add non-Windows support, refactory install process Aug 27, 2021
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
+ if (JAVA_SUPPORT)
+ INSTALL(TARGETS pmjni
Copy link
Contributor Author

@JackBoosY JackBoosY Aug 27, 2021

Choose a reason for hiding this comment

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

This target pmjni requires java executable on local machine, so I disabled it.
In source/portmidi/trunk/pm_java/CMakeLists.txt:

    add_custom_command(OUTPUT pmdefaults/PmDefaultsFrame.class
        COMMAND javac -classpath . pmdefaults/PmDefaultsFrame.java
	MAIN_DEPENDENCY pmdefaults/PmDefaultsFrame.java
	DEPENDS pmdefaults/PmDefaults.java
	WORKING_DIRECTORY .)
    add_custom_command(OUTPUT pmdefaults/PmDefaults.class
        COMMAND javac -classpath . pmdefaults/PmDefaults.java
	MAIN_DEPENDENCY pmdefaults/PmDefaults.java
	DEPENDS pmdefaults/PmDefaultsFrame.java
	WORKING_DIRECTORY .)

@PhoebeHui PhoebeHui added the info:reviewed Pull Request changes follow basic guidelines label Aug 27, 2021
@stekyne
Copy link
Contributor

stekyne commented Aug 31, 2021

Nice work, would be great to get this in. Is #19366 redundant due to this PR?

# Conflicts:
#	ports/portmidi/portfile.cmake
#	ports/portmidi/vcpkg.json
#	versions/p-/portmidi.json
Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

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

The DLL change seems incorrect

@BillyONeal BillyONeal removed the info:reviewed Pull Request changes follow basic guidelines label Sep 2, 2021
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 2d8e2a8a475895577517392d74f1b7b1ecfc832d -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/p-/portmidi.json b/versions/p-/portmidi.json
index 479e178..1205e03 100644
--- a/versions/p-/portmidi.json
+++ b/versions/p-/portmidi.json
@@ -1,7 +1,7 @@
 {
   "versions": [
     {
-      "git-tree": "6b1a65f29feed5c59672bf0772f2a29edc7e2d02",
+      "git-tree": "70a85d5a9ddc162df4c7296caf7ac8633089d50c",
       "version-string": "0.234",
       "port-version": 2
     },

versions/p-/portmidi.json Outdated Show resolved Hide resolved
@PhoebeHui PhoebeHui marked this pull request as draft September 7, 2021 08:25
@PhoebeHui PhoebeHui marked this pull request as ready for review September 17, 2021 09:16
@JackBoosY
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@PhoebeHui PhoebeHui added info:reviewed Pull Request changes follow basic guidelines and removed info:reviewed Pull Request changes follow basic guidelines labels Sep 17, 2021
@BillyONeal BillyONeal merged commit bd0aeb7 into microsoft:master Sep 17, 2021
@BillyONeal
Copy link
Member

Thanks for your fix!

@JackBoosY JackBoosY deleted the dev/jack/19694 branch September 18, 2021 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[portmidi] Add Linux support
4 participants