-
Notifications
You must be signed in to change notification settings - Fork 109
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
Conversation
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 Report
@@ 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.
|
There was a problem hiding this 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/../../ |
There was a problem hiding this comment.
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 :)
package/corrade/PKGBUILD
Outdated
sha1sums=('SKIP') | ||
|
||
build() { | ||
[[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
package/corrade/PKGBUILD
Outdated
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') |
There was a problem hiding this comment.
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.
package/corrade/PKGBUILD
Outdated
-G'Ninja' \ | ||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ | ||
"${extra_config[@]}" \ | ||
../${_realname} |
There was a problem hiding this comment.
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}
.
package/corrade/PKGBUILD
Outdated
} | ||
|
||
# vim: ts=2 sw=2 et: | ||
# getver: no |
There was a problem hiding this comment.
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.
package/corrade/PKGBUILD
Outdated
cd "${srcdir}"/build-${CARCH} | ||
DESTDIR="${pkgdir}" ninja install | ||
|
||
install -Dm644 "${srcdir}/${_realname}/COPYING" \ |
There was a problem hiding this comment.
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
.
package/corrade/PKGBUILD
Outdated
pkgver=2018.10 | ||
pkgrel=1 | ||
pkgdesc='C++11/C++14 multiplatform utility library' | ||
provides=('corrade') |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.
Now that the files are where they belong, I'll edit them as required. |
Edits done. |
Pushed as cc49c1d, thanks a lot! 👍 |
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.