summaryrefslogtreecommitdiff
path: root/math/hercules4sdl-decnumber
diff options
context:
space:
mode:
authorrhialto <rhialto@pkgsrc.org>2021-11-06 16:40:06 +0000
committerrhialto <rhialto@pkgsrc.org>2021-11-06 16:40:06 +0000
commitaf665f90f3b8ed910984a70587eb5860044cde0f (patch)
tree2560c88306050130860c59a6f93ace57466aaab8 /math/hercules4sdl-decnumber
parent0cf8ea42082cc8d0327b661279f3f0dbdde3c923 (diff)
downloadpkgsrc-af665f90f3b8ed910984a70587eb5860044cde0f.tar.gz
math/hercules4sdl-decnumber and -softfloat: new packages
needed for emulators/hercules4sdl.
Diffstat (limited to 'math/hercules4sdl-decnumber')
-rw-r--r--math/hercules4sdl-decnumber/DESCR17
-rw-r--r--math/hercules4sdl-decnumber/Makefile30
-rw-r--r--math/hercules4sdl-decnumber/PLIST14
-rw-r--r--math/hercules4sdl-decnumber/buildlink3.mk14
-rw-r--r--math/hercules4sdl-decnumber/distinfo6
-rw-r--r--math/hercules4sdl-decnumber/patches/patch-cflags.txt33
6 files changed, 114 insertions, 0 deletions
diff --git a/math/hercules4sdl-decnumber/DESCR b/math/hercules4sdl-decnumber/DESCR
new file mode 100644
index 00000000000..e2bb04e9434
--- /dev/null
+++ b/math/hercules4sdl-decnumber/DESCR
@@ -0,0 +1,17 @@
+ANSI C General Decimal Arithmetic Library
+
+The decNumber library implements the General Decimal Arithmetic Specification
+in ANSI C. This specification defines a decimal arithmetic which meets the
+requirements of commercial, financial, and human-oriented applications. It also
+matches the decimal arithmetic in the IEEE 754 Standard for Floating Point
+Arithmetic.
+
+The library fully implements the specification, and hence supports integer,
+fixed-point, and floating-point decimal numbers directly, including infinite,
+NaN (Not a Number), and subnormal values. Both arbitrary-precision and
+fixed-size representations are supported.
+
+Refer to the package's PDF file for more information.
+
+This version is the one used by the SoftDevLabs version of
+Hercules 4.x (Hyperion).
diff --git a/math/hercules4sdl-decnumber/Makefile b/math/hercules4sdl-decnumber/Makefile
new file mode 100644
index 00000000000..10a14183f31
--- /dev/null
+++ b/math/hercules4sdl-decnumber/Makefile
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile,v 1.1 2021/11/06 16:40:06 rhialto Exp $
+
+DISTNAME= hercules4sdl-decnumber-3.68.0
+PKGREVISION= 20210105
+CATEGORIES= math
+MASTER_SITES= ${MASTER_SITE_GITHUB:=SDL-Hercules-390/}
+GITHUB_PROJECT= decNumber
+GITHUB_TAG= da6650957d7dea21b5647c1fa80fa432f2891550 # 5 Jan 2021
+
+MAINTAINER= rhialto@NetBSD.org
+HOMEPAGE= https://github.com/SDL-Hercules-390/decNumber
+COMMENT= The SoftDevLabs version of decNumber for Hercules 4.x
+LICENSE= modified-bsd # in essence; see README.md
+
+USE_TOOLS+= cmake
+USE_LANGUAGES+= c
+
+USE_CMAKE= yes
+BLDDIR= ${WRKDIR}/decNumber64.Release
+CONFIGURE_DIRS= ${BLDDIR}
+CMAKE_ARG_PATH= ${WRKSRC}
+CMAKE_ARGS+= -D INSTALL_PREFIX=${PREFIX}/lib/hercules4sdl
+
+pre-configure:
+ ${MKDIR} ${BLDDIR}
+
+post-install:
+ cd ${DESTDIR}${PREFIX}/lib/hercules4sdl/lib && ${MV} libdecNumber64.a libdecNumber_pic.a
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/math/hercules4sdl-decnumber/PLIST b/math/hercules4sdl-decnumber/PLIST
new file mode 100644
index 00000000000..aea6339d3a3
--- /dev/null
+++ b/math/hercules4sdl-decnumber/PLIST
@@ -0,0 +1,14 @@
+@comment $NetBSD: PLIST,v 1.1 2021/11/06 16:40:06 rhialto Exp $
+lib/hercules4sdl/decnumber.ERRATA
+lib/hercules4sdl/decnumber.ICU-license.html
+lib/hercules4sdl/decnumber.pdf
+lib/hercules4sdl/decnumber.readme.txt
+lib/hercules4sdl/include/decContext.h
+lib/hercules4sdl/include/decNumber.h
+lib/hercules4sdl/include/decPacked.h
+lib/hercules4sdl/include/decQuad.h
+lib/hercules4sdl/include/decimal128.h
+lib/hercules4sdl/include/decimal32.h
+lib/hercules4sdl/include/decimal64.h
+lib/hercules4sdl/include/decnumber_version.h
+lib/hercules4sdl/lib/libdecNumber_pic.a
diff --git a/math/hercules4sdl-decnumber/buildlink3.mk b/math/hercules4sdl-decnumber/buildlink3.mk
new file mode 100644
index 00000000000..11ab9993b90
--- /dev/null
+++ b/math/hercules4sdl-decnumber/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink3.mk,v 1.1 2021/11/06 16:40:06 rhialto Exp $
+
+BUILDLINK_TREE+= hercules4sdl-decnumber
+
+.if !defined(HERCULES4SDL_DECNUMBER_BUILDLINK3_MK)
+HERCULES4SDL_DECNUMBER_BUILDLINK3_MK:=
+
+BUILDLINK_DEPMETHOD.hercules4sdl-decnumber?= build
+
+BUILDLINK_API_DEPENDS.hercules4sdl-decnumber+= hercules4sdl-decnumber>=3.68.0
+BUILDLINK_PKGSRCDIR.hercules4sdl-decnumber?= ../../math/hercules4sdl-decnumber
+.endif # HERCULES4SDL_DECNUMBER_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -hercules4sdl-decnumber
diff --git a/math/hercules4sdl-decnumber/distinfo b/math/hercules4sdl-decnumber/distinfo
new file mode 100644
index 00000000000..cafab8ab839
--- /dev/null
+++ b/math/hercules4sdl-decnumber/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2021/11/06 16:40:06 rhialto Exp $
+
+BLAKE2s (hercules4sdl-decnumber-3.68.0-da6650957d7dea21b5647c1fa80fa432f2891550.tar.gz) = 9501014ab8f362155742d7740ced713ca281b27a0eda98e35926bf615ec1f2ca
+SHA512 (hercules4sdl-decnumber-3.68.0-da6650957d7dea21b5647c1fa80fa432f2891550.tar.gz) = 3b20fa4ecb81eedc90fe919cc06dcb150f74b56771e8521a72648149135923ce3dd19e7b66e0ce660bb66b8e3ff4aa5be38be71b2e9f1de44978e755498f00f2
+Size (hercules4sdl-decnumber-3.68.0-da6650957d7dea21b5647c1fa80fa432f2891550.tar.gz) = 785599 bytes
+SHA1 (patch-cflags.txt) = 8e5833c2d43e7973dcf9d6c442976efefac30b26
diff --git a/math/hercules4sdl-decnumber/patches/patch-cflags.txt b/math/hercules4sdl-decnumber/patches/patch-cflags.txt
new file mode 100644
index 00000000000..5a12c199ed0
--- /dev/null
+++ b/math/hercules4sdl-decnumber/patches/patch-cflags.txt
@@ -0,0 +1,33 @@
+$NetBSD: patch-cflags.txt,v 1.1 2021/11/06 16:40:06 rhialto Exp $
+
+We just want do do a native-wordsize build.
+Do not depend on the object directory name to set the wordsize.
+
+--- cflags.txt.orig 2020-11-13 09:38:36.000000000 +0000
++++ cflags.txt
+@@ -38,25 +38,8 @@ set( CMAKE_C_FLAGS_RELWITHDEBINFO "${CMA
+
+ if( NOT WIN32 )
+
+- set( TEMP_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}" )
+- set( CMAKE_REQUIRED_FLAGS "-m32" )
+- Check_C_Compiler_Flag( -m32 OK )
+-
+- if( OK )
+- set( m32 "-m32" )
+- else()
+ set( m32 "" )
+- endif()
+-
+- set( CMAKE_REQUIRED_FLAGS "-m64" )
+- Check_C_Compiler_Flag( -m64 OK )
+- set( CMAKE_REQUIRED_FLAGS "${TEMP_CMAKE_REQUIRED_FLAGS}" )
+-
+- if( OK )
+- set( m64 "-m64" )
+- else()
+ set( m64 "" )
+- endif()
+
+ endif()
+