Add partial support to use system libraries instead of ones downloaded and built off the network#84
Open
apteryks wants to merge 5 commits into
Open
Add partial support to use system libraries instead of ones downloaded and built off the network#84apteryks wants to merge 5 commits into
apteryks wants to merge 5 commits into
Conversation
added 5 commits
May 31, 2026 14:41
Not all libraries are exposed yet; I've added only those I could test with (via Guix). To use, set -DUSE_SYSTEM_LIBRARIES=ON or the library individual switches, e.g. -DUSE_SYSTEM_ZLIB=ON. Fixes: agruzdev#26
Use the public API to retrieve the version information instead.
Use the 'unknown' type for the os code instead, for portability.
* CMakeLists.txt (FREEIMAGE_WITH_LIBJPEG_TRANSFORMS): New option. * Source/CMakeLists.txt [FREEIMAGE_WITH_LIBJPEG_TRANSFORMS]: Add accompanying CPP macro definition. * Source/FreeImageToolkit/JPEGTransform.cpp: Add CPP conditionals to disable problematic code.
Author
|
I successfully built the package with this change using the following Guix package definition: (define-public freeimagere
(package
(name "freeimagere")
(version "4.2.0")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/agruzdev/FreeImageRe")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"17xl5y0zsg16i4ym6dgdlwyf3wa1warf45c84fgjpc9nx847k0ii"))
(modules '((guix build utils)))
(snippet '(delete-file-recursively "3rdParty"))))
(build-system cmake-build-system)
;; The libjxr support depends on the bundled 3rdParty/LibJXR source.
(arguments
(list
#:tests? #f ;also disabled upstream
#:cmake cmake-minimal-4
#:configure-flags
#~(list
"-DUSE_SYSTEM_LIBS=ON"
"-DFREEIMAGE_WITH_LIBJXR=OFF" ;relies on bundled 3rdParty
"-DFREEIMAGE_WITH_LIBOPENJPEG=OFF" ;not packaged
"-DFREEIMAGE_WITH_LIBJPEGXL=OFF" ;not packaged
"-DFREEIMAGE_WITH_LIBJPEG_TRANSFORMS=OFF" ;requires private headers
"-DFREEIMAGE_WITH_LIBTIFF=OFF"))) ;requires private headers
(native-inputs (list pkg-config))
(inputs
(list libheif
libjpeg-turbo
libpng
libraw
libwebp
openexr
openjph
yato
zlib))
(home-page "https://github.com/agruzdev/FreeImageRe")
(synopsis "Library for handling popular graphics image formats")
(description "FreeImage Re(surrected) is a fork of FreeImage, a library
that supports popular graphics image formats like PNG, BMP, JPEG, TIFF and
others.")
(license (list license:gpl2+ license:gpl3+))))This is with the following dependencies from Guix: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
This was motivated because I wanted to try to build Ogre with this, and to package something in Guix, it needs to be able to build in an isolated container (no internet). We also prefer to use (shared) system libraries, to save on build time and centralize maintenance.
I expect that to be useful to other distributions as well!