all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#31114] [PATCH] gnu: Add fortune-mod.
@ 2018-04-09 17:32 Pierre Neidhardt
  2018-04-09 17:39 ` Pierre Neidhardt
  0 siblings, 1 reply; 13+ messages in thread
From: Pierre Neidhardt @ 2018-04-09 17:32 UTC (permalink / raw)
  To: 31114

* 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

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#31114] [PATCH] gnu: Add fortune-mod.
  2018-04-09 17:32 [bug#31114] [PATCH] gnu: Add fortune-mod Pierre Neidhardt
@ 2018-04-09 17:39 ` Pierre Neidhardt
  2018-04-09 20:51   ` Ludovic Courtès
  2018-04-09 20:55   ` Leo Famulari
  0 siblings, 2 replies; 13+ messages in thread
From: Pierre Neidhardt @ 2018-04-09 17:39 UTC (permalink / raw)
  To: 31114

[-- Attachment #1: Type: text/plain, Size: 543 bytes --]


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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#31114] [PATCH] gnu: Add fortune-mod.
  2018-04-09 17:39 ` Pierre Neidhardt
@ 2018-04-09 20:51   ` Ludovic Courtès
  2018-04-10  7:05     ` Pierre Neidhardt
  2018-04-09 20:55   ` Leo Famulari
  1 sibling, 1 reply; 13+ messages in thread
From: Ludovic Courtès @ 2018-04-09 20:51 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 31114

Hi,

Pierre Neidhardt <ambrevar@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’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#31114] [PATCH] gnu: Add fortune-mod.
  2018-04-09 17:39 ` Pierre Neidhardt
  2018-04-09 20:51   ` Ludovic Courtès
@ 2018-04-09 20:55   ` Leo Famulari
  2018-04-10  7:00     ` Pierre Neidhardt
  1 sibling, 1 reply; 13+ messages in thread
From: Leo Famulari @ 2018-04-09 20:55 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 31114

[-- Attachment #1: Type: text/plain, Size: 490 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#31114] [PATCH] gnu: Add fortune-mod.
  2018-04-09 20:55   ` Leo Famulari
@ 2018-04-10  7:00     ` Pierre Neidhardt
  2018-04-18 20:42       ` Ludovic Courtès
  0 siblings, 1 reply; 13+ messages in thread
From: Pierre Neidhardt @ 2018-04-10  7:00 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 31114

[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]


Leo Famulari <leo@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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#31114] [PATCH] gnu: Add fortune-mod.
  2018-04-09 20:51   ` Ludovic Courtès
@ 2018-04-10  7:05     ` Pierre Neidhardt
  2018-04-10  7:24       ` Pierre Neidhardt
  0 siblings, 1 reply; 13+ messages in thread
From: Pierre Neidhardt @ 2018-04-10  7:05 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 31114

[-- Attachment #1: Type: text/plain, Size: 650 bytes --]


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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#31114] [PATCH] gnu: Add fortune-mod.
  2018-04-10  7:05     ` Pierre Neidhardt
@ 2018-04-10  7:24       ` Pierre Neidhardt
  2018-04-10 10:14         ` Ludovic Courtès
  0 siblings, 1 reply; 13+ messages in thread
From: Pierre Neidhardt @ 2018-04-10  7:24 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 31114

[-- Attachment #1: Type: text/plain, Size: 667 bytes --]


Pierre Neidhardt <ambrevar@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!!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#31114] [PATCH] gnu: Add fortune-mod.
  2018-04-10  7:24       ` Pierre Neidhardt
@ 2018-04-10 10:14         ` Ludovic Courtès
  2018-04-10 16:22           ` Pierre Neidhardt
  0 siblings, 1 reply; 13+ messages in thread
From: Ludovic Courtès @ 2018-04-10 10:14 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 31114

Pierre Neidhardt <ambrevar@gmail.com> skribis:

> Pierre Neidhardt <ambrevar@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’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#31114] [PATCH] gnu: Add fortune-mod.
  2018-04-10 10:14         ` Ludovic Courtès
@ 2018-04-10 16:22           ` Pierre Neidhardt
  2018-04-19  9:56             ` bug#31114: " Ludovic Courtès
  0 siblings, 1 reply; 13+ messages in thread
From: Pierre Neidhardt @ 2018-04-10 16:22 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 31114


[-- Attachment #1.1: Type: text/plain, Size: 208 bytes --]


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.

[-- Attachment #1.2: 0001-gnu-Add-perl-file-readbackwards.patch --]
[-- Type: text/x-patch, Size: 2249 bytes --]

From 2314e654a55ce7cecfeeb4410e92a7490f4128f3 Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <ambrevar@gmail.com>
Date: Tue, 10 Apr 2018 21:00:08 +0530
Subject: [PATCH 1/4] gnu: Add perl-file-readbackwards.

* gnu/packages/perl.scm (perl-file-readbackwards): New variable.
---
 gnu/packages/perl.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 50273d31e..e1d029c38 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -19,6 +19,7 @@
 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2017 Christopher Allan Webber <cwebber@dustycloud.org>
 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2018 Pierre Neidhardt <ambrevar@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3501,6 +3502,35 @@ provided base directory and can return files (and/or directories if desired)
 matching a regular expression.")
     (home-page "http://search.cpan.org/~dopacki/File-List//")))
 
+(define-public perl-file-readbackwards
+  (package
+    (name "perl-file-readbackwards")
+    (version "1.05")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://cpan/authors/id/U/UR/URI/File-ReadBackwards-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0vldy5q0zyf1cwzwb1gv14f8vg2f21bw96b8wvkw6z2hhypn3cl2"))))
+    (build-system perl-build-system)
+    (home-page
+     "http://search.cpan.org/dist/File-ReadBackwards/")
+    (synopsis "Read a file backwards by lines")
+    (description "This module reads a file backwards line by line. It is
+simple to use, memory efficient and fast. It supports both an object and a
+tied handle interface.
+
+It is intended for processing log and other similar text files which
+typically have their newest entries appended to them. By default files
+are assumed to be plain text and have a line ending appropriate to the
+OS. But you can set the input record separator string on a per file
+basis.")
+    (license #f)))
+
 (define-public perl-file-remove
   (package
     (name "perl-file-remove")
-- 
2.16.3


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 0002-gnu-Add-perl-io-all.patch --]
[-- Type: text/x-patch, Size: 2100 bytes --]

From e819b9532883aaf168a2fcc74daa40341dcf8afb Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <ambrevar@gmail.com>
Date: Tue, 10 Apr 2018 21:01:09 +0530
Subject: [PATCH 2/4] gnu: Add perl-io-all.

* gnu/packages/perl.scm (perl-io-all): New variable.
---
 gnu/packages/perl.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index e1d029c38..4bef99dce 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -46,6 +46,7 @@
   #:use-module (guix build-system perl)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages perl-check)
   #:use-module (gnu packages perl-web)
   #:use-module (gnu packages pkg-config))
@@ -4086,6 +4087,32 @@ This document describes how to use Inline with the C programming language.
 It also goes a bit into Perl C internals.")
     (license (package-license perl))))
 
+(define-public perl-io-all
+  (package
+    (name "perl-io-all")
+    (version "0.87")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://cpan/authors/id/F/FR/FREW/IO-All-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0nsd9knlbd7if2v6zwj4q978axq0w5hk8ymp61z14a821hjivqjl"))))
+    (build-system perl-build-system)
+    (propagated-inputs
+     `(("perl-file-mimeinfo" ,perl-file-mimeinfo)
+       ("perl-file-readbackwards" ,perl-file-readbackwards)))
+    (home-page "http://search.cpan.org/dist/IO-All/")
+    (synopsis "IO::All to Larry Wall!")
+    (description "IO::All combines all of the best Perl IO modules into a
+single nifty object oriented interface to greatly simplify your everyday Perl
+IO idioms. It exports a single function called io, which returns a new IO::All
+object. And that object can do it all!")
+    (license perl-license)))
+
 (define-public perl-io-captureoutput
   (package
     (name "perl-io-captureoutput")
-- 
2.16.3


[-- Attachment #1.4: 0003-gnu-Add-perl-test-runvalgrind.patch --]
[-- Type: text/x-patch, Size: 2401 bytes --]

From a1d5a57a4e55f7aca4033844ff764aa2a0069bf9 Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <ambrevar@gmail.com>
Date: Tue, 10 Apr 2018 21:01:44 +0530
Subject: [PATCH 3/4] gnu: Add perl-test-runvalgrind

* gnu/packages/perl-check.scm (perl-test-runvalgrind): New variable.
---
 gnu/packages/perl-check.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/perl-check.scm b/gnu/packages/perl-check.scm
index 1fd725f65..832efc2b7 100644
--- a/gnu/packages/perl-check.scm
+++ b/gnu/packages/perl-check.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2017 Petter <petter@mykolab.ch>
 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2018 Pierre Neidhardt <ambrevar@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -31,6 +32,7 @@
 (define-module (gnu packages perl-check)
   #:use-module (guix licenses)
   #:use-module (gnu packages)
+  #:use-module (gnu packages valgrind)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system perl)
@@ -1001,6 +1003,33 @@ reported, and the tests skipped.")
     (description "Test::Roo provides composable, reusable tests with roles.")
     (license asl2.0)))
 
+(define-public perl-test-runvalgrind
+  (package
+    (name "perl-test-runvalgrind")
+    (version "0.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://cpan/authors/id/S/SH/SHLOMIF/Test-RunValgrind-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0cfndkn2k9pcx290wcblwmrwh1ybs0grxjlsrp8fbqqbmmjpb53h"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-module-build" ,perl-module-build)))
+    (propagated-inputs
+     `(("perl-path-tiny" ,perl-path-tiny)
+       ("perl-test-trap" ,perl-test-trap)
+       ("valgrind" ,valgrind)))
+    (home-page "http://search.cpan.org/dist/Test-RunValgrind/")
+    (synopsis "Tests that an external program is valgrind-clean")
+    (description "Test::RunValgind checks weather Valgrind does not detect
+errors (such as memory leaks) in an arbitrary binary executable.")
+    (license x11)))
+
 (define-public perl-test-script
   (package
     (name "perl-test-script")
-- 
2.16.3


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.5: 0004-gnu-Add-fortune-mod.patch --]
[-- Type: text/x-patch, Size: 3591 bytes --]

From d4ab7650cae4e4cf3403a5e03bc68cef15e4109a Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <ambrevar@gmail.com>
Date: Mon, 9 Apr 2018 23:01:04 +0530
Subject: [PATCH 4/4] gnu: Add fortune-mod.

* gnu/packages/games.scm (fortune-mod): New variable.
---
 gnu/packages/games.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 5207e08d6..47557a762 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -112,6 +112,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages perl-check)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages pulseaudio)
@@ -4851,3 +4852,56 @@ 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"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:test-target "check"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-build-env
+           (lambda* (#:key inputs #:allow-other-keys)
+             (use-modules (guix build utils))
+             (let* ((cmake-rules (assoc-ref inputs "cmake-rules")))
+               (copy-file cmake-rules
+                          (string-append "fortune-mod/cmake/"
+                                         (strip-store-file-name cmake-rules)))
+               (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)
+       ;; 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"))))))
+    (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+)))
-- 
2.16.3


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#31114] [PATCH] gnu: Add fortune-mod.
  2018-04-10  7:00     ` Pierre Neidhardt
@ 2018-04-18 20:42       ` Ludovic Courtès
  0 siblings, 0 replies; 13+ messages in thread
From: Ludovic Courtès @ 2018-04-18 20:42 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 31114

Hello,

Pierre Neidhardt <ambrevar@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’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#31114: [PATCH] gnu: Add fortune-mod.
  2018-04-10 16:22           ` Pierre Neidhardt
@ 2018-04-19  9:56             ` Ludovic Courtès
  2018-04-19 12:34               ` [bug#31114] " Pierre Neidhardt
  0 siblings, 1 reply; 13+ messages in thread
From: Ludovic Courtès @ 2018-04-19  9:56 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 31114-done

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@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’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#31114] [PATCH] gnu: Add fortune-mod.
  2018-04-19  9:56             ` bug#31114: " Ludovic Courtès
@ 2018-04-19 12:34               ` Pierre Neidhardt
  2018-04-23 15:12                 ` Ludovic Courtès
  0 siblings, 1 reply; 13+ messages in thread
From: Pierre Neidhardt @ 2018-04-19 12:34 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 31114-done

[-- Attachment #1: Type: text/plain, Size: 1638 bytes --]


Ludovic Courtès <ludo@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@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#31114] [PATCH] gnu: Add fortune-mod.
  2018-04-19 12:34               ` [bug#31114] " Pierre Neidhardt
@ 2018-04-23 15:12                 ` Ludovic Courtès
  0 siblings, 0 replies; 13+ messages in thread
From: Ludovic Courtès @ 2018-04-23 15:12 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 31114-done

Hello,

Pierre Neidhardt <ambrevar@gmail.com> skribis:

> Ludovic Courtès <ludo@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@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’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-04-23 15:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-09 17:32 [bug#31114] [PATCH] gnu: Add fortune-mod Pierre Neidhardt
2018-04-09 17:39 ` Pierre Neidhardt
2018-04-09 20:51   ` Ludovic Courtès
2018-04-10  7:05     ` Pierre Neidhardt
2018-04-10  7:24       ` Pierre Neidhardt
2018-04-10 10:14         ` Ludovic Courtès
2018-04-10 16:22           ` Pierre Neidhardt
2018-04-19  9:56             ` bug#31114: " Ludovic Courtès
2018-04-19 12:34               ` [bug#31114] " Pierre Neidhardt
2018-04-23 15:12                 ` Ludovic Courtès
2018-04-09 20:55   ` Leo Famulari
2018-04-10  7:00     ` Pierre Neidhardt
2018-04-18 20:42       ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.