From 1ab51c6f0b62da49d4489a335f7b8f3dc13054c9 Mon Sep 17 00:00:00 2001 From: Yorick Hardy Date: Sun, 3 Jan 2021 18:59:51 +0200 Subject: [PATCH] libgamecommon: import libgamecommon-1.2 as wip/libgamecommon Camoto is a collection of utilities for editing (modding) "classic games", those from the early to mid 1990s. This is libgamecommon, the lowest-level component of the Camoto suite. It contains shared code and routines used by most of the other Camoto libraries. --- Makefile | 1 + libgamecommon/DESCR | 5 +++++ libgamecommon/Makefile | 22 +++++++++++++++++++ libgamecommon/PLIST | 22 +++++++++++++++++++ libgamecommon/buildlink3.mk | 13 +++++++++++ libgamecommon/distinfo | 7 ++++++ .../patches/patch-src_stream__file.cpp | 15 +++++++++++++ 7 files changed, 85 insertions(+) create mode 100644 libgamecommon/DESCR create mode 100644 libgamecommon/Makefile create mode 100644 libgamecommon/PLIST create mode 100644 libgamecommon/buildlink3.mk create mode 100644 libgamecommon/distinfo create mode 100644 libgamecommon/patches/patch-src_stream__file.cpp diff --git a/Makefile b/Makefile index 51d90a5b11..c873793e15 100644 --- a/Makefile +++ b/Makefile @@ -1890,6 +1890,7 @@ SUBDIR+= libfirm-git SUBDIR+= libfolks SUBDIR+= libfplll SUBDIR+= libftdi1 +SUBDIR+= libgamecommon SUBDIR+= libgda-bdb SUBDIR+= libgda-ldap SUBDIR+= libgda-mdb diff --git a/libgamecommon/DESCR b/libgamecommon/DESCR new file mode 100644 index 0000000000..f43963192e --- /dev/null +++ b/libgamecommon/DESCR @@ -0,0 +1,5 @@ +Camoto is a collection of utilities for editing (modding) "classic games", +those from the early to mid 1990s. + +This is libgamecommon, the lowest-level component of the Camoto suite. It +contains shared code and routines used by most of the other Camoto libraries. diff --git a/libgamecommon/Makefile b/libgamecommon/Makefile new file mode 100644 index 0000000000..59c17a344f --- /dev/null +++ b/libgamecommon/Makefile @@ -0,0 +1,22 @@ +# $NetBSD$ + +DISTNAME= libgamecommon-1.2 +CATEGORIES= devel games +MASTER_SITES= ${MASTER_SITE_GITHUB:=Malvineous/libgamecommon/releases/download/v1.2/} +EXTRACT_SUFX= .tar.bz2 + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://www.shikadi.net/camoto/ +COMMENT= Utility functions for working with binary files +LICENSE= gnu-gpl-v3 + +GNU_CONFIGURE= yes +USE_LIBTOOL= yes +USE_TOOLS+= pkg-config +USE_LANGUAGES= c c++ + +PKGCONFIG_OVERRIDE+= libgamecommon.pc.in + +.include "../../devel/boost-headers/buildlink3.mk" +.include "../../devel/boost-libs/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/libgamecommon/PLIST b/libgamecommon/PLIST new file mode 100644 index 0000000000..76e4d982b8 --- /dev/null +++ b/libgamecommon/PLIST @@ -0,0 +1,22 @@ +@comment $NetBSD$ +include/camoto-1.0/camoto/bitstream.hpp +include/camoto-1.0/camoto/byteorder.hpp +include/camoto-1.0/camoto/debug.hpp +include/camoto-1.0/camoto/error.hpp +include/camoto-1.0/camoto/filter.hpp +include/camoto-1.0/camoto/filter_dummy.hpp +include/camoto-1.0/camoto/iff.hpp +include/camoto-1.0/camoto/iostream_helpers.hpp +include/camoto-1.0/camoto/lzw.hpp +include/camoto-1.0/camoto/metadata.hpp +include/camoto-1.0/camoto/stream.hpp +include/camoto-1.0/camoto/stream_file.hpp +include/camoto-1.0/camoto/stream_filtered.hpp +include/camoto-1.0/camoto/stream_memory.hpp +include/camoto-1.0/camoto/stream_seg.hpp +include/camoto-1.0/camoto/stream_string.hpp +include/camoto-1.0/camoto/stream_sub.hpp +include/camoto-1.0/camoto/suppitem.hpp +include/camoto-1.0/camoto/util.hpp +lib/libgamecommon.la +lib/pkgconfig/libgamecommon.pc diff --git a/libgamecommon/buildlink3.mk b/libgamecommon/buildlink3.mk new file mode 100644 index 0000000000..e05ac18fbd --- /dev/null +++ b/libgamecommon/buildlink3.mk @@ -0,0 +1,13 @@ +# $NetBSD$ + +BUILDLINK_TREE+= libgamecommon + +.if !defined(LIBGAMECOMMON_BUILDLINK3_MK) +LIBGAMECOMMON_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.libgamecommon+= libgamecommon>=1.2 +BUILDLINK_PKGSRCDIR.libgamecommon?= ../../wip/libgamecommon + +.endif # LIBGAMECOMMON_BUILDLINK3_MK + +BUILDLINK_TREE+= -libgamecommon diff --git a/libgamecommon/distinfo b/libgamecommon/distinfo new file mode 100644 index 0000000000..d8d6055b65 --- /dev/null +++ b/libgamecommon/distinfo @@ -0,0 +1,7 @@ +$NetBSD$ + +SHA1 (libgamecommon-1.2.tar.bz2) = 2cfc85e03ec0ee4c71bb22bf97aac76b843fc871 +RMD160 (libgamecommon-1.2.tar.bz2) = 8641b8b9bdf3c77c04b0fd334705248dde758569 +SHA512 (libgamecommon-1.2.tar.bz2) = fb123352bf53bad5a68df3241a5ad0a8a17038c32d5096218601171fc6e0bcdb12141993f4cb6c3277949b8e4070c7d8f64bd0bd70620774c47050f0abb64f7c +Size (libgamecommon-1.2.tar.bz2) = 349522 bytes +SHA1 (patch-src_stream__file.cpp) = 218a00dc64b06e001854fe160e5720e21d923849 diff --git a/libgamecommon/patches/patch-src_stream__file.cpp b/libgamecommon/patches/patch-src_stream__file.cpp new file mode 100644 index 0000000000..9f988293b8 --- /dev/null +++ b/libgamecommon/patches/patch-src_stream__file.cpp @@ -0,0 +1,15 @@ +$NetBSD$ + +Fix call of strerror_r(3), returns an int, not a (char*). + +--- src/stream_file.cpp.orig 2015-02-20 11:37:06.000000000 +0000 ++++ src/stream_file.cpp +@@ -37,7 +37,7 @@ inline std::string strerror_str(int errn + #ifdef WIN32 + strerror_s(buf, sizeof(buf), errno2); + #else +- pbuf = strerror_r(errno2, buf, sizeof(buf)); ++ errno = strerror_r(errno2, buf, sizeof(buf)); + #endif + if (errno != 0) { + return createString("[unable to get message for error code " << errno2