From 4a9b8f7444c3dfaeae2fc9768ca1c62e21bad088 Mon Sep 17 00:00:00 2001 From: Michael Aldridge Date: Fri, 20 Jan 2017 12:03:39 -0600 Subject: [PATCH] New package: vpcs-0.8 --- srcpkgs/vpcs/patches/ldflags.patch | 13 +++++++++++++ srcpkgs/vpcs/patches/readline.patch | 11 +++++++++++ srcpkgs/vpcs/patches/remote_musl.patch | 18 +++++++++++++++++ srcpkgs/vpcs/template | 27 ++++++++++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 srcpkgs/vpcs/patches/ldflags.patch create mode 100644 srcpkgs/vpcs/patches/readline.patch create mode 100644 srcpkgs/vpcs/patches/remote_musl.patch create mode 100644 srcpkgs/vpcs/template diff --git a/srcpkgs/vpcs/patches/ldflags.patch b/srcpkgs/vpcs/patches/ldflags.patch new file mode 100644 index 00000000000..98f2bbb5fea --- /dev/null +++ b/srcpkgs/vpcs/patches/ldflags.patch @@ -0,0 +1,13 @@ +--- src/Makefile.linux.orig 2017-01-20 15:51:20.339835620 -0600 ++++ src/Makefile.linux 2017-01-20 15:52:18.975831788 -0600 +@@ -4,8 +4,8 @@ + CPUTYPE=i386 + HVOPT=-DHV + +-CFLAGS=-D$(OSTYPE) -D$(CPUTYPE) $(HVOPT) -Wall -I. -DTAP +-LDFLAGS=-lpthread -lutil -s -static ++override CFLAGS+=-D$(OSTYPE) -D$(CPUTYPE) $(HVOPT) -Wall -I. -DTAP ++override LDFLAGS+=-lpthread -lutil -s -static + OBJS=vpcs.o \ + daemon.o \ + readline.o \ diff --git a/srcpkgs/vpcs/patches/readline.patch b/srcpkgs/vpcs/patches/readline.patch new file mode 100644 index 00000000000..22ddaea890c --- /dev/null +++ b/srcpkgs/vpcs/patches/readline.patch @@ -0,0 +1,11 @@ +--- src/readline.c.orig 2017-04-21 00:27:54.248062134 -0500 ++++ src/readline.c 2017-04-21 00:28:07.690155810 -0500 +@@ -431,7 +431,7 @@ + i = kb[0]; + if (!isprint(i)) + continue; +- if (rls->pos < strlen(rls->kbuffer) - 1) { ++ if (rls->pos < strlen(rls->kbuffer) + 1) { + j = strlen(rls->kbuffer); + /* avoid overflow */ + if (j < rls->maxbuflen - 1) { diff --git a/srcpkgs/vpcs/patches/remote_musl.patch b/srcpkgs/vpcs/patches/remote_musl.patch new file mode 100644 index 00000000000..80c069c7207 --- /dev/null +++ b/srcpkgs/vpcs/patches/remote_musl.patch @@ -0,0 +1,18 @@ +--- src/remote.c.orig 2017-01-20 16:46:45.037618348 -0600 ++++ src/remote.c 2017-01-20 16:47:18.504616161 -0600 +@@ -43,13 +43,13 @@ + #include "readline.h" + #include "utils.h" + +-int open_remote(int fdio, const char *destip, const u_short destport) ++int open_remote(int fdio, const char *destip, const unsigned short destport) + { + int s; + struct sockaddr_in addr_in; + struct termios termios; + char kb[512]; +- u_char outbuf[512]; ++ unsigned char outbuf[512]; + int rc; + int i; + struct timeval tv; diff --git a/srcpkgs/vpcs/template b/srcpkgs/vpcs/template new file mode 100644 index 00000000000..a090690326e --- /dev/null +++ b/srcpkgs/vpcs/template @@ -0,0 +1,27 @@ +# Template file for 'vpcs' +pkgname=vpcs +version=0.8 +revision=1 +build_wrksrc="src" +build_style=gnu-makefile +makedepends="glibc-devel" +short_desc="Virtual PC Simulator" +maintainer="Michael Aldridge " +license="BSD 2-Clause" +homepage="https://sourceforge.net/projects/vpcs" +distfiles="${SOURCEFORGE_SITE}/project/vpcs/${version}/${pkgname}-${version}-src.tbz" +checksum=dca602d0571ba852c916632c4c0060aa9557dd744059c0f7368860cfa8b3c993 + +case "$XBPS_TARGET_MACHINE" in + *-musl) broken=yes # depends on GNU getopt + ;; +esac + +pre_build() { + ln -s Makefile.linux Makefile +} + +do_install() { + vbin vpcs + vlicense $wrksrc/COPYING +}