[Ruby] A story about sending a pull request to MinGW and updating the version of libgr

2 minute read

Introduction

Hello. I have updated the MinGW package, so I will write it.

Why do I have to update the MinGW package?

I think everyone uses package managers, but I think that there are surprisingly few people who have been involved in the maintenance of package managers. This is the first time for me to update the MinGW package.

About a year ago, I have been making graph drawing software GR.rb for Ruby for both hobby and actual profit. image.png

GR.rb is the binding of libgr. I don’t usually use Windows. However, thankfully, there is a request to support Windows, so details from creating PKGBUILD to registering the libgr package in MinGW. It was

Since then, a little time has passed, and the version of the original libgr is gradually increasing, so I thought that I should update now, so I increased my weight and updated from 0.50.0 to 0.51.2.

The update of the MingGW package was not difficult as a result, but I was very disappointed because there was no Japanese experience article that updated the package of MinGW. Write Qiita articles to help someone.

way

The basic method is the same as homebrew.

MSYS2 official page https://www.msys2.org/wiki/Creating-Packages/

The necessary information is included in, so I think it’s a good idea to read through it using Google Translate.

git clone

git clone https://github.com/Alexpux/MINGW-packages
cd MINGW-packages/mingw-w64-gr

You can change the origin later, but it’s easier if you fork from the beginning.

git clone https://github.com/YOURNAME/MINGW-packages
cd MINGW-packages/mingw-w64-gr

Editing PKGBUILD

Update the package version number.

PKGBUILD


pkgver=0.51.2

update sha256sum

PKGBUILD


sha256sums=("E6A3D0ED911F6E59CC2293B5694EE18A0620849E666143870A9EDA71C02BB833")

Also, this time, the patch that was applied last time seemed to be unnecessary, so I removed it.

Build and install

makepkg-mingw -sCLf
pacman -U mingw-w64-*-gr-*-any.pkg.tar.xz

You can

Send pull request

If you’re okay, break your branch and send a pull request. Don’t forget

git pull --rebase

The name of the branch seems to be good, but I chose gr-0.51.2. The commit of the pull request is mixed in uppercase and lowercase letters, but it seems that you can do it with gr: Update to 0.51.2 or gr: update to 0.51.2.

Once you’ve submitted your pull request, make sure your CI passes. If it passes, the person who is doing maintenance should check and merge it.

This PR was successfully merged within a few hours. It seems that maintenance is being carried out quite actively.

in conclusion

MinGW is not afraid to just update the version!

That’s it for this article.