diff options
author | Matoro Mahri <matoro_gentoo@matoro.tk> | 2024-05-08 10:52:43 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2024-05-08 15:26:12 -0400 |
commit | 219ca1abd89e12db6d7e229fd12f6a070b458753 (patch) | |
tree | 28de7f8db371e1816225e4ec7bd170b7883cdfc7 /app-emulation/hercules-sdl-decnumber | |
parent | app-emulation/hercules-sdl-crypto: new package, add 4.7.0, 9999 (diff) | |
download | gentoo-219ca1abd89e12db6d7e229fd12f6a070b458753.tar.gz gentoo-219ca1abd89e12db6d7e229fd12f6a070b458753.tar.bz2 gentoo-219ca1abd89e12db6d7e229fd12f6a070b458753.zip |
app-emulation/hercules-sdl-decnumber: new package, add 4.7.0, 9999
Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'app-emulation/hercules-sdl-decnumber')
5 files changed, 208 insertions, 0 deletions
diff --git a/app-emulation/hercules-sdl-decnumber/Manifest b/app-emulation/hercules-sdl-decnumber/Manifest new file mode 100644 index 000000000000..a6446cde0c06 --- /dev/null +++ b/app-emulation/hercules-sdl-decnumber/Manifest @@ -0,0 +1 @@ +DIST decNumber-3aa2f4531b5fcbd0478ecbaf72ccc47079c67280.tar.gz 785702 BLAKE2B c7348c33dfdad046f79fc8112800e31b8010a0aa0acbca0e84d21e0f4ba366969a4c453d07ed8a3fdb79735850f17d71e66731a9b2db6d64781309f2c2861f8e SHA512 dad1c2d271f5739ac99850ac90ad45209e8efc80c20d29210f2f5b911b10ffc12a039e1bf6a7b8a171869a63ecad9bc8dfcf95161273385974b03221bd538a74 diff --git a/app-emulation/hercules-sdl-decnumber/files/cmakefix.patch b/app-emulation/hercules-sdl-decnumber/files/cmakefix.patch new file mode 100644 index 000000000000..42e461d92e24 --- /dev/null +++ b/app-emulation/hercules-sdl-decnumber/files/cmakefix.patch @@ -0,0 +1,159 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a316b76..50176f0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,6 +6,8 @@ cmake_minimum_required( VERSION 3.2 ) + + cmake_policy( SET CMP0048 NEW ) + ++include( GNUInstallDirs ) ++ + #------------------------------------------------------------------------------ + # Define the project + #------------------------------------------------------------------------------ +@@ -131,8 +133,8 @@ set_target_properties( ${FULLNAME} PROPERTIES + COMPILE_PDB_NAME ${FULLNAME} ) + + install( TARGETS ${FULLNAME} +- PUBLIC_HEADER DESTINATION include +- ARCHIVE DESTINATION ${LIB_INSTALL_DIR} ) ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_LIBDIR}/hercules-sdl/include ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/hercules-sdl/lib ) + + + #------------------------------------------------------------------------------ +diff --git a/cmake/modules/ParseBinaryDir.cmake b/cmake/modules/ParseBinaryDir.cmake +index 7983107..2ede77b 100644 +--- a/cmake/modules/ParseBinaryDir.cmake ++++ b/cmake/modules/ParseBinaryDir.cmake +@@ -7,6 +7,8 @@ macro( ParseBinaryDir ) + set( CMAKE_DISABLE_IN_SOURCE_BUILD ON ) + set( CMAKE_DISABLE_SOURCE_CHANGES ON ) + ++ set( FULLNAME ${EXTPKG_NAME} ) ++ + #-------------------------------------------------------------------------- + # Make sure they are not trying to do an "in source" build by making + # sure the cmake "binary" (build) directory is not a subdirectory of +@@ -48,102 +50,6 @@ Remove the 'CMakeCache.txt' file and the entire 'CMakeFiles' directory and try a + + TEST_BIG_ENDIAN( IS_BIG_ENDIAN ) + +- #-------------------------------------------------------------------------- +- # Split the binary build directory into its constituent components. +- # Refer to the "BUILDING" document for more information. +- #-------------------------------------------------------------------------- +- +- get_filename_component( BINARY_HLQ "${CMAKE_BINARY_DIR}" DIRECTORY ) +- get_filename_component( BINARY_DIR "${CMAKE_BINARY_DIR}" NAME ) +- +- trace( BINARY_HLQ ) +- trace( BINARY_DIR ) +- +- string( FIND ${BINARY_DIR} " " _n ) +- if( NOT ${_n} EQUAL -1 ) +- message( FATAL_ERROR "Build directory name cannot have spaces! ${BINARY_DIR}" ) +- endif() +- +- #-------------------------------------------------------------------------- +- # First, split it into two parts: before the dot and after the dot +- #-------------------------------------------------------------------------- +- +- string( REGEX MATCH "([^\\.]*)" _xxxxx ${BINARY_DIR} ) +- string( REGEX MATCH "([^.]*\$)" CONFIG ${BINARY_DIR} ) +- +- trace( _xxxxx ) +- trace( CONFIG ) +- +- #-------------------------------------------------------------------------- +- # The second part tells us if this is a "Debug" or "Release" build. +- #-------------------------------------------------------------------------- +- +- string( LENGTH ${CONFIG} _n ) +- if( ${_n} LESS 1 ) +- message( FATAL_ERROR "Invalid Release/Debug build type! ${CONFIG}" ) +- endif() +- +- #-------------------------------------------------------------------------- +- # Capitalize "Debug" and "Release" for Visual Studio compatibility. +- #-------------------------------------------------------------------------- +- +- include( CapitalizeWord ) +- +- Capitalize_Word( ${CONFIG} CONFIG ) +- +- if(( NOT CONFIG STREQUAL "Debug" ) AND (NOT CONFIG STREQUAL "Release" )) +- message( FATAL_ERROR "Invalid Release/Debug build type! ${CONFIG}" ) +- endif() +- +- #-------------------------------------------------------------------------- +- # Define the "Debug" or "Release" build type +- #-------------------------------------------------------------------------- +- +- if( CONFIG STREQUAL "Debug" ) +- set( CMAKE_BUILD_TYPE "Debug" CACHE PATH "" FORCE ) +- set( DBGCHAR "d" ) +- elseif( CONFIG STREQUAL "Release" ) +- set( CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE PATH "" FORCE ) +- set( DBGCHAR "" ) +- endif() +- +- trace( CMAKE_BUILD_TYPE ) +- +- #-------------------------------------------------------------------------- +- # Now split the first part into the base package/product name +- # and build architecture (32-bit ot 64-bit). +- #-------------------------------------------------------------------------- +- +- string( LENGTH ${_xxxxx} _n ) +- if( ${_n} LESS 3 ) +- message( FATAL_ERROR "Invalid base package name! ${_xxxxx}" ) +- endif() +- +- math( EXPR _n "${_n} - 2" ) # (want the last two characters) +- +- string( SUBSTRING ${_xxxxx} 0 ${_n} BASENAME ) +- string( SUBSTRING ${_xxxxx} ${_n} -1 BITNESS ) +- +- if( NOT BITNESS STREQUAL "32" AND +- NOT BITNESS STREQUAL "64" ) +- message( FATAL_ERROR "Invalid package architecture! ${BITNESS}" ) +- endif() +- +- #-------------------------------------------------------------------------- +- # Show results +- #-------------------------------------------------------------------------- +- +- set( SUFFIX "${BITNESS}${DBGCHAR}" ) +- set( FULLNAME "${BASENAME}${SUFFIX}" ) +- +- trace( BASENAME ) +- trace( BITNESS ) +- trace( CONFIG ) +- trace( DBGCHAR ) +- trace( SUFFIX ) +- trace( FULLNAME ) +- trace( CMAKE_BINARY_DIR ) +- + #-------------------------------------------------------------------------- + # Define the install directory + #-------------------------------------------------------------------------- +diff --git a/extra.txt b/extra.txt +index dfb293d..6018eb6 100644 +--- a/extra.txt ++++ b/extra.txt +@@ -2,10 +2,10 @@ + # Define additional files to be installed + #------------------------------------------------------------------------------ + +-install( FILES "decnumber.ICU-license.html" DESTINATION . ) +-install( FILES "decnumber.pdf" DESTINATION . ) +-install( FILES "decnumber.readme.txt" DESTINATION . ) +-install( FILES "decnumber.ERRATA" DESTINATION . ) ++install( FILES "decnumber.ICU-license.html" DESTINATION ${CMAKE_INSTALL_DOCDIR} ) ++install( FILES "decnumber.pdf" DESTINATION ${CMAKE_INSTALL_DOCDIR} ) ++install( FILES "decnumber.readme.txt" DESTINATION ${CMAKE_INSTALL_DOCDIR} ) ++install( FILES "decnumber.ERRATA" DESTINATION ${CMAKE_INSTALL_DOCDIR} ) + + #------------------------------------------------------------------------------ + diff --git a/app-emulation/hercules-sdl-decnumber/hercules-sdl-decnumber-4.7.0.ebuild b/app-emulation/hercules-sdl-decnumber/hercules-sdl-decnumber-4.7.0.ebuild new file mode 100644 index 000000000000..1b93ffd36baf --- /dev/null +++ b/app-emulation/hercules-sdl-decnumber/hercules-sdl-decnumber-4.7.0.ebuild @@ -0,0 +1,20 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +# Use ../hercules-sdl/files/gen_hashes.sh to identify the relevant +# commit when tagging new versions. +COMMIT="3aa2f4531b5fcbd0478ecbaf72ccc47079c67280" + +DESCRIPTION="ANSI C General Decimal Arithmetic Library" +HOMEPAGE="https://github.com/SDL-Hercules-390/decNumber" +SRC_URI="https://github.com/SDL-Hercules-390/decNumber/archive/${COMMIT}.tar.gz -> decNumber-${COMMIT}.tar.gz" + +S="${WORKDIR}/decNumber-${COMMIT}" +LICENSE="icu" +SLOT="0" +KEYWORDS="~amd64 ~ppc64" +PATCHES=( "${FILESDIR}/cmakefix.patch" ) diff --git a/app-emulation/hercules-sdl-decnumber/hercules-sdl-decnumber-9999.ebuild b/app-emulation/hercules-sdl-decnumber/hercules-sdl-decnumber-9999.ebuild new file mode 100644 index 000000000000..6c8be1db358a --- /dev/null +++ b/app-emulation/hercules-sdl-decnumber/hercules-sdl-decnumber-9999.ebuild @@ -0,0 +1,14 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit git-r3 cmake + +DESCRIPTION="ANSI C General Decimal Arithmetic Library" +HOMEPAGE="https://github.com/SDL-Hercules-390/decNumber" +EGIT_REPO_URI="https://github.com/SDL-Hercules-390/decNumber" + +LICENSE="icu" +SLOT="0" +PATCHES=( "${FILESDIR}/cmakefix.patch" ) diff --git a/app-emulation/hercules-sdl-decnumber/metadata.xml b/app-emulation/hercules-sdl-decnumber/metadata.xml new file mode 100644 index 000000000000..9e1d8aa0e17e --- /dev/null +++ b/app-emulation/hercules-sdl-decnumber/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>s390@gentoo.org</email> + <name>s390 architecture team</name> + </maintainer> + <longdescription> + ANSI C General Decimal Arithmetic Library for use by the SDL-Hercules-390 emulator + </longdescription> + <upstream> + <remote-id type="github">SDL-Hercules-390/decNumber</remote-id> + </upstream> +</pkgmetadata> |