summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO15
-rw-r--r--001-mingw-pdcurses-3.6-build.patch42
-rw-r--r--001-mingw-pdcurses-4.1.0-build.patch68
-rw-r--r--002-fix-exports.patch43
-rw-r--r--PKGBUILD70
5 files changed, 168 insertions, 70 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d205b10c087..0b4279a2646 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,22 @@
pkgbase = mingw-w64-pdcurses
pkgdesc = Public Domain Curses wincon port (mingw-w64)
- pkgver = 3.6
+ pkgver = 4.1.0
pkgrel = 1
- url = https://github.com/wmcbrine/PDCurses
+ url = https://www.projectpluto.com/win32a.htm
arch = any
license = public domain
makedepends = mingw-w64-gcc
depends = mingw-w64-crt
+ provides = mingw-w64-curses
options = staticlibs
options = !buildflags
options = !strip
- source = https://github.com/wmcbrine/PDCurses/archive/3.6.tar.gz
- source = 001-mingw-pdcurses-3.6-build.patch
- sha256sums = 1760cbf3c3f254798e3614efa40206f95fe5bb2ca68eb2be434265d995f078eb
- sha256sums = 98867a357e172cf18f9bd59fc8208f44ebba6e887f6b87522e32cda333cf416d
+ source = pdcurses-4.1.0.tar.gz::https://github.com/Bill-Gray/PDCurses/archive/v4.1.0.tar.gz
+ source = 001-mingw-pdcurses-4.1.0-build.patch
+ source = 002-fix-exports.patch
+ sha256sums = 3421e2e84bdc8220dc6740b70aa9b0e30542064189efc8609e00de78ced75656
+ sha256sums = 913b5aff09d0ab1a2197f66a98657927d85a0dc3577c2b5e69179148fb2b0242
+ sha256sums = 246f93facdd2703f8b9d0bcd57e89688fd861d34a30facc60a48892b330b08bc
pkgname = mingw-w64-pdcurses
diff --git a/001-mingw-pdcurses-3.6-build.patch b/001-mingw-pdcurses-3.6-build.patch
deleted file mode 100644
index cfc8d3220db..00000000000
--- a/001-mingw-pdcurses-3.6-build.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff -Naur wincon/Makefile.orig wincon/Makefile
---- wincon/Makefile.orig 2018-02-13 14:46:44.000000000 +0100
-+++ wincon/Makefile 2018-04-05 18:21:09.162821700 +0200
-@@ -26,6 +26,9 @@
- PDCURSES_WIN_H = $(osdir)/pdcwin.h
-
- CC = gcc
-+AR = ar
-+STRIP = strip
-+LINK = gcc
-
- ifeq ($(DEBUG),Y)
- CFLAGS = -g -Wall -DPDCDEBUG
-@@ -45,17 +48,15 @@
- CFLAGS += -DPDC_FORCE_UTF8
- endif
-
--LINK = gcc
--
- ifeq ($(DLL),Y)
- CFLAGS += -DPDC_DLL_BUILD
-- LIBEXE = gcc
-+ LIBEXE = $(CC)
- LIBFLAGS = -Wl,--out-implib,pdcurses.a -shared -o
- LIBCURSES = pdcurses.dll
- LIBDEPS = $(LIBOBJS) $(PDCOBJS)
- CLEAN = $(LIBCURSES) *.a
- else
-- LIBEXE = ar
-+ LIBEXE = $(AR)
- LIBFLAGS = rcv
- LIBCURSES = pdcurses.a
- LIBDEPS = $(LIBOBJS) $(PDCOBJS)
-@@ -75,7 +76,7 @@
-
- demos: $(DEMOS)
- ifneq ($(DEBUG),Y)
-- strip *.exe
-+ $(STRIP) *.exe
- endif
-
- $(LIBCURSES) : $(LIBDEPS)
diff --git a/001-mingw-pdcurses-4.1.0-build.patch b/001-mingw-pdcurses-4.1.0-build.patch
new file mode 100644
index 00000000000..2224b9ce281
--- /dev/null
+++ b/001-mingw-pdcurses-4.1.0-build.patch
@@ -0,0 +1,68 @@
+diff -Naur pdcurses-4.1.0-orig/wincon/Makefile.mng pdcurses-4.1.0/wincon/Makefile.mng
+--- pdcurses-4.1.0-orig/wincon/Makefile.mng 2019-05-09 02:27:41.000000000 +0300
++++ pdcurses-4.1.0/wincon/Makefile.mng 2019-05-28 08:49:28.054006700 +0300
+@@ -100,8 +100,9 @@
+ ifeq ($(DLL),Y)
+ CFLAGS += -DPDC_DLL_BUILD
+ LIBEXE = $(PREFIX)gcc
+- LIBFLAGS = -Wl,--out-implib,pdcurses.a -shared -o
+- LIBCURSES = pdcurses.dll
++ LIBARCHIVE = libpdcurses.dll.a
++ LIBFLAGS = -Wl,--out-implib,$(LIBARCHIVE) -shared -o
++ LIBCURSES = libpdcurses.dll
+ LIBDEPS = $(LIBOBJS) $(PDCOBJS)
+ LIBSADDED =
+ EXELIBS =
+@@ -113,7 +114,8 @@
+ else
+ LIBFLAGS = rv
+ endif
+- LIBCURSES = pdcurses.a
++ LIBARCHIVE = libpdcurses.a
++ LIBCURSES = $(LIBARCHIVE)
+ LIBDEPS = $(LIBOBJS) $(PDCOBJS)
+ LIBSADDED =
+ EXELIBS =
+@@ -139,7 +141,7 @@
+
+ $(LIBCURSES) : $(LIBDEPS)
+ $(LIBEXE) $(LIBFLAGS) $@ $? $(LIBSADDED)
+- $(CP) pdcurses.a panel.a
++ $(CP) $(LIBARCHIVE) libpanel.a
+
+ $(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS)
+ $(PDCOBJS) : $(PDCURSES_WIN_H)
+diff -Naur pdcurses-4.1.0-orig/wingui/Makefile.mng pdcurses-4.1.0/wingui/Makefile.mng
+--- pdcurses-4.1.0-orig/wingui/Makefile.mng 2019-05-09 02:27:41.000000000 +0300
++++ pdcurses-4.1.0/wingui/Makefile.mng 2019-05-28 08:48:33.963930900 +0300
+@@ -98,8 +98,9 @@
+ ifeq ($(DLL),Y)
+ CFLAGS += -DPDC_DLL_BUILD
+ LIBEXE = $(CC)
+- LIBFLAGS = -Wl,--out-implib,pdcurses.a -shared -o
+- LIBCURSES = pdcurses.dll
++ LIBARCHIVE = libpdcurses.dll.a
++ LIBFLAGS = -Wl,--out-implib,$(LIBARCHIVE) -shared -o
++ LIBCURSES = libpdcurses.dll
+ LIBDEPS = $(LIBOBJS) $(PDCOBJS)
+ LIBSADDED = -lgdi32 -lcomdlg32
+ EXELIBS =
+@@ -111,7 +112,8 @@
+ else
+ LIBFLAGS = rv
+ endif
+- LIBCURSES = pdcurses.a
++ LIBARCHIVE = libpdcurses.a
++ LIBCURSES = $(LIBARCHIVE)
+ LIBDEPS = $(LIBOBJS) $(PDCOBJS)
+ LIBSADDED =
+ EXELIBS = -lgdi32 -lcomdlg32
+@@ -137,7 +139,7 @@
+
+ $(LIBCURSES) : $(LIBDEPS)
+ $(LIBEXE) $(LIBFLAGS) $@ $? $(LIBSADDED)
+- $(CP) pdcurses.a panel.a
++ $(CP) $(LIBARCHIVE) libpanel.a
+
+ $(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS)
+ $(PDCOBJS) : $(PDCURSES_WIN_H)
diff --git a/002-fix-exports.patch b/002-fix-exports.patch
new file mode 100644
index 00000000000..662d22308bf
--- /dev/null
+++ b/002-fix-exports.patch
@@ -0,0 +1,43 @@
+diff -ruN PDCurses-patched/term.h PDCurses/term.h
+--- PDCurses-patched/term.h 2017-10-02 09:48:51.000000000 +0800
++++ PDCurses/term.h 2017-10-02 09:49:28.290552879 +0800
+@@ -23,23 +23,23 @@
+ /* PDCEX is defined in curses.h */
+ PDCEX TERMINAL *cur_term;
+
+-int del_curterm(TERMINAL *);
+-int putp(const char *);
+-int restartterm(const char *, int, int *);
+-TERMINAL *set_curterm(TERMINAL *);
+-int setterm(const char *);
+-int setupterm(const char *, int, int *);
+-int tgetent(char *, const char *);
+-int tgetflag(const char *);
+-int tgetnum(const char *);
+-char *tgetstr(const char *, char **);
+-char *tgoto(const char *, int, int);
+-int tigetflag(const char *);
+-int tigetnum(const char *);
+-char *tigetstr(const char *);
+-char *tparm(const char *, long, long, long, long, long,
++PDCEX int del_curterm(TERMINAL *);
++PDCEX int putp(const char *);
++PDCEX int restartterm(const char *, int, int *);
++PDCEX TERMINAL *set_curterm(TERMINAL *);
++PDCEX int setterm(const char *);
++PDCEX int setupterm(const char *, int, int *);
++PDCEX int tgetent(char *, const char *);
++PDCEX int tgetflag(const char *);
++PDCEX int tgetnum(const char *);
++PDCEX char *tgetstr(const char *, char **);
++PDCEX char *tgoto(const char *, int, int);
++PDCEX int tigetflag(const char *);
++PDCEX int tigetnum(const char *);
++PDCEX char *tigetstr(const char *);
++PDCEX char *tparm(const char *, long, long, long, long, long,
+ long, long, long, long);
+-int tputs(const char *, int, int (*)(int));
++PDCEX int tputs(const char *, int, int (*)(int));
+
+ #if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS)
+ }
diff --git a/PKGBUILD b/PKGBUILD
index 9d18f50237d..cedaf354f24 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,41 +2,60 @@
# Contributor: Filip Brcic <brcha@gna.org>
pkgname=mingw-w64-pdcurses
-pkgver=3.6
+provides=(mingw-w64-curses)
+pkgver=4.1.0
pkgrel=1
pkgdesc="Public Domain Curses wincon port (mingw-w64)"
arch=('any')
-url="https://github.com/wmcbrine/PDCurses"
+url="https://www.projectpluto.com/win32a.htm"
depends=('mingw-w64-crt')
makedepends=('mingw-w64-gcc')
options=(staticlibs !buildflags !strip)
license=("public domain")
-source=("https://github.com/wmcbrine/PDCurses/archive/${pkgver}.tar.gz"
- "001-mingw-pdcurses-3.6-build.patch")
-sha256sums=('1760cbf3c3f254798e3614efa40206f95fe5bb2ca68eb2be434265d995f078eb'
- '98867a357e172cf18f9bd59fc8208f44ebba6e887f6b87522e32cda333cf416d')
+source=(pdcurses-${pkgver}.tar.gz::"https://github.com/Bill-Gray/PDCurses/archive/v${pkgver}.tar.gz"
+ 001-mingw-pdcurses-4.1.0-build.patch
+ 002-fix-exports.patch)
+sha256sums=('3421e2e84bdc8220dc6740b70aa9b0e30542064189efc8609e00de78ced75656'
+ '913b5aff09d0ab1a2197f66a98657927d85a0dc3577c2b5e69179148fb2b0242'
+ '246f93facdd2703f8b9d0bcd57e89688fd861d34a30facc60a48892b330b08bc')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
prepare() {
- cd "${srcdir}/PDCurses-${pkgver}/wincon"
- patch -Np1 -i ${srcdir}/001-mingw-pdcurses-3.6-build.patch
+ cd "${srcdir}/PDCurses-${pkgver}"
+ patch -p1 -i ${srcdir}/001-mingw-pdcurses-4.1.0-build.patch
+ patch -p1 -i ${srcdir}/002-fix-exports.patch
}
build() {
cd "${srcdir}/PDCurses-${pkgver}"
- export CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4"
for _arch in ${_architectures}; do
- cp -a wincon build-${_arch} && pushd build-${_arch}
- make \
- CC=${_arch}-gcc \
- LINK=${_arch}-gcc \
- STRIP=${_arch}-strip \
- AR=${_arch}-ar \
- WIDE=Y \
- UTF8=Y \
- DLL=Y
+# NOte that you should use something like -${_arch}
+# to prevent building i686 compiled binaries from
+# being compiled with x86_64 compiled binaries and
+# vice-versa. That causes build failures - no surpise.
+ cp -rf wingui wingui-shared-${_arch}
+ pushd wingui-shared-${_arch}
+ make -f Makefile.mng \
+ CC=${_arch}-gcc \
+ LINK=${_arch}-gcc \
+ STRIP=${_arch}-strip \
+ AR=${_arch}-ar \
+ WIDE=Y \
+ UTF8=Y \
+ DLL=Y
popd
+
+ cp -rf wingui wingui-static-${_arch}
+ pushd wingui-static-${_arch}
+ make -f Makefile.mng \
+ CC=${_arch}-gcc \
+ LINK=${_arch}-gcc \
+ STRIP=${_arch}-strip \
+ AR=${_arch}-ar \
+ WIDE=Y \
+ UTF8=Y
+ popd
done
}
@@ -46,13 +65,20 @@ package() {
mkdir -p ${pkgdir}/usr/${_arch}/{bin,include,lib}
mkdir ${pkgdir}/usr/${_arch}/include/pdcurses
- install build-${_arch}/*.exe ${pkgdir}/usr/${_arch}/bin/
- install build-${_arch}/pdcurses.dll ${pkgdir}/usr/${_arch}/bin/
- install build-${_arch}/pdcurses.a ${pkgdir}/usr/${_arch}/lib/libpdcurses.dll.a
+ install wingui-shared-${_arch}/*.exe ${pkgdir}/usr/${_arch}/bin/
+ install wingui-shared-${_arch}/libpdcurses.dll ${pkgdir}/usr/${_arch}/bin/
+ install wingui-shared-${_arch}/libpdcurses.dll.a ${pkgdir}/usr/${_arch}/lib/libpdcurses.dll.a
+ install wingui-shared-${_arch}/libpdcurses.dll.a ${pkgdir}/usr/${_arch}/lib/libcurses.dll.a
+ install wingui-shared-${_arch}/libpdcurses.dll.a ${pkgdir}/usr/${_arch}/lib/libpanel.dll.a
+
+ install wingui-static-${_arch}/libpdcurses.a ${pkgdir}/usr/${_arch}/lib/libpdcurses.a
+ install wingui-static-${_arch}/libpdcurses.a ${pkgdir}/usr/${_arch}/lib/libcurses.a
+ install wingui-static-${_arch}/libpdcurses.a ${pkgdir}/usr/${_arch}/lib/libpanel.a
echo '#include "pdcurses/curses.h"' > pdcurses.h
+ install -m 0644 curses.h panel.h term.h acs_defs.h ${pkgdir}/usr/${_arch}/include/pdcurses/
install -m 0644 pdcurses.h ${pkgdir}/usr/${_arch}/include/pdcurses.h
- install -m 0644 curses.h panel.h term.h ${pkgdir}/usr/${_arch}/include/pdcurses/
+
find "$pkgdir/usr/${_arch}" -name '*.exe' -exec ${_arch}-strip --strip-unneeded {} \;
find "$pkgdir/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs ${_arch}-strip -g