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

Add PKGBUILDs for MSYS2/MinGW-w64 #56

Closed
wants to merge 3 commits into from

Conversation

williamjcm
Copy link
Contributor

The one in the corrade subdirectory builds from the latest release of Corrade (2018.10 as of this writing), and should be suitable for submission to https://github.com/Alexpux/MINGW-packages.

Both were tested on my MSYS2 installation, using both i686 and x86_64 versions of MSYS2-provided MinGW-w64 (based on GCC 7.4.0 and 8.2.1 respectively).

If things need to be changed, don't hesitate to mention it.

The one in the `corrade` subdirectory builds from the latest release of Corrade (2018.10 as of this writing), and *should* be suitable for submission to https://github.com/Alexpux/MINGW-packages
@codecov-io
Copy link

codecov-io commented Jan 25, 2019

Codecov Report

Merging #56 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #56   +/-   ##
=======================================
  Coverage   98.02%   98.02%           
=======================================
  Files          76       76           
  Lines        4974     4974           
=======================================
  Hits         4876     4876           
  Misses         98       98

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 798d75b...a8c656e. Read the comment docs.

Copy link
Owner

@mosra mosra left a comment

Choose a reason for hiding this comment

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

Thank you! 👍 Just a bunch of minor things.

package/PKGBUILD Outdated
options=(!strip)
provides=('corrade-git')

_rootdir=$startdir/../../
Copy link
Owner

Choose a reason for hiding this comment

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

Can you put both files into package/msys/ instead of directly in package/? Looks like this _rootdir variable is even expecting that :)

sha1sums=('SKIP')

build() {
[[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH}
Copy link
Owner

Choose a reason for hiding this comment

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

Is removing the directory necessary? Personally I'm not doing that in any package and looking around, the MSYS SDL2 package doesn't do that either.

So unless that's required by some guidelines, I would remove this line :)

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 copy-pasted it from the templates.

Maybe they have a reason for doing that.

Copy link
Owner

Choose a reason for hiding this comment

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

Some Arch templates had that too, but from my experience 90% packaging errors were from something else than broken build directory. So rather than waiting every time to get it built from scratch I would wipe the build-* directory manually in those remaining 10%.

This is usually needed with venerable Makefile-based systems where dependencies are not rebuilt correctly and such, not much of a problem here.

license=('MIT')
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" 'git' "${MINGW_PACKAGE_PREFIX}-ninja")
source=("${_realname}"::"git+https://github.com/mosra/corrade.git#tag=v$pkgver")
sha1sums=('SKIP')
Copy link
Owner

Choose a reason for hiding this comment

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

source=("https://github.com/mosra/corrade/archive/v${pkgver}.tar.gz")
sha1sums=('240c68bfe89a0cc86411b6854358b1607c06d90d')

Not sure why the original package was using git, that's much slower. Also no need for git in makedepends, then.

-G'Ninja' \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
"${extra_config[@]}" \
../${_realname}
Copy link
Owner

Choose a reason for hiding this comment

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

After the change of source above, this needs to be ../${_realname}-${pkgver}.

}

# vim: ts=2 sw=2 et:
# getver: no
Copy link
Owner

Choose a reason for hiding this comment

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

I kept the two-space indentation in the original PKGBUILD because @xyproto uses that for all his other packages. But since we're not bound by that here, can you make it four-space-indented like the other file?

Also, no need for the two above lines anymore. The first is handled with a project-wide .editorconfig, the second was AFAIK needed only because of the git sources, which are no more.

cd "${srcdir}"/build-${CARCH}
DESTDIR="${pkgdir}" ninja install

install -Dm644 "${srcdir}/${_realname}/COPYING" \
Copy link
Owner

Choose a reason for hiding this comment

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

... and this needs to be ${srcdir}/${_realname}-${pkgver}/COPYING.

pkgver=2018.10
pkgrel=1
pkgdesc='C++11/C++14 multiplatform utility library'
provides=('corrade')
Copy link
Owner

Choose a reason for hiding this comment

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

🤔 hmmm. Not sure about this line. Any reason why is it here? Otherwise I would just remove 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.

Yeah, you're right. I'll remove it.

@williamjcm
Copy link
Contributor Author

williamjcm commented Jan 25, 2019

Sorry, I messed up the file upload. I'll try fix it to the best of my ability.

I was inattentive, and put the files in the wrong place.

*facepalm*
And thanks to mosra for pointing my mistake out.
@williamjcm
Copy link
Contributor Author

Now that the files are where they belong, I'll edit them as required.

@williamjcm
Copy link
Contributor Author

Edits done.

@mosra
Copy link
Owner

mosra commented Jan 25, 2019

Pushed as cc49c1d, thanks a lot! 👍

@mosra mosra closed this Jan 25, 2019
@mosra mosra added this to the 2019.01 milestone Jan 25, 2019
@mosra mosra mentioned this pull request Jan 25, 2019
55 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

3 participants