Skip to content

Commit

Permalink
eboard: move to github; update to 1.1.3
Browse files Browse the repository at this point in the history
Attempt to use the right compiler; use Debian's patches and patch for
endian.h
Playing against crafty engine works as expected.
  • Loading branch information
kurthindenburg committed Nov 13, 2019
1 parent 4eebd93 commit 4a13e60
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 23 deletions.
47 changes: 35 additions & 12 deletions games/eboard/Portfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup github 1.0

name eboard
github.setup fbergo eboard 1.1.3 v
categories games
version 1.1.1
license GPL-2+
platforms darwin
maintainers nomaintainer

Expand All @@ -15,16 +16,38 @@ long_description \
interface to ICS (Internet Chess Servers) like FICS and to chess \
engines like GNU Chess, Sjeng and Crafty.

homepage http://www.bergo.eng.br/${name}/
master_sites sourceforge
use_bzip2 yes
checksums md5 03dcdaa2bc85218b1b18c4bee276fea7
checksums rmd160 9157280313a11fa839a46bed68db2ad22311079a \
sha256 b1a7a3c7873ea086aa2c89f3e4fb40e4c1e3f9f7350f05f33669eca43efb72bd \
size 1579046

depends_build path:bin/perl:perl5 port:pkgconfig
depends_lib port:gtk2
depends_build-append port:pkgconfig
depends_lib-append port:gtk2 \
port:gstreamer1 \
port:gstreamer1-gst-plugins-base

patchfiles configure.patch
# Use Debian's patches
patchfiles patch-configure.diff \
patch-elifekam.diff \
patch-sound.diff

configure.cmd ${prefix}/bin/perl ./configure
configure.args --man-prefix=${prefix}/share/man \
--compiler=\${CXX}
variant universal {}

build.env-append "CXX=${configure.cxx} [get_canonical_archflags cxx]" \
"CFLAGS=${configure.cxxflags} [get_canonical_archflags cxx]" \
"LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]" \
PREFIX=${prefix}
destroot.env-append "CXX=${configure.cxx} [get_canonical_archflags cxx]" \
"CFLAGS=${configure.cxxflags} [get_canonical_archflags cxx]" \
"LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]" \
PREFIX=${prefix}

# Use system's perl
configure.cmd ./configure
configure.args --man-prefix=${prefix}/share/man

pre-destroot {
xinstall -d -m 755 ${destroot}${prefix}/share/${name}

# share/eboard/timeseal.Darwin is an executable that is not required
# but needs fixed/moved.
}
11 changes: 0 additions & 11 deletions games/eboard/files/configure.patch

This file was deleted.

38 changes: 38 additions & 0 deletions games/eboard/files/patch-configure.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
--- configure 2018-07-31 14:02:19.000000000 -0400
+++ configure.after 2019-11-12 21:07:10.000000000 -0500
@@ -6,11 +6,11 @@
my $prefix = "/usr/local";
my $package = "eboard";
my $version = "1.1.3";
-my $cxx = "g++";
-my @cxxflags = ("-O6");
+my $cxx = "$ENV{CXX}";
my @cxxflagsdbg = ("-ggdb");
-my @ldflags = ("-lpthread -ldl");
-my @libs = ();
+my @cxxflags = map { split } join(" ",$ENV{CXXFLAGS}," ",$ENV{CPPFLAGS});
+my @ldflags = map { split } join($ENV{LDFLAGS});
+my @libs = ("-lpthread -ldl");
my $configh = "config.h";
my $configmake = "config.make";
my $nls = 1;
@@ -643,9 +643,8 @@
chomp($x);
@x = split(/ /,$x);
for(@x) {
- push @ldflags, $_;
-}
-push @ldflags, @libs;
+ push @libs, $_;
+ }

if (!header_check("gtk/gtk.h","gdk/gdkkeysyms.h"))
{
@@ -701,6 +700,7 @@
print CONFIGMAKE "CXXFLAGS = @cxxflags\n";
print CONFIGMAKE "CXXFLAGS_DBG = @cxxflagsdbg\n";
print CONFIGMAKE "LDFLAGS = @ldflags\n";
+print CONFIGMAKE "LIBS = @libs\n";

print CONFIGMAKE "prefix = \${DESTDIR}$prefix\n";
print CONFIGMAKE "bindir = \${DESTDIR}$prefix/bin\n";
15 changes: 15 additions & 0 deletions games/eboard/files/patch-elifekam.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- elifekam 2018-07-31 14:02:19.000000000 -0400
+++ elifekam 2019-11-12 20:54:21.000000000 -0500
@@ -31,10 +31,10 @@
debug: eboard.dbg

eboard: $(OBJS)
- $(CXX) $(LDFLAGS) -o eboard $(OBJS)
+ $(CXX) $(LDFLAGS) -o eboard $(OBJS) $(LIBS)

eboard.dbg: $(DBG_OBJS)
- $(CXX) $(LDFLAGS) -o eboard.dbg $(DBG_OBJS)
+ $(CXX) $(LDFLAGS) -o eboard.dbg $(DBG_OBJS) $(LIBS)

dbg_%.o: %.cc $(HEADERS) $(XPMS)
$(CXX) $(CXXFLAGS_DBG) -c $< -o $@
16 changes: 16 additions & 0 deletions games/eboard/files/patch-sound.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
--- sound.cc 2018-07-31 14:02:19.000000000 -0400
+++ sound.cc 2019-11-12 20:18:49.000000000 -0500
@@ -38,7 +38,12 @@
#include <math.h>
#include <limits.h>
#include <gst/gst.h>
-#include <endian.h>
+
+#if defined(__APPLE__) && defined(__MACH__)
+# include <machine/endian.h>
+#else
+#include <endian.h>
+#endif

#include "sound.h"
#include "global.h"

0 comments on commit 4a13e60

Please sign in to comment.