Skip to content

Commit 75abca2

Browse files
authored
Merge pull request #4 from zmughal/msys2-build
GHA: Add MSYS2 build
2 parents 5d4402e + 2717d67 commit 75abca2

File tree

5 files changed

+64
-8
lines changed

5 files changed

+64
-8
lines changed

.github/workflows/ci.yml

+30
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,33 @@ jobs:
6464
- name: Show pkg-config files
6565
run: |
6666
head -n100 *.pc
67+
ci-msys2:
68+
runs-on: windows-latest
69+
strategy:
70+
fail-fast: false
71+
defaults:
72+
run:
73+
shell: msys2 {0}
74+
steps:
75+
- uses: actions/checkout@v2
76+
- name: Set up build
77+
uses: msys2/setup-msys2@v2
78+
with:
79+
update: true
80+
install: >-
81+
base-devel
82+
autotools
83+
mingw-w64-x86_64-toolchain
84+
mingw-w64-x86_64-libpng
85+
- name: Bootstrap
86+
run: |
87+
sh ./bootstrap
88+
- name: Configure
89+
run: |
90+
sh ./configure
91+
- name: Make
92+
run: |
93+
make
94+
- name: Show pkg-config files
95+
run: |
96+
head -n100 *.pc

configure.ac

+24-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ AC_CHECK_LIB(m, sincos)
4848
dnl Checks for header files.
4949
AC_HEADER_STDC
5050
AC_PATH_XTRA
51-
AC_CHECK_HEADERS([fcntl.h limits.h memory.h netdb.h netinet/in.h stddef.h sys/file.h sys/socket.h sys/systeminfo.h sys/time.h termios.h unistd.h values.h])
51+
AC_CHECK_HEADERS([fcntl.h limits.h memory.h netdb.h netinet/in.h stddef.h sys/file.h sys/socket.h sys/systeminfo.h sys/time.h unistd.h values.h])
52+
53+
AC_SYS_POSIX_TERMIOS
5254

5355
dnl get the flags required to link other languages against fortran
5456
dnl using their compilers, not fortran
@@ -70,7 +72,7 @@ dnl These are the driver files that will actually be built.
7072
dnl In true autoconf style, we do not attempt to generate this list
7173
dnl automatically (see the automake manual's FAQ for justification).
7274

73-
drivers="exdriv.lo pgdriv.lo cadriv.lo hgdriv.lo lxdriv.lo vtdriv.lo hidriv.lo psdriv.lo ttdriv.lo cwdriv.lo gldriv.lo nedriv.lo hpdriv.lo lsdriv.lo nudriv.lo qmdriv.lo vadriv.lo cgdriv.lo nexsup.lo rvdriv.lo xmdriv.lo tkdriv.lo pkdriv.lo xadriv.lo"
75+
drivers="exdriv.lo pgdriv.lo cadriv.lo hgdriv.lo lxdriv.lo hidriv.lo psdriv.lo cwdriv.lo gldriv.lo hpdriv.lo lsdriv.lo nudriv.lo qmdriv.lo vadriv.lo cgdriv.lo rvdriv.lo xmdriv.lo tkdriv.lo pkdriv.lo xadriv.lo"
7476

7577
dnl Not all platforms have X
7678
have_x11=no
@@ -197,6 +199,24 @@ AS_IF([test "$mst_prog_gnu_f77_version" != '0.0.0' && test "$mst_prog_gnu_f77_ve
197199
AC_SUBST([PKG_CONFIG_LIBS])
198200
AC_SUBST([PKG_CONFIG_CFLAGS])
199201

202+
dnl drivers ttdriv and vtdriv require termios; only include them if
203+
dnl it's available.
204+
205+
AM_CONDITIONAL([HAVE_TERMIOS], [test "$ac_cv_sys_posix_termios" = "yes" ])
206+
207+
AS_IF( [test "$ac_cv_sys_posix_termios" = "yes" ],
208+
[
209+
drivers="$drivers ttdriv.lo vtdriv.lo"
210+
]
211+
)
212+
213+
dnl drivers nexup and nedriv require sys/socket.h
214+
AS_IF([test "$ac_cv_header_sys_socket_h" = "yes"],
215+
[
216+
drivers="$drivers nexsup.lo nedriv.lo"
217+
]
218+
)
219+
200220

201221

202222
dnl Add the png driver if the PNG header and library are available.
@@ -241,6 +261,8 @@ AS_IF([test $have_png = yes],
241261
)
242262

243263

264+
265+
244266
dnl clean up pkg-config requires line
245267
PKG_CONFIG_REQUIRES=`echo $PKG_CONFIG_REQUIRES | ${ac_cv_path_SED} "s/^,//"`
246268
AC_SUBST(PKG_CONFIG_REQUIRES)

drivers/Makefile.am

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ grexec.f: $(BUILT_DRIVER_ROUTINES) makegrexec.pl
3131
# These are all the driver routines, even if they do not build
3232

3333
DRIVER_ROUTINES = exdriv.f pgdriv.f cadriv.f hgdriv.f lxdriv.f \
34-
ppdriv.f.in vtdriv.f gidriv.f hidriv.f psdriv.f ttdriv.f cwdriv.f \
35-
gldriv.f nedriv.f wddriv.f.in hpdriv.f lsdriv.f nudriv.f qmdriv.f \
36-
vadriv.f cgdriv.c nexsup.c rvdriv.c x2driv.c xmdriv.c figdisp_comm.c \
34+
ppdriv.f.in gidriv.f hidriv.f psdriv.f cwdriv.f \
35+
gldriv.f wddriv.f.in hpdriv.f lsdriv.f nudriv.f qmdriv.f \
36+
vadriv.f cgdriv.c rvdriv.c x2driv.c xmdriv.c figdisp_comm.c \
3737
pgxwin.c pndriv.c tkdriv.c xadriv.c xwdriv.c bcdriv.f gvdriv.f \
3838
ladriv.f lvdriv.f tfdriv.f xedriv.f gcdriv.f todriv.f zedriv.f \
3939
ccdriv.f ljdriv.f lhdriv.f mfdriv.f hjdriv.f lndriv.f pxdriv.f \

fonts/Makefile.am

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ pgpack_SOURCES = pgpack.f
1010

1111
pkg_libexecdir = $(libexecdir)/$(PACKAGE)
1212

13-
grfont.dat: grfont.txt pgpack
13+
grfont.dat: grfont.txt pgpack$(EXEEXT)
1414
-rm -f grfont.dat
15-
./pgpack < $(srcdir)/grfont.txt
15+
./pgpack$(EXEEXT) < $(srcdir)/grfont.txt
1616

1717
install-exec-hook : grfont.dat
1818
$(MKDIR_P) $(DESTDIR)$(pkg_libexecdir)

sys/Makefile.am

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ F_ROUTINES = grflun.f grgenv.f grglun.f grgmsg.f grlgtr.f \
2020
groptx.f grsy00.f grtrml.f grtter.f
2121

2222

23-
C_ROUTINES = grdate.c grfileio.c grgetc.c grgmem.c grtermio.c gruser.c
23+
C_ROUTINES = grdate.c grfileio.c grgmem.c gruser.c
24+
25+
if HAVE_TERMIOS
26+
C_ROUTINES += grgetc.c grtermio.c
27+
endif
2428

2529
AM_CFLAGS = -DPG_PPU
2630

0 commit comments

Comments
 (0)