From 7a0c1481693cc1d9d9dbe609f735ece01554e357 Mon Sep 17 00:00:00 2001 From: Brandon Wilson Date: Fri, 21 Apr 2017 10:06:41 +0900 Subject: [PATCH] New package: sgfutils-0.25 Closes: #6239 [via git-merge-pr] --- srcpkgs/sgfutils/patches/Makefile.patch | 74 +++++++++++++++++++++++++ srcpkgs/sgfutils/template | 13 +++++ 2 files changed, 87 insertions(+) create mode 100644 srcpkgs/sgfutils/patches/Makefile.patch create mode 100644 srcpkgs/sgfutils/template diff --git a/srcpkgs/sgfutils/patches/Makefile.patch b/srcpkgs/sgfutils/patches/Makefile.patch new file mode 100644 index 0000000000..0ae172ec14 --- /dev/null +++ b/srcpkgs/sgfutils/patches/Makefile.patch @@ -0,0 +1,74 @@ +diff --git Makefile Makefile +index d624f49..4355fc7 100644 +--- Makefile ++++ Makefile +@@ -3,6 +3,7 @@ TPROGS=sgf sgfsplit sgfvarsplit sgfstrip sgfinfo sgfmerge sgftf \ + ngf2sgf nip2sgf nk2sgf gib2sgf + + PROGS=$(TPROGS) sgftopng ugi2sgf ++OBJECTS:=$(CSOURCES:.c=.o) sgfdbinfo.o + + CSOURCES:=sgf.c sgfsplit.c sgfvarsplit.c sgfstrip.c sgfinfo.c sgfmerge.c \ + sgftf.c sgfcheck.c sgfdb.c readsgf.c readsgf0.c writesgf.c \ +@@ -10,17 +11,17 @@ CSOURCES:=sgf.c sgfsplit.c sgfvarsplit.c sgfstrip.c sgfinfo.c sgfmerge.c \ + playgogame.c tests.c errexit.c xmalloc.c sgftopng.c \ + ftw.c ugi2sgf.c ngf2sgf.c nip2sgf.c nk2sgf.c gib2sgf.c + +-OBJECTS:=$(CSOURCES:.c=.o) sgfdbinfo.o +- + HSOURCES=errexit.h xmalloc.h sgfdb.h readsgf.h writesgf.h sgfinfo.h ftw.h \ + playgogame.h sgffileinput.h sgfdbinput.h tests.h + + SOURCES=$(CSOURCES) $(HSOURCES) ++BINDIR=$(DESTDIR)$(PREFIX)/bin + +-CFLAGS=-Wall -Wmissing-prototypes -O3 +- ++CFLAGS+=-Wall -Wmissing-prototypes -O3 ++sgfdbinfo: CFLAGS += -DREAD_FROM_DB ++sgfinfo sgfdbinfo: LDLIBS += -lcrypto + # For systems where iconv is in a separate library +-# LDLIBS=-liconv ++#sgfcharset ugi2sgf: LDLIBS += -liconv + # is needed for sgfcharset and ugi2sgf + + all: $(PROGS) +@@ -47,23 +48,16 @@ sgftf: sgftf.o readsgf.o ftw.o xmalloc.o + + sgfdb: sgfdb.o readsgf.o playgogame.o ftw.o xmalloc.o + +-sgfinfo: sgfinfo.o sgffileinput.c readsgf.o playgogame.o tests.o \ +- ftw.o xmalloc.o +- cc $(CFLAGS) $^ -o $@ -lcrypto ++sgfinfo: sgfinfo.o sgffileinput.o readsgf.o playgogame.o tests.o ftw.o xmalloc.o + + sgfdbinfo: sgfdbinfo.o sgfdbinput.o readsgf.o xmalloc.o tests.o ftw.o +- cc $(CFLAGS) $^ -o $@ -lcrypto + + sgfcharset: sgfcharset.o xmalloc.o + +-sgfinfo.o: sgfinfo.c ++nk2sgf: readsgf.o writesgf.o xmalloc.o + + sgfdbinfo.o: sgfinfo.c +- cc $(CFLAGS) -DREAD_FROM_DB -c sgfinfo.c -o sgfdbinfo.o +- +-sgftopng: sgftopng.o +- +-nk2sgf: readsgf.o writesgf.o xmalloc.o ++ $(CC) $(CFLAGS) -DREAD_FROM_DB $(TARGET_ARCH) -o $@ -c $< + + # Something like this spoils the $^ macro + # $(PROGS): Makefile +@@ -78,5 +72,11 @@ makefile: Makefile makefile.tail + # gnumake complains about $include + -include $(DEPFILE) + ++install: $(PROGS) ++ install -m 755 -D -t "$(BINDIR)" $^ ++ ++uninstall: ++ rm -f $(PROGS:%=$(BINDIR)/%) ++ + clean: + rm -f *~ $(OBJECTS) $(PROGS) diff --git a/srcpkgs/sgfutils/template b/srcpkgs/sgfutils/template new file mode 100644 index 0000000000..0a1385881f --- /dev/null +++ b/srcpkgs/sgfutils/template @@ -0,0 +1,13 @@ +# Template file for 'sgfutils' +pkgname=sgfutils +version=0.25 +revision=1 +build_style=gnu-makefile +short_desc="Collection of utilities to handle SGF files" +maintainer='Brandon Wilson ' +license="GPL-2" +homepage="http://www.cwi.nl/~aeb/go/sgfutils/html/" +distfiles="http://homepages.cwi.nl/~aeb/go/${pkgname}/${pkgname}.tgz" +checksum=4b26b321fbe255722f1d7e57233614da89a4da5bab031ae4ef7118ae3c7436a2 +makedepends="libressl-devel" +depends="ImageMagick"