nixpkgs/pkgs/by-name/k2/k2pdfopt/0001-Fix-CMakeLists.patch
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

38 lines
1.1 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 365b835..4341de9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,6 +57,7 @@ endif(JPEG_FOUND)
include(FindJasper)
if(JASPER_FOUND)
set(HAVE_JASPER_LIB 1)
+ set(K2PDFOPT_LIB ${K2PDFOPT_LIB} ${JASPER_LIBRARY})
endif(JASPER_FOUND)
# paths from willuslib/wgs.c
@@ -71,9 +72,12 @@ else()
message(STATUS "Could NOT find ghostscript executable")
endif(GHOSTSCRIPT_EXECUTABLE)
-# willus.h
-# HAVE_GSL_LIB
-
+pkg_check_modules(GSL gsl)
+if(GSL_FOUND)
+ set(HAVE_GSL_LIB 1)
+ include_directories(SYSTEM ${GSL_INCLUDEDIR})
+ set(K2PDFOPT_LIB ${K2PDFOPT_LIB} ${GSL_LDFLAGS})
+endif(GSL_FOUND)
# libfreetype6 (>= 2.3.9), libjbig2dec0, libjpeg8 (>= 8c), libx11-6, libxext6, zlib1g (>= 1:1.2.0)
# MUPDF_STATIC_LDFLAGS misses mupdf-js-none, and doubles libs ...
@@ -85,7 +89,7 @@ if(MUPDF_FOUND)
include_directories(SYSTEM ${MUPDF_INCLUDEDIR})
message(STATUS "mupdf libraries: ${MUPDF_LDFLAGS}")
set(K2PDFOPT_LIB ${K2PDFOPT_LIB} ${MUPDF_LDFLAGS}
- -lmupdf-js-none -lopenjpeg -ljbig2dec -ljpeg -lfreetype -llcms -lgumbo
+
)
endif(MUPDF_FOUND)