GNU bug report logs -
#31114
[PATCH] gnu: Add fortune-mod.
Previous Next
Reported by: Pierre Neidhardt <ambrevar <at> gmail.com>
Date: Mon, 9 Apr 2018 17:33:01 UTC
Severity: normal
Tags: patch
Done: ludo <at> gnu.org (Ludovic Courtès)
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 31114 in the body.
You can then email your comments to 31114 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#31114
; Package
guix-patches
.
(Mon, 09 Apr 2018 17:33:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Pierre Neidhardt <ambrevar <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Mon, 09 Apr 2018 17:33:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/games.scm (fortune-mod): New variable.
---
gnu/packages/games.scm | 35 +++
gnu/packages/patches/fortune-mod-cmake.patch | 424 +++++++++++++++++++++++++++
2 files changed, 459 insertions(+)
create mode 100644 gnu/packages/patches/fortune-mod-cmake.patch
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 5207e08d6..e0e48e8f4 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -4851,3 +4851,38 @@ Strife, Chex Quest, and fan-created games like Harmony, Hacx and Freedoom.")
(license:non-copyleft ; modified dumb
"file://dumb/licence.txt"
"Dumb license, explicitly GPL compatible.")))))
+
+(define-public fortune-mod
+ (package
+ (name "fortune-mod")
+ (version "2.4.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/shlomif/fortune-mod/"
+ "archive/" name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1hnqpkassh7fwg2jgvybr8mw7vzfikbrhb5r22367ilfwxnl9yd2"))
+ (patches (search-patches "fortune-mod-cmake.patch"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f ; TODO: The tests require File::Find::Object Perl module, Test::Differences and Test::RunValgrind (CPAN).
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-build-env
+ (lambda* (#:key outputs #:allow-other-keys)
+ (chdir "fortune-mod")))
+ (add-after 'install 'fix-install-directory
+ ;; Move binary from "games/" to "bin/".
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (rename-file (string-append out "/games/fortune")
+ (string-append out "/bin/fortune"))
+ #t))))))
+ (inputs `(("recode" ,recode)))
+ (native-inputs `(("perl" ,perl)))
+ (home-page "http://www.shlomifish.org/open-source/projects/fortune-mod/")
+ (synopsis "The Fortune Cookie program from BSD games")
+ (description "Fortune is a command-line utility which displays a random
+quotation from a collection of quotes.")
+ (license license:gpl2+)))
diff --git a/gnu/packages/patches/fortune-mod-cmake.patch b/gnu/packages/patches/fortune-mod-cmake.patch
new file mode 100644
index 000000000..98439f743
--- /dev/null
+++ b/gnu/packages/patches/fortune-mod-cmake.patch
@@ -0,0 +1,424 @@
+Include missing fortune-mod/cmake/Shlomif_Common.cmake
+
+--- /dev/null
++++ b/fortune-mod/cmake/Shlomif_Common.cmake
+@@ -0,0 +1,417 @@
++# Copyright (c) 2012 Shlomi Fish
++#
++# Permission is hereby granted, free of charge, to any person
++# obtaining a copy of this software and associated documentation
++# files (the "Software"), to deal in the Software without
++# restriction, including without limitation the rights to use,
++# copy, modify, merge, publish, distribute, sublicense, and/or sell
++# copies of the Software, and to permit persons to whom the
++# Software is furnished to do so, subject to the following
++# conditions:
++#
++# The above copyright notice and this permission notice shall be
++# included in all copies or substantial portions of the Software.
++#
++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++# OTHER DEALINGS IN THE SOFTWARE.
++#
++#
++# (This copyright notice applies only to this file)
++
++include(CheckIncludeFile)
++include(CheckIncludeFiles)
++include(CheckFunctionExists)
++include(CheckCCompilerFlag)
++include(FindPerl)
++IF (NOT PERL_FOUND)
++ MESSAGE ( FATAL_ERROR "perl must be installed")
++ENDIF()
++
++# Taken from http://www.cmake.org/pipermail/cmake/2007-March/013060.html
++MACRO(REPLACE_FUNCTIONS sources)
++ FOREACH(name ${ARGN})
++ STRING(TOUPPER have_${name} SYMBOL_NAME)
++ CHECK_FUNCTION_EXISTS(${name} ${SYMBOL_NAME})
++ IF(NOT ${SYMBOL_NAME})
++ SET(${sources} ${${sources}} ${name}.c)
++ ENDIF()
++ ENDFOREACH()
++ENDMACRO()
++
++MACRO(CHECK_MULTI_INCLUDE_FILES)
++ FOREACH(name ${ARGN})
++ STRING(TOUPPER have_${name} SYMBOL_NAME)
++ STRING(REGEX REPLACE "\\." "_" SYMBOL_NAME ${SYMBOL_NAME})
++ STRING(REGEX REPLACE "/" "_" SYMBOL_NAME ${SYMBOL_NAME})
++ CHECK_INCLUDE_FILE(${name} ${SYMBOL_NAME})
++ ENDFOREACH()
++ENDMACRO()
++
++MACRO(CHECK_MULTI_FUNCTIONS_EXISTS)
++ FOREACH(name ${ARGN})
++ STRING(TOUPPER have_${name} SYMBOL_NAME)
++ CHECK_FUNCTION_EXISTS(${name} ${SYMBOL_NAME})
++ ENDFOREACH()
++ENDMACRO()
++
++MACRO(PREPROCESS_PATH_PERL_WITH_FULL_NAMES TARGET_NAME SOURCE DEST)
++ ADD_CUSTOM_COMMAND(
++ OUTPUT "${DEST}"
++ COMMAND "${PERL_EXECUTABLE}"
++ ARGS "${CMAKE_SOURCE_DIR}/cmake/preprocess-path-perl.pl"
++ "--input" "${SOURCE}"
++ "--output" "${DEST}"
++ "--subst" "WML_VERSION=${VERSION}"
++ "--subst" "WML_CONFIG_ARGS="
++ "--subst" "perlprog=${PERL_EXECUTABLE}"
++ "--subst" "perlvers=${PERL_EXECUTABLE}"
++ "--subst" "built_system=${CMAKE_SYSTEM_NAME}"
++ "--subst" "built_user=${username}"
++ "--subst" "built_date=${date}"
++ "--subst" "prefix=${CMAKE_INSTALL_PREFIX}"
++ "--subst" "bindir=${CMAKE_INSTALL_PREFIX}/bin"
++ "--subst" "libdir=${CMAKE_INSTALL_PREFIX}/${WML_LIB_DIR}"
++ "--subst" "mandir=${CMAKE_INSTALL_PREFIX}/share/man"
++ "--subst" "PATH_PERL=${PERL_EXECUTABLE}"
++ "--subst" "INSTALLPRIVLIB=${CMAKE_INSTALL_PREFIX}/${WML_LIB_DIR}"
++ "--subst" "INSTALLARCHLIB=${CMAKE_INSTALL_PREFIX}/${WML_LIB_DIR}"
++ COMMAND chmod ARGS "a+x" "${DEST}"
++ DEPENDS "${SOURCE}"
++ )
++ # The custom command needs to be assigned to a target.
++ ADD_CUSTOM_TARGET(
++ ${TARGET_NAME} ALL
++ DEPENDS ${DEST}
++ )
++ENDMACRO()
++
++MACRO(PREPROCESS_PATH_PERL TGT BASE_SOURCE BASE_DEST)
++ PREPROCESS_PATH_PERL_WITH_FULL_NAMES ("${TGT}" "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_SOURCE}" "${CMAKE_CURRENT_BINARY_DIR}/${BASE_DEST}")
++ENDMACRO()
++
++# Copies the file from one place to the other.
++# TGT is the name of the makefile target to add.
++# SOURCE is the source path.
++# DEST is the destination path.
++MACRO(ADD_COPY_TARGET TGT SOURCE DEST)
++ ADD_CUSTOM_COMMAND(
++ OUTPUT "${DEST}"
++ DEPENDS "${SOURCE}"
++ COMMAND "${CMAKE_COMMAND}" "-E" "copy" "${SOURCE}" "${DEST}"
++ )
++ # The custom command needs to be assigned to a target.
++ ADD_CUSTOM_TARGET("${TGT}" ALL DEPENDS "${DEST}")
++ENDMACRO()
++
++MACRO(RUN_POD2MAN TARGET_DESTS_VARNAME BASE_SOURCE BASE_DEST SECTION CENTER RELEASE)
++ SET (DEST "${CMAKE_CURRENT_BINARY_DIR}/${BASE_DEST}")
++ IF (POD2MAN_SOURCE_IS_IN_BINARY)
++ SET (SOURCE "${CMAKE_CURRENT_BINARY_DIR}/${BASE_SOURCE}")
++ ELSE ()
++ SET (SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_SOURCE}")
++ ENDIF ()
++ # It is null by default.
++ SET (POD2MAN_SOURCE_IS_IN_BINARY )
++ ADD_CUSTOM_COMMAND(
++ OUTPUT "${DEST}"
++ COMMAND "${PERL_EXECUTABLE}"
++ ARGS "${CMAKE_SOURCE_DIR}/cmake/pod2man-wrapper.pl"
++ "--src" "${SOURCE}"
++ "--dest" "${DEST}"
++ "--section" "${SECTION}"
++ "--center" "${CENTER}"
++ "--release" "${RELEASE}"
++ DEPENDS "${SOURCE}"
++ VERBATIM
++ )
++ # The custom command needs to be assigned to a target.
++ LIST(APPEND "${TARGET_DESTS_VARNAME}" "${DEST}")
++ENDMACRO()
++
++MACRO(SIMPLE_POD2MAN TARGET_NAME SOURCE DEST SECTION)
++ RUN_POD2MAN("${TARGET_NAME}" "${SOURCE}" "${DEST}.${SECTION}"
++ "${SECTION}"
++ "EN Tools" "EN Tools"
++ )
++ENDMACRO()
++
++MACRO(INST_POD2MAN TARGET_NAME SOURCE DEST SECTION)
++ SIMPLE_POD2MAN ("${TARGET_NAME}" "${SOURCE}" "${DEST}" "${SECTION}")
++ INSTALL_MAN ("${CMAKE_CURRENT_BINARY_DIR}/${DEST}.${SECTION}" "${SECTION}")
++ENDMACRO()
++
++MACRO(INST_RENAME_POD2MAN TARGET_NAME SOURCE DEST SECTION INSTNAME)
++ SIMPLE_POD2MAN ("${TARGET_NAME}" "${SOURCE}" "${DEST}" "${SECTION}")
++ INSTALL_RENAME_MAN ("${DEST}.${SECTION}" "${SECTION}" "${INSTNAME}" "${CMAKE_CURRENT_BINARY_DIR}")
++ENDMACRO()
++
++# Finds libm and puts the result in the MATH_LIB_LIST variable.
++# If it cannot find it, it fails with an error.
++MACRO(FIND_LIBM)
++ IF (UNIX)
++ FIND_LIBRARY(LIBM_LIB m)
++ IF(LIBM_LIB STREQUAL "LIBM_LIB-NOTFOUND")
++ MESSAGE(FATAL_ERROR "Cannot find libm")
++ ELSE()
++ SET(MATH_LIB_LIST ${LIBM_LIB})
++ ENDIF()
++ ELSE()
++ SET(MATH_LIB_LIST)
++ ENDIF()
++ENDMACRO(FIND_LIBM)
++
++MACRO(INSTALL_MAN SOURCE SECTION)
++ INSTALL(
++ FILES
++ ${SOURCE}
++ DESTINATION
++ "share/man/man${SECTION}"
++ )
++ENDMACRO()
++
++MACRO(INSTALL_DATA SOURCE)
++ INSTALL(
++ FILES
++ "${SOURCE}"
++ DESTINATION
++ "${WML_DATA_DIR}"
++ )
++ENDMACRO()
++
++MACRO(INSTALL_RENAME_MAN SOURCE SECTION INSTNAME MAN_SOURCE_DIR)
++ INSTALL(
++ FILES
++ "${MAN_SOURCE_DIR}/${SOURCE}"
++ DESTINATION
++ "share/man/man${SECTION}"
++ RENAME
++ "${INSTNAME}.${SECTION}"
++ )
++ENDMACRO()
++
++MACRO(INSTALL_CAT_MAN SOURCE SECTION)
++ INSTALL(
++ FILES
++ "${CMAKE_CURRENT_BINARY_DIR}/${SOURCE}"
++ DESTINATION
++ "share/man/cat${SECTION}"
++ )
++ENDMACRO()
++
++MACRO(DEFINE_WML_AUX_PERL_PROG_WITHOUT_MAN BASENAME)
++ PREPROCESS_PATH_PERL("preproc_${BASENAME}" "${BASENAME}.src" "${BASENAME}.pl")
++ INSTALL(
++ PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${BASENAME}.pl"
++ DESTINATION "${WML_LIBEXE_DIR}"
++ RENAME "wml_aux_${BASENAME}"
++ )
++ENDMACRO()
++
++MACRO(DEFINE_WML_AUX_PERL_PROG BASENAME)
++ DEFINE_WML_AUX_PERL_PROG_WITHOUT_MAN("${BASENAME}")
++ SET (aux_pod_dests )
++ RUN_POD2MAN("aux_pod_dests" "${BASENAME}.src" "${BASENAME}.1" "1" "EN Tools" "En Tools")
++ INSTALL_RENAME_MAN ("${BASENAME}.1" 1 "wml_aux_${BASENAME}" "${CMAKE_CURRENT_BINARY_DIR}")
++ ADD_CUSTOM_TARGET(
++ "pod_${BASENAME}" ALL
++ DEPENDS ${aux_pod_dests}
++ )
++ENDMACRO()
++
++MACRO(DEFINE_WML_AUX_C_PROG_WITHOUT_MAN BASENAME)
++ ADD_EXECUTABLE(${BASENAME} ${ARGN})
++ SET_TARGET_PROPERTIES("${BASENAME}"
++ PROPERTIES OUTPUT_NAME "wml_aux_${BASENAME}"
++ )
++ INSTALL(
++ TARGETS "${BASENAME}"
++ DESTINATION "${WML_LIBEXE_DIR}"
++ )
++ENDMACRO()
++
++MACRO(DEFINE_WML_AUX_C_PROG BASENAME MAN_SOURCE_DIR)
++ DEFINE_WML_AUX_C_PROG_WITHOUT_MAN (${BASENAME} ${ARGN})
++ INSTALL_RENAME_MAN ("${BASENAME}.1" 1 "wml_aux_${BASENAME}" "${MAN_SOURCE_DIR}")
++ENDMACRO()
++
++MACRO(DEFINE_WML_PERL_BACKEND BASENAME DEST_BASENAME)
++ PREPROCESS_PATH_PERL(
++ "${BASENAME}_preproc" "${BASENAME}.src" "${BASENAME}.pl"
++ )
++ SET (perl_backend_pod_tests )
++ INST_RENAME_POD2MAN(
++ "perl_backend_pod_tests" "${BASENAME}.src" "${BASENAME}" "1"
++ "${DEST_BASENAME}"
++ )
++ ADD_CUSTOM_TARGET(
++ "${BASENAME}_pod" ALL
++ DEPENDS ${perl_backend_pod_tests}
++ )
++ INSTALL(
++ PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${BASENAME}.pl"
++ DESTINATION "${WML_LIBEXE_DIR}"
++ RENAME "${DEST_BASENAME}"
++ )
++ENDMACRO()
++
++MACRO(CHOMP VAR)
++ STRING(REGEX REPLACE "[\r\n]+$" "" ${VAR} "${${VAR}}")
++ENDMACRO()
++
++MACRO(READ_VERSION_FROM_VER_TXT)
++
++ # Process and extract the version number.
++ FILE( READ "${CMAKE_SOURCE_DIR}/ver.txt" VERSION)
++
++ CHOMP (VERSION)
++
++ STRING (REGEX MATCHALL "([0-9]+)" VERSION_DIGITS "${VERSION}")
++
++ LIST(GET VERSION_DIGITS 0 CPACK_PACKAGE_VERSION_MAJOR)
++ LIST(GET VERSION_DIGITS 1 CPACK_PACKAGE_VERSION_MINOR)
++ LIST(GET VERSION_DIGITS 2 CPACK_PACKAGE_VERSION_PATCH)
++
++ENDMACRO()
++
++MACRO(INSTALL_MAN SOURCE SECTION)
++ INSTALL(
++ FILES
++ ${SOURCE}
++ DESTINATION
++ "share/man/man${SECTION}"
++ )
++ENDMACRO()
++
++MACRO(ADD_GCC_DEBUG_WARNING_FLAGS)
++ ADD_DEFINITIONS(
++ "-Wall"
++ "-Werror=implicit-function-declaration"
++ "-Wold-style-declaration"
++ "-Wmissing-prototypes"
++ "-Wformat-nonliteral"
++ "-Wcast-align"
++ "-Wpointer-arith"
++ "-Wbad-function-cast"
++ "-Wstrict-prototypes"
++ "-Wmissing-declarations"
++ "-Wundef"
++ "-Wnested-externs"
++ "-Wcast-qual"
++ "-Wshadow"
++ "-Wwrite-strings"
++ "-Wunused"
++ "-Wold-style-definition"
++ )
++ENDMACRO()
++
++MACRO(SHLOMIF_PHYS_COPY_FILE FROM TO)
++ FILE (READ "${FROM}" contents)
++ FILE (WRITE "${TO}" "${contents}")
++ENDMACRO()
++
++MACRO(SHLOMIF_COMMON_SETUP private_mod_path)
++ SET (private_mod "Shlomif_Common.cmake")
++ SET (_dest "${private_mod_path}/${private_mod}")
++ IF (NOT EXISTS "${_dest}")
++ SHLOMIF_PHYS_COPY_FILE( "/usr/share/cmake/Modules/${private_mod}" "${_dest}")
++ ENDIF ()
++ENDMACRO()
++
++# Configure paths.
++SET (RELATIVE_DATADIR "share")
++SET (DATADIR "${CMAKE_INSTALL_PREFIX}/${RELATIVE_DATADIR}")
++
++SET (PKGDATADIR_SUBDIR "freecell-solver")
++SET (RELATIVE_PKGDATADIR "${RELATIVE_DATADIR}/${PKGDATADIR_SUBDIR}")
++SET (PKGDATADIR "${DATADIR}/${PKGDATADIR_SUBDIR}")
++
++SET (COMPILER_FLAGS_TO_CHECK "-fvisibility=hidden")
++MACRO(add_flags)
++ LIST(APPEND COMPILER_FLAGS_TO_CHECK ${ARGV})
++ENDMACRO ()
++MACRO(SHLOMIF_ADD_COMMON_C_FLAGS)
++ IF (MSVC)
++ MESSAGE(FATAL_ERROR "Error! You are using Microsoft Visual C++ and Freecell Solver Requires a compiler that supports C99 and some GCC extensions. Possible alternatives are GCC, clang and Intel C++ Compiler")
++ ENDIF ()
++
++ IF (CPU_ARCH)
++ add_flags("-march=${CPU_ARCH}")
++ ENDIF ()
++
++ IF (OPTIMIZATION_OMIT_FRAME_POINTER)
++ add_flags("-fomit-frame-pointer")
++ ENDIF ()
++
++ SET (IS_DEBUG)
++ IF ((CMAKE_BUILD_TYPE STREQUAL debug) OR (CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo))
++ SET (IS_DEBUG 1)
++ # This slows down the program considerably.
++ IF (CMAKE_BUILD_TYPE STREQUAL debug)
++ add_flags("-DDEBUG=1")
++ ENDIF ()
++
++ # Removed these flags because they emitted spurious warnings, which were of
++ # no use to us:
++ # "-Winline"
++ # "-Wfloat-equal"
++
++ IF (${CMAKE_COMPILER_IS_GNUCC})
++ ADD_GCC_DEBUG_WARNING_FLAGS()
++ ENDIF ()
++ ENDIF ()
++
++ IF (${CMAKE_COMPILER_IS_GNUCC})
++ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
++ ENDIF ()
++
++ IF (CMAKE_BUILD_TYPE STREQUAL release)
++ add_flags("-flto" "-ffat-lto-objects")
++ ENDIF ()
++
++ENDMACRO()
++
++MACRO(SHLOMIF_FINALIZE_FLAGS)
++ SET (IDX 1)
++ FOREACH (CFLAG_TO_CHECK ${COMPILER_FLAGS_TO_CHECK})
++ SET (FLAG_EXISTS_VAR "FLAG_EXISTS_${IDX}")
++ MATH (EXPR IDX "${IDX} + 1")
++ CHECK_C_COMPILER_FLAG("${CFLAG_TO_CHECK}" ${FLAG_EXISTS_VAR})
++ IF (${FLAG_EXISTS_VAR})
++ ADD_DEFINITIONS(${CFLAG_TO_CHECK})
++ LIST(APPEND MY_LINK_FLAGS "${CFLAG_TO_CHECK}")
++ ENDIF ()
++ ENDFOREACH()
++
++ SET (MY_EXE_FLAGS)
++ FOREACH (CFLAG_TO_CHECK "-fwhole-program")
++ SET (FLAG_EXISTS_VAR "FLAG_EXISTS_${IDX}")
++ MATH (EXPR IDX "${IDX} + 1")
++ CHECK_C_COMPILER_FLAG("${CFLAG_TO_CHECK}" ${FLAG_EXISTS_VAR})
++ IF (${FLAG_EXISTS_VAR})
++ LIST(APPEND MY_EXE_FLAGS "${CFLAG_TO_CHECK}")
++ ENDIF ()
++ ENDFOREACH ()
++ENDMACRO ()
++
++MACRO(CHECK_FOR_PERL_MODULE MODULE)
++ EXECUTE_PROCESS (
++ COMMAND "${PERL_EXECUTABLE}" "-M${MODULE}=" "-e" "exit(0)"
++ RESULT_VARIABLE "RESULT"
++ )
++ IF (NOT RESULT EQUAL 0)
++ MESSAGE(FATAL_ERROR "Your Perl doesn't have the module ${MODULE}. Please install it.")
++ ENDIF ()
++ENDMACRO ()
++
++MACRO(CHECK_FOR_MULTIPLE_PERL_MODULES)
++ FOREACH (MODULE ${ARGV})
++ CHECK_FOR_PERL_MODULE ("${MODULE}")
++ ENDFOREACH ()
++ENDMACRO ()
+--
+2.16.3
--
2.16.3
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31114
; Package
guix-patches
.
(Mon, 09 Apr 2018 17:40:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 31114 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
A few questions:
- Tests need perl-run-valgrind or something like that which is not in
the repo yet. I guess it would be better to add it. Should I do it?
I know nothing about Perl packagin, so if something feels like giving
it a shot...
- A cmake file is deliberately missing from the source (strange
engineering methods...) so I included it as a patch. Not so
convenient. Is it possible to add several sources so that the missing
file gets downloaded from its separate git repository?
--
Pierre Neidhardt
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31114
; Package
guix-patches
.
(Mon, 09 Apr 2018 20:52:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 31114 <at> debbugs.gnu.org (full text, mbox):
Hi,
Pierre Neidhardt <ambrevar <at> gmail.com> skribis:
> A few questions:
>
> - Tests need perl-run-valgrind or something like that which is not in
> the repo yet. I guess it would be better to add it. Should I do it?
> I know nothing about Perl packagin, so if something feels like giving
> it a shot...
‘guix import cpan’ feels like giving it a shot. :-)
More seriously, if Valgrind testing is optional, it’s OK to leave it out
IMO. The other tests would be nice to have, and the Perl packages are
probably easy to import if you wanted to try, but that shouldn’t be a
blocker IMO.
> - A cmake file is deliberately missing from the source (strange
> engineering methods...) so I included it as a patch. Not so
> convenient. Is it possible to add several sources so that the missing
> file gets downloaded from its separate git repository?
You can add an ‘origin’ in ‘inputs’. It would be preferable than adding
it as a patch, indeed.
Would you like to give it a try?
Thanks,
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31114
; Package
guix-patches
.
(Mon, 09 Apr 2018 20:56:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 31114 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, Apr 09, 2018 at 11:09:00PM +0530, Pierre Neidhardt wrote:
> - A cmake file is deliberately missing from the source (strange
> engineering methods...) so I included it as a patch. Not so
> convenient. Is it possible to add several sources so that the missing
> file gets downloaded from its separate git repository?
For an example of how to do that, look at the native-inputs field of the
Git package definition. The Git manpages are downloaded separately for
that package.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31114
; Package
guix-patches
.
(Tue, 10 Apr 2018 07:02:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 31114 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Leo Famulari <leo <at> famulari.name> writes:
> For an example of how to do that, look at the native-inputs field of the
> Git package definition. The Git manpages are downloaded separately for
> that package.
Thanks for the hint, it works like a charm!
(add-after 'unpack 'fix-build-env
(lambda* (#:key inputs #:allow-other-keys)
(let* ((cmake-rules (assoc-ref inputs "cmake-rules")))
(copy-file cmake-rules "fortune-mod/cmake/Shlomif_Common.cmake")
(chdir "fortune-mod"))))
One nit: I want to install the file without specifying its destination
name (re-use the source name).
~install-file~ can do that but here ~cmake-rules~ contains the checksum
prefix.
I remember seeing a procedure to trim the checksum prefix from file
names somewhere...
More generally: is there an API reference or is it just the source code?
Development documentation seems a bit scarce...
--
Pierre Neidhardt
You will gain money by a speculation or lottery.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31114
; Package
guix-patches
.
(Tue, 10 Apr 2018 07:06:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 31114 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Wow, my first contact with ~guix import~, this tool is a gem!
Seems to work perfectly.
I've enabled the tests but it fails there:
Can't locate IO/All.pm in @INC (you may need to install the IO::All module) (@INC contains:
/gnu/store/w96mglkim3p2ryb72flhzlsyv618fhk2-perl-5.26.1/lib/perl5/site_perl/5.26.1/x86_64-linux-thread-multi ... at /tmp/guix-build-fortune-mod-2.4.1.drv-0/fortune-mod-fortune-mod-2.4.1/fortune-mod/tests/t/check-cookies.t line 6.
Is IO::All really missing from Guix?
--
Pierre Neidhardt
If a nation expects to be ignorant and free,
... it expects what never was and never will be.
-- Thomas Jefferson
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31114
; Package
guix-patches
.
(Tue, 10 Apr 2018 07:25:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 31114 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Pierre Neidhardt <ambrevar <at> gmail.com> writes:
> Is IO::All really missing from Guix?
Turns out that the answer is yes. So I had to build 3 additional Perl
packages before getting the tests to run. Now they fail with:
Error open (<:raw:encoding(UTF-8)) on 'fortune--1.valgrind-log': No such file or directory at /gnu/store/4zvirlvdg6bibcs8pw6al6k57iif8v9n-perl-test-runvalgrind-0.2.0/lib/perl5/site_perl/5.26.1/Test/RunValgrind.pm line 120.
When run manually with
./pre-inst-env guix environment fortune-mod -- make test
all 4 tests pass. Any hint on how to investigate further?
--
Pierre Neidhardt
Support your right to arm bears!!
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31114
; Package
guix-patches
.
(Tue, 10 Apr 2018 10:15:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 31114 <at> debbugs.gnu.org (full text, mbox):
Pierre Neidhardt <ambrevar <at> gmail.com> skribis:
> Pierre Neidhardt <ambrevar <at> gmail.com> writes:
>
>> Is IO::All really missing from Guix?
>
> Turns out that the answer is yes. So I had to build 3 additional Perl
> packages before getting the tests to run. Now they fail with:
>
> Error open (<:raw:encoding(UTF-8)) on 'fortune--1.valgrind-log': No such file or directory at /gnu/store/4zvirlvdg6bibcs8pw6al6k57iif8v9n-perl-test-runvalgrind-0.2.0/lib/perl5/site_perl/5.26.1/Test/RunValgrind.pm line 120.
Perhaps you need to add Valgrind to ‘native-inputs’ after all?
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31114
; Package
guix-patches
.
(Tue, 10 Apr 2018 16:23:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 31114 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Yup, we need valgrind as a propagated input for perl-test-runvalgrind.
Attached the whole patch set: 3 perl packages and fortune-mod.
--
Pierre Neidhardt
A pencil with no point needs no eraser.
[0001-gnu-Add-perl-file-readbackwards.patch (text/x-patch, attachment)]
[0002-gnu-Add-perl-io-all.patch (text/x-patch, attachment)]
[0003-gnu-Add-perl-test-runvalgrind.patch (text/x-patch, attachment)]
[0004-gnu-Add-fortune-mod.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31114
; Package
guix-patches
.
(Wed, 18 Apr 2018 20:43:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 31114 <at> debbugs.gnu.org (full text, mbox):
Hello,
Pierre Neidhardt <ambrevar <at> gmail.com> skribis:
> More generally: is there an API reference or is it just the source code?
> Development documentation seems a bit scarce...
The manual contains an API reference for things like (guix store), (guix
derivations), and (guix monads), but it lacks a reference for (guix
build …) modules.
That said, these modules have docstrings and are fairly small, so
hopefully it’s not that bad. ;-)
Ludo’.
Reply sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
You have taken responsibility.
(Thu, 19 Apr 2018 09:57:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Pierre Neidhardt <ambrevar <at> gmail.com>
:
bug acknowledged by developer.
(Thu, 19 Apr 2018 09:57:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 31114-done <at> debbugs.gnu.org (full text, mbox):
Hi Pierre,
I’ve applied it all after fixing trivial issues reported by ‘guix lint’.
I was able to get a few fortune cookies already, so thank you. :-)
Pierre Neidhardt <ambrevar <at> gmail.com> skribis:
> + (native-inputs
> + `(("perl" ,perl)
> + ;; The following is only needed for tests.
> + ("perl-file-find-object" ,perl-file-find-object)
> + ("perl-test-differences" ,perl-test-differences)
> + ("perl-class-xsaccessor" ,perl-class-xsaccessor)
> + ("perl-io-all" ,perl-io-all)
> + ("perl-test-runvalgrind" ,perl-test-runvalgrind)
> + ("cmake-rules"
> + ,(origin
> + (method url-fetch)
> + (uri (string-append "https://bitbucket.org/shlomif/shlomif-cmake-modules/"
> + "raw/default/shlomif-cmake-modules/Shlomif_Common.cmake"))
> + (sha256
> + (base32 "0kx9s1qqhhzprp1w3b67xmsns0n0v506bg5hgrshxaxpy6lqiwb2"))))))
I’m afraid the above URL is referring to the tip of that repository, and
thus that contents may change over time. Could you come up with a
stable URL, i.e., one that includes a commit ID?
TIA!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31114
; Package
guix-patches
.
(Thu, 19 Apr 2018 12:35:01 GMT)
Full text and
rfc822 format available.
Message #40 received at 31114-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:
> Hi Pierre,
>
> I’ve applied it all after fixing trivial issues reported by ‘guix lint’.
> I was able to get a few fortune cookies already, so thank you. :-)
I did run `guix lint` if I'm not mistaken, I don't remember any issue.
What were those?
> Pierre Neidhardt <ambrevar <at> gmail.com> skribis:
>
>> + (native-inputs
>> + `(("perl" ,perl)
>> + ;; The following is only needed for tests.
>> + ("perl-file-find-object" ,perl-file-find-object)
>> + ("perl-test-differences" ,perl-test-differences)
>> + ("perl-class-xsaccessor" ,perl-class-xsaccessor)
>> + ("perl-io-all" ,perl-io-all)
>> + ("perl-test-runvalgrind" ,perl-test-runvalgrind)
>> + ("cmake-rules"
>> + ,(origin
>> + (method url-fetch)
>> + (uri (string-append "https://bitbucket.org/shlomif/shlomif-cmake-modules/"
>> + "raw/default/shlomif-cmake-modules/Shlomif_Common.cmake"))
>> + (sha256
>> + (base32 "0kx9s1qqhhzprp1w3b67xmsns0n0v506bg5hgrshxaxpy6lqiwb2"))))))
>
> I’m afraid the above URL is referring to the tip of that repository, and
> thus that contents may change over time. Could you come up with a
> stable URL, i.e., one that includes a commit ID?
Sure, I think
https://bitbucket.org/shlomif/shlomif-cmake-modules/raw/c505713d7a7cda608f97f01577e5868a711b883e/shlomif-cmake-modules/Shlomif_Common.cmake
should do.
Out of curiosity, why did you close the bug / merge the patch with the
URL issue mentioned above?
--
Pierre Neidhardt
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31114
; Package
guix-patches
.
(Mon, 23 Apr 2018 15:13:01 GMT)
Full text and
rfc822 format available.
Message #43 received at 31114-done <at> debbugs.gnu.org (full text, mbox):
Hello,
Pierre Neidhardt <ambrevar <at> gmail.com> skribis:
> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> Hi Pierre,
>>
>> I’ve applied it all after fixing trivial issues reported by ‘guix lint’.
>> I was able to get a few fortune cookies already, so thank you. :-)
>
> I did run `guix lint` if I'm not mistaken, I don't remember any issue.
> What were those?
I think these were two-spaces-after-end-of-sentence-period in the
synopses/descriptions of the Perl packages, things like that.
>> Pierre Neidhardt <ambrevar <at> gmail.com> skribis:
>>
>>> + (native-inputs
>>> + `(("perl" ,perl)
>>> + ;; The following is only needed for tests.
>>> + ("perl-file-find-object" ,perl-file-find-object)
>>> + ("perl-test-differences" ,perl-test-differences)
>>> + ("perl-class-xsaccessor" ,perl-class-xsaccessor)
>>> + ("perl-io-all" ,perl-io-all)
>>> + ("perl-test-runvalgrind" ,perl-test-runvalgrind)
>>> + ("cmake-rules"
>>> + ,(origin
>>> + (method url-fetch)
>>> + (uri (string-append "https://bitbucket.org/shlomif/shlomif-cmake-modules/"
>>> + "raw/default/shlomif-cmake-modules/Shlomif_Common.cmake"))
>>> + (sha256
>>> + (base32 "0kx9s1qqhhzprp1w3b67xmsns0n0v506bg5hgrshxaxpy6lqiwb2"))))))
>>
>> I’m afraid the above URL is referring to the tip of that repository, and
>> thus that contents may change over time. Could you come up with a
>> stable URL, i.e., one that includes a commit ID?
>
> Sure, I think
>
> https://bitbucket.org/shlomif/shlomif-cmake-modules/raw/c505713d7a7cda608f97f01577e5868a711b883e/shlomif-cmake-modules/Shlomif_Common.cmake
>
> should do.
OK, I made the change.
> Out of curiosity, why did you close the bug / merge the patch with the
> URL issue mentioned above?
I didn’t consider it a showstopper, but I can understand arguments both
ways.
Thank you,
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 22 May 2018 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 32 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.