gnu: ola: Build with libmicrohttpd 0.9.71.

* gnu/packages/lighting.scm (ola)[source]: Update to 0.10.7-0.5d88293.
[source]: Use GIT-FETCH & GIT-FILE-NAME.  Remove patch.
[native-inputs]: Add autoconf, automake, and libtool.
* gnu/packages/patches/ola-readdir-r.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Remove it.
This commit is contained in:
Tobias Geerinckx-Rice 2020-08-16 12:08:37 +02:00
parent f27a7e4156
commit 784e7d7ae9
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79
3 changed files with 49 additions and 102 deletions

View file

@ -1355,7 +1355,6 @@ dist_patch_DATA = \
%D%/packages/patches/ocaml-dose3-dont-make-printconf.patch \ %D%/packages/patches/ocaml-dose3-dont-make-printconf.patch \
%D%/packages/patches/ocaml-dose3-Install-mli-cmx-etc.patch \ %D%/packages/patches/ocaml-dose3-Install-mli-cmx-etc.patch \
%D%/packages/patches/omake-fix-non-determinism.patch \ %D%/packages/patches/omake-fix-non-determinism.patch \
%D%/packages/patches/ola-readdir-r.patch \
%D%/packages/patches/openbabel-fix-crash-on-nwchem-output.patch \ %D%/packages/patches/openbabel-fix-crash-on-nwchem-output.patch \
%D%/packages/patches/opencascade-oce-glibc-2.26.patch \ %D%/packages/patches/opencascade-oce-glibc-2.26.patch \
%D%/packages/patches/opencv-fix-build-of-grfmt_jpeg2000.cpp.patch \ %D%/packages/patches/opencv-fix-build-of-grfmt_jpeg2000.cpp.patch \

View file

@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 John J. Foerch <jjfoerch@earthlink.net> ;;; Copyright © 2016 John J. Foerch <jjfoerch@earthlink.net>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -19,10 +19,11 @@
(define-module (gnu packages lighting) (define-module (gnu packages lighting)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (guix download) #:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages bison) #:use-module (gnu packages bison)
#:use-module (gnu packages check) #:use-module (gnu packages check)
#:use-module (gnu packages compression) #:use-module (gnu packages compression)
@ -35,46 +36,55 @@ (define-module (gnu packages lighting)
#:use-module (gnu packages protobuf)) #:use-module (gnu packages protobuf))
(define-public ola (define-public ola
(package ;; Use a commit that allows building with libmicrohttpd 0.9.71.
(name "ola") ;; https://github.com/OpenLightingProject/ola/pull/1651
(version "0.10.7") (let ((commit "5d882936436240b312b3836afd199587beaca840")
(source (origin (revision "0"))
(method url-fetch) (package
(uri (string-append (name "ola")
"https://github.com/OpenLightingProject/ola/releases/download/" (version (git-version "0.10.7" revision commit))
version "/ola-" version ".tar.gz")) (source
(patches (search-patches "ola-readdir-r.patch")) (origin
(sha256 (method git-fetch)
(base32 (uri (git-reference
"181imc9qkjm2m1iwrb5ixsckx893nc6qwjfzacsjlqp0jlnj8rca")))) (url "https://github.com/OpenLightingProject/ola")
(build-system gnu-build-system) (commit commit)))
(native-inputs (sha256
`(("bison" ,bison) (base32 "1bhl3gvmvmnyrygfj13cibf2xirm285m8abjkaxq22hrqbsvab2m"))
("cppunit" ,cppunit) (file-name (git-file-name name version))))
("flex" ,flex) (build-system gnu-build-system)
("pkg-config" ,pkg-config))) (native-inputs
(inputs `(("bison" ,bison)
`(("libftdi" ,libftdi) ("cppunit" ,cppunit)
("libmicrohttpd" ,libmicrohttpd) ("flex" ,flex)
("libusb" ,libusb) ("pkg-config" ,pkg-config)
("libuuid" ,util-linux "lib")
("zlib" ,zlib))) ;; For git repository bootstrapping.
(propagated-inputs ("autoconf" ,autoconf)
;; Ola 0.10.5 only supports protobuf 2.x, and building it with 3.x breaks. ("automake" ,automake)
;; XXX Remove protobuf-2 when it is no longer needed. ("libtool" ,libtool)))
`(("protobuf" ,protobuf-2))) ;; for pkg-config --libs libola (inputs
(arguments `(("libftdi" ,libftdi)
`(;; G++ >= 4.8 macro expansion tracking requires lots of memory, causing ("libmicrohttpd" ,libmicrohttpd)
;; build to fail on low memory systems. We disable that with the ("libusb" ,libusb)
;; following configure flags. ("libuuid" ,util-linux "lib")
#:configure-flags (list "CXXFLAGS=-ftrack-macro-expansion=0"))) ("zlib" ,zlib)))
(synopsis "Framework for controlling entertainment lighting equipment") (propagated-inputs
(description "The Open Lighting Architecture is a framework for lighting ;; Ola 0.10.5 only supports protobuf 2.x, and building it with 3.x breaks.
;; XXX Remove protobuf-2 when it is no longer needed.
`(("protobuf" ,protobuf-2))) ;; for pkg-config --libs libola
(arguments
`( ;; G++ >= 4.8 macro expansion tracking requires lots of memory, causing
;; build to fail on low memory systems. We disable that with the
;; following configure flags.
#:configure-flags (list "CXXFLAGS=-ftrack-macro-expansion=0")))
(synopsis "Framework for controlling entertainment lighting equipment")
(description "The Open Lighting Architecture is a framework for lighting
control information. It supports a range of protocols and over a dozen USB control information. It supports a range of protocols and over a dozen USB
devices. It can run as a standalone service, which is useful for converting devices. It can run as a standalone service, which is useful for converting
signals between protocols, or alternatively using the OLA API, it can be used signals between protocols, or alternatively using the OLA API, it can be used
as the backend for lighting control software. OLA runs on many different as the backend for lighting control software. OLA runs on many different
platforms including ARM, which makes it a perfect fit for low cost Ethernet to platforms including ARM, which makes it a perfect fit for low cost Ethernet to
DMX gateways.") DMX gateways.")
(home-page "https://www.openlighting.org/ola") (home-page "https://www.openlighting.org/ola")
(license license:lgpl2.1+))) (license license:lgpl2.1+))))

View file

@ -1,62 +0,0 @@
Fix build failure caused by use of the deprecated readdir_r(3) while
building with -Werror=deprecated-declarations
Patch copied from upstream source repository:
https://github.com/daveol/ola/commit/9d8575ff38f76df698ea8889e07a3dee8f21bd68
From 9d8575ff38f76df698ea8889e07a3dee8f21bd68 Mon Sep 17 00:00:00 2001
From: Dave Olsthoorn <dave.olsthoorn@gmail.com>
Date: Wed, 2 Mar 2016 11:22:17 +0100
Subject: [PATCH] Use readdir instead of readdir_r
This replacec the use of readdir_r with readdir since readdir seems to
be both dangarous and deprecated in newer versions of glibc.
This fixes #1055
---
common/file/Util.cpp | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/common/file/Util.cpp b/common/file/Util.cpp
index e2261fd..0ffddd3 100644
--- a/common/file/Util.cpp
+++ b/common/file/Util.cpp
@@ -128,30 +128,29 @@ bool FindMatchingFiles(const string &directory,
FindClose(h_find);
#else
DIR *dp;
- struct dirent dir_ent;
- struct dirent *dir_ent_p;
+ struct dirent *dir_ent;
if ((dp = opendir(directory.data())) == NULL) {
OLA_WARN << "Could not open " << directory << ":" << strerror(errno);
return false;
}
- if (readdir_r(dp, &dir_ent, &dir_ent_p)) {
- OLA_WARN << "readdir_r(" << directory << "): " << strerror(errno);
+ if ((dir_ent = readdir(dp)) == NULL) {
+ OLA_WARN << "readdir(" << directory << "): " << strerror(errno);
closedir(dp);
return false;
}
- while (dir_ent_p != NULL) {
+ while (dir_ent != NULL) {
vector<string>::const_iterator iter;
for (iter = prefixes.begin(); iter != prefixes.end(); ++iter) {
- if (!strncmp(dir_ent_p->d_name, iter->data(), iter->size())) {
+ if (!strncmp(dir_ent->d_name, iter->data(), iter->size())) {
std::ostringstream str;
- str << directory << PATH_SEPARATOR << dir_ent_p->d_name;
+ str << directory << PATH_SEPARATOR << dir_ent->d_name;
files->push_back(str.str());
}
}
- if (readdir_r(dp, &dir_ent, &dir_ent_p)) {
- OLA_WARN << "readdir_r(" << directory << "): " << strerror(errno);
+ if ((dir_ent = readdir(dp)) == NULL) {
+ OLA_WARN << "readdir(" << directory << "): " << strerror(errno);
closedir(dp);
return false;
}