From nobody Wed Nov 17 01:29:43 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B86F9188AC7A; Wed, 17 Nov 2021 01:29:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hv52H4rNGz4nfs; Wed, 17 Nov 2021 01:29:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8673A180A4; Wed, 17 Nov 2021 01:29:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AH1ThMX039741; Wed, 17 Nov 2021 01:29:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AH1ThwE039740; Wed, 17 Nov 2021 01:29:43 GMT (envelope-from git) Date: Wed, 17 Nov 2021 01:29:43 GMT Message-Id: <202111170129.1AH1ThwE039740@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yasuhiro Kimura Subject: git: 679cfe51e8b2 - main - games/typespeed: Fix link error on FreeBSD 13 or later (-fno-common) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yasu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 679cfe51e8b2e8a2c10e0e589bc9d53cdee8f6d8 Auto-Submitted: auto-generated X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yasu: URL: https://cgit.FreeBSD.org/ports/commit/?id=679cfe51e8b2e8a2c10e0e589bc9d53cdee8f6d8 commit 679cfe51e8b2e8a2c10e0e589bc9d53cdee8f6d8 Author: Martin Birgmeier AuthorDate: 2021-10-28 11:37:15 +0000 Commit: Yasuhiro Kimura CommitDate: 2021-11-17 01:29:25 +0000 games/typespeed: Fix link error on FreeBSD 13 or later (-fno-common) PR: 259501 MFH: 2021Q4 --- games/typespeed/Makefile | 5 +-- games/typespeed/files/patch-src-typespeed.c | 15 +++++++++ games/typespeed/files/patch-src-typespeed.h | 47 +++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 4 deletions(-) diff --git a/games/typespeed/Makefile b/games/typespeed/Makefile index c92c2ba8c828..549dadd906bb 100644 --- a/games/typespeed/Makefile +++ b/games/typespeed/Makefile @@ -12,9 +12,6 @@ COMMENT= Test your typing speed and get your fingers' CPS LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING -BROKEN_FreeBSD_13= ld: error: duplicate symbol: now -BROKEN_FreeBSD_14= ld: error: duplicate symbol: now - USES= ncurses GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-highscoredir="${SCOREDIR}" @@ -22,7 +19,7 @@ CONFIGURE_ARGS= --with-highscoredir="${SCOREDIR}" SCOREDIR= /var/games/typespeed SCOREFILE= typespeed.score -OPTIONS_DEFINE= NLS DOCS +OPTIONS_DEFINE= DOCS NLS OPTIONS_SUB= yes NLS_USES= gettext diff --git a/games/typespeed/files/patch-src-typespeed.c b/games/typespeed/files/patch-src-typespeed.c new file mode 100644 index 000000000000..bfb9f8b6c26e --- /dev/null +++ b/games/typespeed/files/patch-src-typespeed.c @@ -0,0 +1,15 @@ +--- src/typespeed.c.orig 2008-08-13 14:36:51 UTC ++++ src/typespeed.c +@@ -136,6 +136,12 @@ static void usage(void); + #endif /* TEST */ + + /* globals */ ++struct finfo finfo; ++struct stats now; ++struct opt opt; ++struct rules rules; ++struct rawdata words; ++ + char *rankki[11] = + {"None", "Beginner", "Learner", "NoGood", "Average", + "Good", "VeryGood", "Pro", "3l33t", "*(GOD)*", "Computer"}; diff --git a/games/typespeed/files/patch-src-typespeed.h b/games/typespeed/files/patch-src-typespeed.h new file mode 100644 index 000000000000..fc37322e5981 --- /dev/null +++ b/games/typespeed/files/patch-src-typespeed.h @@ -0,0 +1,47 @@ +--- src/typespeed.h.orig 2008-08-13 14:36:51 UTC ++++ src/typespeed.h +@@ -44,6 +44,7 @@ struct finfo { + char descr[61]; + char name[MAXPATHLEN]; + }; ++extern struct finfo finfo; + + struct stats { + uint8_t level; +@@ -56,7 +57,8 @@ struct stats { + clock_t duration; + unsigned int sinit; + char name[21]; +-} now; ++}; ++extern struct stats now; + + struct opt { + int cheat; +@@ -66,7 +68,8 @@ struct opt { + int usecolors; + char name[21]; + char order[3]; +-} opt; ++}; ++extern struct opt opt; + + struct rules { + int misses; +@@ -85,12 +88,13 @@ struct rules { + int maxtime; + char name[31]; + char fname[FILENAME_MAX + 1]; +-} rules; ++}; ++extern struct rules rules; + + struct rawdata { + char *bulk; + char **word; + size_t n; + size_t max; +-} words; +- ++}; ++extern struct rawdata words;