-
Notifications
You must be signed in to change notification settings - Fork 13
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
Support for MSYS2 / MinGW64 #27
Comments
/cc: @sivoais |
The path problem can be fixed with On my system:
#!perl
use strict;
use warnings;
use Text::ParseWords;
use v5.016;
my @flags = shellwords(<>);
say( join $/,
map {
if( my ($type, $path) = $_ =~ /^(-[IL])(.*)$/ ) {
my $win_path = qx(C:/msys64/usr/bin/cygpath -w $path);
chomp $win_path;
"$type$win_path";
} else {
$_;
}
} @flags ); > pkg-config.bat --with-path=C:\msys64\mingw64\lib\pkgconfig --cflags gtk+-3.0
-I/mingw64/include/gtk-3.0 -mms-bitfields -I/mingw64/include/pango-1.0 -I/mingw64/include/glib-2.0 -I/mingw64/lib/glib-2.0/include -I/mingw64/include/cairo -I/mingw64/include/gdk-pixbuf-2.0 -I/mingw64/include/atk-1.0
> pkg-config.bat --with-path=C:\msys64\mingw64\lib\pkgconfig --cflags gtk+-3.0 | perl convert-flags-with-cygpath.pl
-IC:\msys64\mingw64\include\gtk-3.0
-mms-bitfields
-IC:\msys64\mingw64\include\pango-1.0
-IC:\msys64\mingw64\include\glib-2.0
-IC:\msys64\mingw64\lib\glib-2.0\include
-IC:\msys64\mingw64\include\cairo
-IC:\msys64\mingw64\include\gdk-pixbuf-2.0
-IC:\msys64\mingw64\include\atk-1.0
|
Another difference is that MSYS2 pkg-config seems to default to --static
update: this seems intentional. build() {
cd ${srcdir}/${pkgname}-${pkgver}
./configure \
--build=${CHOST} \
--host=${CHOST} \
--prefix=/usr \
--with-internal-glib \
--enable-indirect-deps
make
} |
MSYS2 has a default search path as mentioned in 32d2ba5 .
|
It might be useful to note that the search path MSYS2: MINGW32: MINGW64: The reason is that you don't really want to compile against the MSYS2 environment. A good description pulled from the MSYS2 documentation is:
|
@zmughal Good background! It makes more sense now. When running PkgConfig.pm with MSYS2 Perl, you should get the same search path with or without the environment variable now. |
MSYS2 / MinGW64 has .pc files that are relative to the MinGW64 root.
Strawberry Perl
MSYS2 / MinGW64 shell
The text was updated successfully, but these errors were encountered: