Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Simon Sobisch
cbl-gdb
Commits
dbe870ce
Commit
dbe870ce
authored
Apr 29, 2020
by
rdubner
Browse files
Windows package builder, through phase1 script
parent
cf20e9d8
Changes
5
Hide whitespace changes
Inline
Side-by-side
cobcd
View file @
dbe870ce
...
...
@@ -62,6 +62,10 @@ if uname | grep -q MINGW64_NT ; then
os_name
=
MINGW64_NT
fi
if
uname
|
grep
-q
MSYS_NT
;
then
os_name
=
MSYS_NT
fi
# Courtesy of stackoverflow, a script to find the directory of the script
SOURCE
=
"
${
BASH_SOURCE
[0]
}
"
while
[
-h
"
$SOURCE
"
]
;
do
# resolve $SOURCE until the file is no longer a symlink
...
...
@@ -431,7 +435,7 @@ if test X$result = X"0" ; then
fi
$GCC
-shared
-o
$TARGET
$BASENAME
-2
.o
$BASENAME
.sym.o
-lcob
$POSTOPTIONS
if
test
X
$os_name
=
X
"MINGW32_NT"
||
test
X
$os_name
=
X
"MINGW64_NT"
;
then
if
test
X
$os_name
=
X
"MINGW32_NT"
||
test
X
$os_name
=
X
"MINGW64_NT"
||
test
X
$os_name
=
X
"MSYS_NT"
;
then
mv
$TARGET
$BASENAME
.dll
fi
fi
...
...
@@ -441,7 +445,7 @@ if test X$result = X"0" ; then
## if it is necessary:
if
test
X
$result
=
X
"0"
;
then
if
test
X
$os_name
=
X
"MINGW32_NT"
||
test
X
$os_name
=
X
"MINGW64_NT"
;
then
if
test
X
$os_name
=
X
"MINGW32_NT"
||
test
X
$os_name
=
X
"MINGW64_NT"
||
test
X
$os_name
=
X
"MSYS_NT"
;
then
if
test
-f
$DIR
/cprint.py
;
then
cp
$DIR
/cprint.py ./
$BASENAME
-gdb
.py
elif
test
-f
$DIR
/python/cprint.py
;
then
...
...
msys2/001-mingw-gnucobol-2.2-fixformatwarnings.patch
0 → 100644
View file @
dbe870ce
diff -Naur ./libcob/common.h.orig ./libcob/common.h
--- ./libcob/common.h.orig 2017-09-06 20:37:28.000000000 +0200
+++ ./libcob/common.h 2017-10-25 23:26:58.208945700 +0200
@@ -50,7 +50,7 @@
#endif
-#if defined(_WIN32)
+#if defined(_WIN32) && !defined(__MINGW32__) /* hack for msys2 patch */
#define CB_FMT_LLD "%I64d"
#define CB_FMT_LLU "%I64u"
@@ -389,12 +389,12 @@
/* Also OK for icc which defines __GNUC__ */
-#if defined(__GNUC__) || (defined(__xlc__) && __IBMC__ >= 700)
+#if defined(__GNUC__) && defined(__MINGW32__) /* hack for msys2 patch */
#define COB_A_NORETURN __attribute__((noreturn))
-#define COB_A_FORMAT12 __attribute__((format(printf, 1, 2)))
-#define COB_A_FORMAT23 __attribute__((format(printf, 2, 3)))
-#define COB_A_FORMAT34 __attribute__((format(printf, 3, 4)))
-#define COB_A_FORMAT45 __attribute__((format(printf, 4, 5)))
+#define COB_A_FORMAT12 __attribute__((format(__MINGW_PRINTF_FORMAT, 1, 2)))
+#define COB_A_FORMAT23 __attribute__((format(__MINGW_PRINTF_FORMAT, 2, 3)))
+#define COB_A_FORMAT34 __attribute__((format(__MINGW_PRINTF_FORMAT, 3, 4)))
+#define COB_A_FORMAT45 __attribute__((format(__MINGW_PRINTF_FORMAT, 4, 5)))
#define DECLNORET
#else
#define COB_A_NORETURN
msys2/CompleteBuildDescription.docx
View file @
dbe870ce
No preview for this file type
msys2/PKGBUILD
View file @
dbe870ce
...
...
@@ -5,7 +5,7 @@
_realname
=
gnucobol
pkgbase
=
mingw-w64-
${
_realname
}
-svn
pkgname
=
${
MINGW_PACKAGE_PREFIX
}
-
${
_realname
}
-svn
pkgver
=
.r35
3
8
pkgver
=
.r35
4
8
_specialversion
=
-dev
pkgrel
=
1
pkgdesc
=
"GnuCOBOL, a free and modern COBOL compiler (mingw-w64)"
...
...
msys2/phase1
0 → 100644
View file @
dbe870ce
#!/bin/sh
## This routine expects to be running in a folder named
##
## ~/builds/cblgdb/cblgdb-latest/msys2
##
## It also expects to be running in a brand-spanking new instance of
## c:\msys64, one that has been updated with
##
## pacman -Syu pacman
## pacman -Su
##
## and with nothing else, in order to keep the size down as much as
## possible.
##
echo
"Remove old /c/msys64-clean...
rm -fr /c/msys64-clean
copy /c/msys64 to /c/msys64-clean...
cp -r /c/msys64 /c/msys64-clean
## Install the prerequisites for the GnuCOBOL package build
pacman --noconfirm -S base-devel
pacman --noconfirm -S mingw-w64-x86_64-toolchain
pacman --noconfirm -S mingw-w64-i686-toolchain
pacman --noconfirm -S mingw-w64-x86_64-db
pacman --noconfirm -S mingw-w64-x86_64-libxml2
pacman --noconfirm -S mingw-w64-i686-db
pacman --noconfirm -S mingw-w64-i686-libxml2
pacman --noconfirm -S apr
pacman --noconfirm -S apr-util
pacman --noconfirm -S libsasl
pacman --noconfirm -S libserf
pacman --noconfirm -S rsync
pacman --noconfirm -S subversion
pacman --noconfirm -S vim
## And it is now time to build the i686 and x_86_64 packages
makepkg-mingw -sCLf
## Having created the packages, install the i686 version:
pacman --noconfirm -U
$(
ls
-t
--color
=
never mingw-w64-i686-gnucobol
*
.zst |
head
-n
1
)
## Convert over to the MSYS2-MINGW32 environment:
export PATH=/mingw32/bin:
$PATH
## Set up the cobc compiler:
export COB_CONFIG_DIR='C:
\m
sys64
\m
ingw32
\s
hare
\g
nucobol
\c
onfig'
export COB_COPY_DIR='C:
\m
sys64
\m
ingw32
\s
hare
\g
nucobol
\c
opy'
export COB_LIBRARY_PATH='C:
\m
sys64
\m
ingw32
\l
ib
\g
nucobol'
## With the GnuCOBOL package installed, we can build the cbl-gdb toolchain
cd ..
make clean
make -B
make install
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment