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

[nyan-lang] Add new port nyan-lang #32250

Merged
merged 24 commits into from
Sep 1, 2023
Merged

Conversation

duanqn
Copy link
Contributor

@duanqn duanqn commented Jun 27, 2023

Fixes 32249

  • Changes comply with the maintainer guide
  • The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines.
  • Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all find_package calls are REQUIRED, are satisfied by vcpkg.json's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx
  • The versioning scheme in vcpkg.json matches what upstream says.
  • The license declaration in vcpkg.json matches what upstream says.
  • The installed as the "copyright" file matches what upstream says.
  • The source code of the component installed comes from an authoritative source.
  • The generated "usage text" is accurate. See adding-usage for context.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is in the new port's versions file.
  • Only one version is added to each modified port's versions file.

@JonLiu1993 JonLiu1993 linked an issue Jun 27, 2023 that may be closed by this pull request
@duanqn
Copy link
Contributor Author

duanqn commented Jun 27, 2023

Name should be nyan-lang

@Adela0814 Adela0814 added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Jun 27, 2023
@duanqn
Copy link
Contributor Author

duanqn commented Jun 30, 2023

Let me figure out what this means

warning: The following EXEs were found in /bin or /debug/bin. EXEs are not valid distribution targets.

    D:\packages\nyan-lang_x86-windows\bin\nyancat.exe

warning: The following EXEs were found in /bin or /debug/bin. EXEs are not valid distribution targets.

    D:\packages\nyan-lang_x86-windows\debug\bin\nyancat.exe

@duanqn
Copy link
Contributor Author

duanqn commented Jun 30, 2023

Hi @Adela0814 , how should I handle these exe files? Should I put them under tools\ instead of bin\ ?

@Adela0814
Copy link
Contributor

Hi @Adela0814 , how should I handle these exe files? Should I put them under tools\ instead of bin\ ?

Yes, please move the executable file to the tools\.

@duanqn
Copy link
Contributor Author

duanqn commented Jul 4, 2023

Will contact upstream for build failures

ports/nyan-lang/portfile.cmake Outdated Show resolved Hide resolved
ports/nyan-lang/portfile.cmake Outdated Show resolved Hide resolved
ports/nyan-lang/portfile.cmake Outdated Show resolved Hide resolved
ports/nyan-lang/portfile.cmake Outdated Show resolved Hide resolved
ports/nyan-lang/portfile.cmake Outdated Show resolved Hide resolved
ports/nyan-lang/portfile.cmake Outdated Show resolved Hide resolved
ports/nyan-lang/portfile.cmake Outdated Show resolved Hide resolved
ports/nyan-lang/portfile.cmake Outdated Show resolved Hide resolved
@duanqn
Copy link
Contributor Author

duanqn commented Jul 7, 2023

UWP builds are failing because SymInitialize is not available.

@duanqn
Copy link
Contributor Author

duanqn commented Jul 11, 2023

Hi @Adela0814 , is there a way to detect UWP builds? I contacted upstream and the maintainers want to remove the usage of SymInitialize in UWP builds.

Copy link
Contributor

@dg0yt dg0yt left a comment

Choose a reason for hiding this comment

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

I would still recommend switching to setting FLEX_EXECUTABLE.

Comment on lines 18 to 20
-if(WIN32)
+if(WIN32 AND (NOT WINDOWS_STORE))
set_target_properties(nyan PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
Copy link
Contributor

Choose a reason for hiding this comment

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

If upstream really needs to export all symbols on Windows, can it really work without that on UWP?

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 entirely sure about the purpose of setting up symbols. It could be a "because we can" scenario here...

@duanqn
Copy link
Contributor Author

duanqn commented Jul 17, 2023

I would still recommend switching to setting FLEX_EXECUTABLE.

@dg0yt nyan/CMakeLists.txt has find_package(FLEX 2.6 REQUIRED). Does setting FLEX_EXECUTABLE work for find_package?

@duanqn duanqn marked this pull request as ready for review July 24, 2023 03:44
@Adela0814 Adela0814 changed the title Add new port nyan [nyan-lang] Add new port nyan-lang Jul 25, 2023
Comment on lines 14 to 20
cmake_path(GET FLEX PARENT_PATH FLEX_PATH)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
"-DFLEX_ROOT=${FLEX_PATH}"
-DCMAKE_POLICY_DEFAULT_CMP0074=NEW
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cmake_path(GET FLEX PARENT_PATH FLEX_PATH)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
"-DFLEX_ROOT=${FLEX_PATH}"
-DCMAKE_POLICY_DEFAULT_CMP0074=NEW
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
"-DFLEX_EXECUTABLE=${FLEX}"

@Adela0814
Copy link
Contributor

Note: I will be converting your PR to draft status. When you respond, please revert to "ready for review". That way, I can be aware that you've responded since you can't modify the tags.

@Adela0814 Adela0814 marked this pull request as draft July 25, 2023 10:31
@dg0yt
Copy link
Contributor

dg0yt commented Jul 25, 2023

I would still recommend switching to setting FLEX_EXECUTABLE.

@dg0yt nyan/CMakeLists.txt has find_package(FLEX 2.6 REQUIRED). Does setting FLEX_EXECUTABLE work for find_package?

Yes. The package does a find_program(FLEX_EXECUTABLE ...), and setting this cache variable (aka input variable) in advance is a public interface. In vcpkg, it is used in five other ports.

@duanqn duanqn marked this pull request as ready for review August 30, 2023 07:00
@duanqn
Copy link
Contributor Author

duanqn commented Aug 30, 2023

Applied suggested changes and rebased to latest master branch.

@duanqn duanqn requested a review from Adela0814 August 30, 2023 07:01
@Adela0814 Adela0814 added the info:reviewed Pull Request changes follow basic guidelines label Sep 1, 2023
@dan-shaw dan-shaw merged commit 73827e6 into microsoft:master Sep 1, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR! info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[New Port Request] nyan
4 participants