Archived
1
0
Fork 0

gnu: libnatpmp: Update to 20230423-0.6a850fd.

* gnu/packages/networking.scm (libnatpmp): Update to 20230423-0.6a850fd.
[source]: Fetch from git.
[build-system]: Use cmake-build-system.
[arguments]: Add patch-build-system and fix-version phases.  Reinstate
configure and check phase, but set #:tests? to #f.  New #:configure-flags
argument.
[native-inputs]: Add which.
This commit is contained in:
Maxim Cournoyer 2023-08-20 23:25:37 -04:00
parent 0860b612f2
commit 504b46cd87
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -1414,33 +1414,50 @@ files contain direct mappings of the abstractions provided by the ØMQ C API.")
(license license:expat))) (license license:expat)))
(define-public libnatpmp (define-public libnatpmp
(package ;; Install the latest commit as it provides a pkg-config (.pc) file.
(name "libnatpmp") (let ((base-version "20230423")
(version "20230423") (commit "6a850fd2bd9b08e6edc886382a1dbae2a7df55ec")
(source (origin (revision "0"))
(method url-fetch) (package
(uri (string-append (name "libnatpmp")
"http://miniupnp.free.fr/files/" (version (git-version base-version revision commit))
name "-" version ".tar.gz")) (source (origin
(sha256 (method git-fetch)
(base32 (uri (git-reference
"0w7wvf4yi8qv659dg9d3ndqvh3bqhgm21gd135spwhq6hhnfv106")))) (url "https://github.com/miniupnp/libnatpmp")
(build-system gnu-build-system) (commit commit)))
(arguments (file-name (git-file-name name version))
(list #:phases #~(modify-phases %standard-phases (sha256
(delete 'configure) (base32
(delete 'check)) ; no tests "18hf9a3i3mncl3w80nzi1684iac3by86bv0hgmbm1v2w8gbfjyw0"))))
#:make-flags (build-system cmake-build-system)
#~(list (string-append "CC=" #$(cc-for-target)) (arguments
(string-append "INSTALLPREFIX=" #$output) (list
(string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")))) #:tests? #f ;no test suite
(home-page "https://miniupnp.tuxfamily.org/libnatpmp.html") #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON")
(synopsis "C library implementing NAT-PMP") #:phases
(description #~(modify-phases %standard-phases
"@code{libnatpmp} is a portable and asynchronous implementation of (add-after 'unpack 'patch-build-system
;; Have CMake install the natpmp_declspec.h missing header file
;; that is referenced by natpmp.h (see:
;; https://github.com/miniupnp/libnatpmp/issues/41).
(lambda _
(substitute* "CMakeLists.txt"
(("install\\(FILES natpmp.h")
"install(FILES natpmp.h natpmp_declspec.h"))))
(add-after 'unpack 'fix-version
(lambda _
(with-output-to-file "VERSION"
(lambda ()
(display #$base-version))))))))
(native-inputs (list which))
(home-page "https://miniupnp.tuxfamily.org/libnatpmp.html")
(synopsis "C library implementing NAT-PMP")
(description
"@code{libnatpmp} is a portable and asynchronous implementation of
the Network Address Translation - Port Mapping Protocol (NAT-PMP) the Network Address Translation - Port Mapping Protocol (NAT-PMP)
written in the C programming language.") written in the C programming language.")
(license license:bsd-3))) (license license:bsd-3))))
(define-public librdkafka (define-public librdkafka
(package (package