diff --git a/sources/libs/libjpeg-turbo-static/debian/changelog b/sources/libs/libjpeg-turbo-static/debian/changelog new file mode 100644 index 0000000..d958b45 --- /dev/null +++ b/sources/libs/libjpeg-turbo-static/debian/changelog @@ -0,0 +1,5 @@ +libjpeg-turbo-static (5:2.1.5-1kxstudio1) focal; urgency=medium + + * Initial package + + -- falkTX Sat, 25 Oct 2025 19:55:03 +0200 diff --git a/sources/libs/libjpeg-turbo-static/debian/control b/sources/libs/libjpeg-turbo-static/debian/control new file mode 100644 index 0000000..87014ee --- /dev/null +++ b/sources/libs/libjpeg-turbo-static/debian/control @@ -0,0 +1,24 @@ +Source: libjpeg-turbo-static +Section: devel +Priority: optional +Maintainer: falkTX +Build-Depends: debhelper-compat (= 13), + kxstudio-build-scripts (>= 5), + cmake, + nasm +Standards-Version: 4.5.0 +Homepage: https://www.libjpeg-turbo.org/ +Rules-Requires-Root: no + +Package: libjpeg-turbo-static +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: libjpeg-turbo JPEG library (static) + The libjpeg-turbo JPEG library is a library for handling JPEG files. + . + libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, + SSE2, NEON) to accelerate baseline JPEG compression and decompression + on x86, x86-64, and ARM systems. The libjpeg-turbo JPEG library is + an API/ABI compatible with the IJG JPEG library. + . + This package provides the static library used in KXStudio builds. diff --git a/sources/libs/libjpeg-turbo-static/debian/patches/0001_initialize-simd-support-before-every-use.patch b/sources/libs/libjpeg-turbo-static/debian/patches/0001_initialize-simd-support-before-every-use.patch new file mode 100644 index 0000000..ef5d544 --- /dev/null +++ b/sources/libs/libjpeg-turbo-static/debian/patches/0001_initialize-simd-support-before-every-use.patch @@ -0,0 +1,438 @@ +From d743a2c12e889f7605a56f5144ae2e3899c9dd4f Mon Sep 17 00:00:00 2001 +From: DRC +Date: Thu, 2 Feb 2023 08:55:37 -0600 +Subject: [PATCH] SIMD/x86: Initialize simd_support before every use + +As long as a libjpeg instance is only used by one thread at a time, a +program is technically within its rights to call jpeg_start_*compress() +in one thread and jpeg_(read|write)_*(), with the same libjpeg instance, +in a second thread. However, because the various jsimd_can*() functions +are called within the body of jpeg_start_*compress() and simd_support is +now thread-local (due to f579cc11b33e5bfeb9931e37cc74b4a33c95d2e6), that +led to a situation in which simd_support was initialized in the first +thread but not the second. The uninitialized value of simd_support is +0xFFFFFFFF, which the second thread interpreted to mean that it could +use any instruction set, and when it attempted to use AVX2 instructions +on a CPU that didn't support them, an illegal instruction error +occurred. + +This issue was known to affect libvips. + +This commit modifies the i386 and x86-64 SIMD dispatchers so that the +various jsimd_*() functions always call init_simd(), if simd_support is +uninitialized, prior to dispatching based on the value of simd_support. +Note that the other SIMD dispatchers don't need this, because only the +x86 SIMD extensions currently support multiple instruction sets. + +This patch has been verified to be performance-neutral to within ++/- 0.4% with 32-bit and 64-bit code running on a 2.8 GHz Intel Xeon +W3530 and a 3.6 GHz Intel Xeon W2123. + +Fixes #649 +--- + simd/i386/jsimd.c | 71 ++++++++++++++++++++++++++++++++++++++++++++- + simd/x86_64/jsimd.c | 47 +++++++++++++++++++++++++++++- + 2 files changed, 116 insertions(+), 2 deletions(-) + +--- a/simd/i386/jsimd.c ++++ b/simd/i386/jsimd.c +@@ -2,7 +2,7 @@ + * jsimd_i386.c + * + * Copyright 2009 Pierre Ossman for Cendio AB +- * Copyright (C) 2009-2011, 2013-2014, 2016, 2018, 2022, D. R. Commander. ++ * Copyright (C) 2009-2011, 2013-2014, 2016, 2018, 2022-2023, D. R. Commander. + * Copyright (C) 2015-2016, 2018, 2022, Matthieu Darbois. + * + * Based on the x86 SIMD extension for IJG JPEG library, +@@ -158,6 +158,9 @@ + void (*sse2fct) (JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); + void (*mmxfct) (JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); + ++ if (simd_support == ~0U) ++ init_simd(); ++ + switch (cinfo->in_color_space) { + case JCS_EXT_RGB: + avx2fct = jsimd_extrgb_ycc_convert_avx2; +@@ -217,6 +220,9 @@ + void (*sse2fct) (JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); + void (*mmxfct) (JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); + ++ if (simd_support == ~0U) ++ init_simd(); ++ + switch (cinfo->in_color_space) { + case JCS_EXT_RGB: + avx2fct = jsimd_extrgb_gray_convert_avx2; +@@ -276,6 +282,9 @@ + void (*sse2fct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int); + void (*mmxfct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int); + ++ if (simd_support == ~0U) ++ init_simd(); ++ + switch (cinfo->out_color_space) { + case JCS_EXT_RGB: + avx2fct = jsimd_ycc_extrgb_convert_avx2; +@@ -379,6 +388,9 @@ + jsimd_h2v2_downsample(j_compress_ptr cinfo, jpeg_component_info *compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_h2v2_downsample_avx2(cinfo->image_width, cinfo->max_v_samp_factor, + compptr->v_samp_factor, +@@ -399,6 +411,9 @@ + jsimd_h2v1_downsample(j_compress_ptr cinfo, jpeg_component_info *compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_h2v1_downsample_avx2(cinfo->image_width, cinfo->max_v_samp_factor, + compptr->v_samp_factor, +@@ -461,6 +476,9 @@ + jsimd_h2v2_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr, + JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_h2v2_upsample_avx2(cinfo->max_v_samp_factor, cinfo->output_width, + input_data, output_data_ptr); +@@ -476,6 +494,9 @@ + jsimd_h2v1_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr, + JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_h2v1_upsample_avx2(cinfo->max_v_samp_factor, cinfo->output_width, + input_data, output_data_ptr); +@@ -537,6 +558,9 @@ + jsimd_h2v2_fancy_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr, + JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_h2v2_fancy_upsample_avx2(cinfo->max_v_samp_factor, + compptr->downsampled_width, input_data, +@@ -555,6 +579,9 @@ + jsimd_h2v1_fancy_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr, + JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_h2v1_fancy_upsample_avx2(cinfo->max_v_samp_factor, + compptr->downsampled_width, input_data, +@@ -623,6 +650,9 @@ + void (*sse2fct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY); + void (*mmxfct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY); + ++ if (simd_support == ~0U) ++ init_simd(); ++ + switch (cinfo->out_color_space) { + case JCS_EXT_RGB: + avx2fct = jsimd_h2v2_extrgb_merged_upsample_avx2; +@@ -681,6 +711,9 @@ + void (*sse2fct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY); + void (*mmxfct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY); + ++ if (simd_support == ~0U) ++ init_simd(); ++ + switch (cinfo->out_color_space) { + case JCS_EXT_RGB: + avx2fct = jsimd_h2v1_extrgb_merged_upsample_avx2; +@@ -785,6 +818,9 @@ + jsimd_convsamp(JSAMPARRAY sample_data, JDIMENSION start_col, + DCTELEM *workspace) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_convsamp_avx2(sample_data, start_col, workspace); + else if (simd_support & JSIMD_SSE2) +@@ -797,6 +833,9 @@ + jsimd_convsamp_float(JSAMPARRAY sample_data, JDIMENSION start_col, + FAST_FLOAT *workspace) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_SSE2) + jsimd_convsamp_float_sse2(sample_data, start_col, workspace); + else if (simd_support & JSIMD_SSE) +@@ -867,6 +906,9 @@ + GLOBAL(void) + jsimd_fdct_islow(DCTELEM *data) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_fdct_islow_avx2(data); + else if (simd_support & JSIMD_SSE2) +@@ -878,6 +920,9 @@ + GLOBAL(void) + jsimd_fdct_ifast(DCTELEM *data) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if ((simd_support & JSIMD_SSE2) && IS_ALIGNED_SSE(jconst_fdct_islow_sse2)) + jsimd_fdct_ifast_sse2(data); + else +@@ -887,6 +932,9 @@ + GLOBAL(void) + jsimd_fdct_float(FAST_FLOAT *data) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if ((simd_support & JSIMD_SSE) && IS_ALIGNED_SSE(jconst_fdct_float_sse)) + jsimd_fdct_float_sse(data); + else if (simd_support & JSIMD_3DNOW) +@@ -942,6 +990,9 @@ + GLOBAL(void) + jsimd_quantize(JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_quantize_avx2(coef_block, divisors, workspace); + else if (simd_support & JSIMD_SSE2) +@@ -954,6 +1005,9 @@ + jsimd_quantize_float(JCOEFPTR coef_block, FAST_FLOAT *divisors, + FAST_FLOAT *workspace) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_SSE2) + jsimd_quantize_float_sse2(coef_block, divisors, workspace); + else if (simd_support & JSIMD_SSE) +@@ -1017,6 +1071,9 @@ + JCOEFPTR coef_block, JSAMPARRAY output_buf, + JDIMENSION output_col) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if ((simd_support & JSIMD_SSE2) && IS_ALIGNED_SSE(jconst_idct_red_sse2)) + jsimd_idct_2x2_sse2(compptr->dct_table, coef_block, output_buf, + output_col); +@@ -1029,6 +1086,9 @@ + JCOEFPTR coef_block, JSAMPARRAY output_buf, + JDIMENSION output_col) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if ((simd_support & JSIMD_SSE2) && IS_ALIGNED_SSE(jconst_idct_red_sse2)) + jsimd_idct_4x4_sse2(compptr->dct_table, coef_block, output_buf, + output_col); +@@ -1123,6 +1183,9 @@ + JCOEFPTR coef_block, JSAMPARRAY output_buf, + JDIMENSION output_col) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_idct_islow_avx2(compptr->dct_table, coef_block, output_buf, + output_col); +@@ -1139,6 +1202,9 @@ + JCOEFPTR coef_block, JSAMPARRAY output_buf, + JDIMENSION output_col) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if ((simd_support & JSIMD_SSE2) && IS_ALIGNED_SSE(jconst_idct_ifast_sse2)) + jsimd_idct_ifast_sse2(compptr->dct_table, coef_block, output_buf, + output_col); +@@ -1152,6 +1218,9 @@ + JCOEFPTR coef_block, JSAMPARRAY output_buf, + JDIMENSION output_col) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if ((simd_support & JSIMD_SSE2) && IS_ALIGNED_SSE(jconst_idct_float_sse2)) + jsimd_idct_float_sse2(compptr->dct_table, coef_block, output_buf, + output_col); +--- a/simd/x86_64/jsimd.c ++++ b/simd/x86_64/jsimd.c +@@ -2,7 +2,7 @@ + * jsimd_x86_64.c + * + * Copyright 2009 Pierre Ossman for Cendio AB +- * Copyright (C) 2009-2011, 2014, 2016, 2018, 2022, D. R. Commander. ++ * Copyright (C) 2009-2011, 2014, 2016, 2018, 2022-2023, D. R. Commander. + * Copyright (C) 2015-2016, 2018, 2022, Matthieu Darbois. + * + * Based on the x86 SIMD extension for IJG JPEG library, +@@ -145,6 +145,9 @@ + void (*avx2fct) (JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); + void (*sse2fct) (JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); + ++ if (simd_support == ~0U) ++ init_simd(); ++ + switch (cinfo->in_color_space) { + case JCS_EXT_RGB: + avx2fct = jsimd_extrgb_ycc_convert_avx2; +@@ -194,6 +197,9 @@ + void (*avx2fct) (JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); + void (*sse2fct) (JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); + ++ if (simd_support == ~0U) ++ init_simd(); ++ + switch (cinfo->in_color_space) { + case JCS_EXT_RGB: + avx2fct = jsimd_extrgb_gray_convert_avx2; +@@ -243,6 +249,9 @@ + void (*avx2fct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int); + void (*sse2fct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int); + ++ if (simd_support == ~0U) ++ init_simd(); ++ + switch (cinfo->out_color_space) { + case JCS_EXT_RGB: + avx2fct = jsimd_ycc_extrgb_convert_avx2; +@@ -333,6 +342,9 @@ + jsimd_h2v2_downsample(j_compress_ptr cinfo, jpeg_component_info *compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_h2v2_downsample_avx2(cinfo->image_width, cinfo->max_v_samp_factor, + compptr->v_samp_factor, +@@ -349,6 +361,9 @@ + jsimd_h2v1_downsample(j_compress_ptr cinfo, jpeg_component_info *compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_h2v1_downsample_avx2(cinfo->image_width, cinfo->max_v_samp_factor, + compptr->v_samp_factor, +@@ -403,6 +418,9 @@ + jsimd_h2v2_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr, + JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_h2v2_upsample_avx2(cinfo->max_v_samp_factor, cinfo->output_width, + input_data, output_data_ptr); +@@ -415,6 +433,9 @@ + jsimd_h2v1_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr, + JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_h2v1_upsample_avx2(cinfo->max_v_samp_factor, cinfo->output_width, + input_data, output_data_ptr); +@@ -469,6 +490,9 @@ + jsimd_h2v2_fancy_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr, + JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_h2v2_fancy_upsample_avx2(cinfo->max_v_samp_factor, + compptr->downsampled_width, input_data, +@@ -483,6 +507,9 @@ + jsimd_h2v1_fancy_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr, + JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_h2v1_fancy_upsample_avx2(cinfo->max_v_samp_factor, + compptr->downsampled_width, input_data, +@@ -542,6 +569,9 @@ + void (*avx2fct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY); + void (*sse2fct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY); + ++ if (simd_support == ~0U) ++ init_simd(); ++ + switch (cinfo->out_color_space) { + case JCS_EXT_RGB: + avx2fct = jsimd_h2v2_extrgb_merged_upsample_avx2; +@@ -590,6 +620,9 @@ + void (*avx2fct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY); + void (*sse2fct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY); + ++ if (simd_support == ~0U) ++ init_simd(); ++ + switch (cinfo->out_color_space) { + case JCS_EXT_RGB: + avx2fct = jsimd_h2v1_extrgb_merged_upsample_avx2; +@@ -679,6 +712,9 @@ + jsimd_convsamp(JSAMPARRAY sample_data, JDIMENSION start_col, + DCTELEM *workspace) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_convsamp_avx2(sample_data, start_col, workspace); + else +@@ -748,6 +784,9 @@ + GLOBAL(void) + jsimd_fdct_islow(DCTELEM *data) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_fdct_islow_avx2(data); + else +@@ -809,6 +848,9 @@ + GLOBAL(void) + jsimd_quantize(JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_quantize_avx2(coef_block, divisors, workspace); + else +@@ -963,6 +1005,9 @@ + JCOEFPTR coef_block, JSAMPARRAY output_buf, + JDIMENSION output_col) + { ++ if (simd_support == ~0U) ++ init_simd(); ++ + if (simd_support & JSIMD_AVX2) + jsimd_idct_islow_avx2(compptr->dct_table, coef_block, output_buf, + output_col); diff --git a/sources/libs/libjpeg-turbo-static/debian/patches/1001-use-utc-timestamp.patch b/sources/libs/libjpeg-turbo-static/debian/patches/1001-use-utc-timestamp.patch new file mode 100644 index 0000000..d2eff00 --- /dev/null +++ b/sources/libs/libjpeg-turbo-static/debian/patches/1001-use-utc-timestamp.patch @@ -0,0 +1,19 @@ +Author: Vagrant Cascadian +Description: Use UTC timezone for build timestamp + +While CMake respects SOURCE_DATE_EPOCH, it still can produce a +different date depending on the timezone of the running system. + +Specify timezone in UTC to enable a reproducible build. + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -49,7 +49,7 @@ + set(GENERATOR_IS_MULTI_CONFIG TRUE) + endif() + +-string(TIMESTAMP DEFAULT_BUILD "%Y%m%d") ++string(TIMESTAMP DEFAULT_BUILD "%Y%m%d" UTC) + set(BUILD ${DEFAULT_BUILD} CACHE STRING "Build string (default: ${DEFAULT_BUILD})") + + # NOTE: On Windows, this does nothing except when using MinGW or Cygwin. diff --git a/sources/libs/libjpeg-turbo-static/debian/patches/1001_fix-groff-warning-macro-f-not-defined.patch b/sources/libs/libjpeg-turbo-static/debian/patches/1001_fix-groff-warning-macro-f-not-defined.patch new file mode 100644 index 0000000..28acf35 --- /dev/null +++ b/sources/libs/libjpeg-turbo-static/debian/patches/1001_fix-groff-warning-macro-f-not-defined.patch @@ -0,0 +1,14 @@ +Description: Fix lintian issue "W: libjpeg-turbo-progs: groff-message usr/share/man/man1/jpegtran.1.gz (line 1) 170: warning: macro 'f'' not defined" +Author: Mike Gabriel + +--- a/jpegtran.1 ++++ b/jpegtran.1 +@@ -167,7 +167,7 @@ + to the nearest iMCU boundary (the lower right corner is unchanged.) Thus, the + output image covers at least the requested region, but it may cover more. The + adjustment of the region dimensions may be optionally disabled by attaching an +-'f' character ("force") to the width or height number. ++\'f\' character ("force") to the width or height number. + + The image can be losslessly cropped by giving the switch: + .TP diff --git a/sources/libs/libjpeg-turbo-static/debian/patches/2001_dont-set-RPATH.patch b/sources/libs/libjpeg-turbo-static/debian/patches/2001_dont-set-RPATH.patch new file mode 100644 index 0000000..002fb9e --- /dev/null +++ b/sources/libs/libjpeg-turbo-static/debian/patches/2001_dont-set-RPATH.patch @@ -0,0 +1,17 @@ +Description: Don't set rpath in jpeg progs. +Author: Mike Gabriel +Forwarded: (Debian specific) + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -245,10 +245,6 @@ + report_option(ENABLE_SHARED "Shared libraries") + report_option(ENABLE_STATIC "Static libraries") + +-if(ENABLE_SHARED) +- set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}) +-endif() +- + if(WITH_JPEG8 OR WITH_JPEG7) + set(WITH_ARITH_ENC 1) + set(WITH_ARITH_DEC 1) diff --git a/sources/libs/libjpeg-turbo-static/debian/patches/series b/sources/libs/libjpeg-turbo-static/debian/patches/series new file mode 100644 index 0000000..3816cc6 --- /dev/null +++ b/sources/libs/libjpeg-turbo-static/debian/patches/series @@ -0,0 +1,4 @@ +1001-use-utc-timestamp.patch +2001_dont-set-RPATH.patch +1001_fix-groff-warning-macro-f-not-defined.patch +0001_initialize-simd-support-before-every-use.patch diff --git a/sources/libs/libjpeg-turbo-static/debian/rules b/sources/libs/libjpeg-turbo-static/debian/rules new file mode 100755 index 0000000..1cd1e08 --- /dev/null +++ b/sources/libs/libjpeg-turbo-static/debian/rules @@ -0,0 +1,27 @@ +#!/usr/bin/make -f + +KXSTUDIO_NO_FASTMATH = y +include /usr/share/dpkg/kxstudio.mk + +override_dh_auto_configure: + dh_auto_configure -- \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=/opt/kxstudio/lib \ + -DCMAKE_INSTALL_PREFIX=/opt/kxstudio \ + -DBUILD_SHARED_LIBS=OFF \ + -DENABLE_SHARED=OFF \ + -DENABLE_STATIC=ON \ + -DWITH_JAVA=0 \ + -DWITH_SIMD=1 + +override_dh_auto_install: + dh_auto_install + # remove unwanted + rm -r $(CURDIR)/debian/libjpeg-turbo-static/opt/kxstudio/bin + rm -r $(CURDIR)/debian/libjpeg-turbo-static/opt/kxstudio/share + +override_dh_auto_test: + # 1 test fails under armhf + +%: + dh $@ -Scmake diff --git a/sources/libs/libjpeg-turbo-static/debian/source/format b/sources/libs/libjpeg-turbo-static/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/sources/libs/libjpeg-turbo-static/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/sources/libs/libpng-static/debian/changelog b/sources/libs/libpng-static/debian/changelog new file mode 100644 index 0000000..863ab1e --- /dev/null +++ b/sources/libs/libpng-static/debian/changelog @@ -0,0 +1,5 @@ +libpng-static (6:1.6.50-1kxstudio1) focal; urgency=medium + + * Initial package + + -- falkTX Sat, 25 Oct 2025 20:13:26 +0200 diff --git a/sources/libs/libpng-static/debian/control b/sources/libs/libpng-static/debian/control new file mode 100644 index 0000000..615d394 --- /dev/null +++ b/sources/libs/libpng-static/debian/control @@ -0,0 +1,21 @@ +Source: libpng-static +Section: libs +Priority: optional +Maintainer: falkTX +Build-Depends: debhelper-compat (= 13), + kxstudio-build-scripts (>= 5), + autoconf, + automake, + libtool, + pkg-config, + zlib-static +Standards-Version: 3.8.4 + +Package: libpng-static +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, zlib-static +Description: PNG library (static) + libpng is a library implementing an interface for reading and writing + PNG (Portable Network Graphics) format files. + . + This package provides the static library used in KXStudio builds. diff --git a/sources/libs/libpng-static/debian/patches/01_force-build.patch b/sources/libs/libpng-static/debian/patches/01_force-build.patch new file mode 100644 index 0000000..ed25771 --- /dev/null +++ b/sources/libs/libpng-static/debian/patches/01_force-build.patch @@ -0,0 +1,18 @@ +--- libpng-static-1.6.50.orig/configure.ac ++++ libpng-static-1.6.50/configure.ac +@@ -167,15 +167,6 @@ AC_CHECK_FUNCS([pow], , + AC_CHECK_FUNC([clock_gettime], , [AC_MSG_WARN([not building timepng])]) + AM_CONDITIONAL([HAVE_CLOCK_GETTIME], [test "$ac_cv_func_clock_gettime" = "yes"]) + +-AC_ARG_WITH(zlib-prefix, +- AS_HELP_STRING([[[--with-zlib-prefix]]], +- [prefix that may have been used in installed zlib]), +- [ZPREFIX=${withval}], +- [ZPREFIX='z_']) +-AC_CHECK_LIB([z], [zlibVersion], , +- [AC_CHECK_LIB([z], [${ZPREFIX}zlibVersion], , +- [AC_MSG_ERROR([zlib not installed])])]) +- + # The following is for pngvalid, to ensure it catches FP errors even on + # platforms that don't enable FP exceptions, the function appears in the math + # library (typically), it's not an error if it is not found. diff --git a/sources/libs/libpng-static/debian/patches/series b/sources/libs/libpng-static/debian/patches/series new file mode 100644 index 0000000..e7701ab --- /dev/null +++ b/sources/libs/libpng-static/debian/patches/series @@ -0,0 +1 @@ +01_force-build.patch diff --git a/sources/libs/libpng-static/debian/rules b/sources/libs/libpng-static/debian/rules new file mode 100755 index 0000000..e7fee5b --- /dev/null +++ b/sources/libs/libpng-static/debian/rules @@ -0,0 +1,29 @@ +#!/usr/bin/make -f + +KXSTUDIO_EXPLICIT_PATH_INCLUDE = y +KXSTUDIO_NO_FASTMATH = y +include /usr/share/dpkg/kxstudio.mk + +LDFLAGS += -lz + +override_dh_auto_configure: + ./configure --disable-maintainer-mode \ + --prefix=/opt/kxstudio \ + --enable-static \ + --disable-shared + ln -s /opt/kxstudio/include/zconf.h . + ln -s /opt/kxstudio/include/zlib.h . + +override_dh_auto_clean: + dh_auto_clean + rm -f zconf.h zlib.h + +override_dh_auto_install: + dh_auto_install + # remove unwanted + rm $(CURDIR)/debian/libpng-static/opt/kxstudio/lib/*.la + rm -r $(CURDIR)/debian/libpng-static/opt/kxstudio/bin + rm -r $(CURDIR)/debian/libpng-static/opt/kxstudio/share + +%: + dh $@ diff --git a/sources/libs/libpng-static/debian/source/format b/sources/libs/libpng-static/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/sources/libs/libpng-static/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/sources/libs/ntk-static/debian/changelog b/sources/libs/ntk-static/debian/changelog new file mode 100644 index 0000000..ffff2e0 --- /dev/null +++ b/sources/libs/ntk-static/debian/changelog @@ -0,0 +1,5 @@ +ntk-static (6:1.3.1001+git20251025-1kxstudio1) focal; urgency=medium + + * Initial package + + -- falkTX Sat, 25 Oct 2025 21:08:10 +0200 diff --git a/sources/libs/ntk-static/debian/control b/sources/libs/ntk-static/debian/control new file mode 100644 index 0000000..9d3b5f2 --- /dev/null +++ b/sources/libs/ntk-static/debian/control @@ -0,0 +1,33 @@ +Source: ntk-static +Section: devel +Priority: optional +Maintainer: falkTX +Build-Depends: debhelper-compat (= 13), + kxstudio-build-scripts (>= 5), + pkg-config, + python-is-python3, + python3, + libjpeg-turbo-static, + libpng-static, + pixman-static, + zlib-static, + libcairo-dev, + libfreetype6-dev, + libx11-dev, + libxext-dev, + libxft-dev, + libxinerama-dev +# python3-zombie-imp, +Standards-Version: 3.8.4 + +Package: ntk-static +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libjpeg-turbo-static, libpng-static, pixman-static, zlib-static, + libcairo-dev, libfreetype6-dev, libx11-dev, libxext-dev, libxft-dev, libxinerama-dev +Description: non-toolkit (static) + The Non Tool Kit (NTK) is a fork of the Fast Light ToolKit library, + adding improved graphics rendering via Cairo, a streamlined and + enhanced widget set, and other features designed to improve the + appearance and performance of the Non applications. + . + This package provides the static library used in KXStudio builds. diff --git a/sources/libs/ntk-static/debian/patches/force-libs.patch b/sources/libs/ntk-static/debian/patches/force-libs.patch new file mode 100644 index 0000000..67db7c3 --- /dev/null +++ b/sources/libs/ntk-static/debian/patches/force-libs.patch @@ -0,0 +1,18 @@ +--- ntk-static-0.0.0+git20130603.orig/ntk.pc.in ++++ ntk-static-0.0.0+git20130603/ntk.pc.in +@@ -9,5 +9,5 @@ Version: @VERSION@ + + Requires: cairo >= 1.9.0 + Requires.private: x11 xft +-Libs: -L${libdir} -lntk ++Libs: -L${libdir} -lntk -lcairo -lgobject-2.0 -lglib-2.0 -lpixman-1 -lpng16 -lfontconfig -lXft -lfreetype -lXrender -lX11 -ldl -lz + Cflags: -I${includedir}/ntk @CFLAGS@ +--- ntk-static-0.0.0+git20130930.orig/ntk_images.pc.in ++++ ntk-static-0.0.0+git20130930/ntk_images.pc.in +@@ -9,5 +9,5 @@ Version: @VERSION@ + + Requires: cairo >= 1.9.0 + Requires.private: x11 xft +-Libs: -L${libdir} -lntk_images -lntk ++Libs: -L${libdir} -lntk_images -lntk -lcairo -lgobject-2.0 -lglib-2.0 -lpixman-1 -lpng16 -lfontconfig -lXft -lfreetype -lXrender -lX11 -ldl -lz + Cflags: -I${includedir}/ntk @CFLAGS@ diff --git a/sources/libs/ntk-static/debian/patches/remove-cairo-check.patch b/sources/libs/ntk-static/debian/patches/remove-cairo-check.patch new file mode 100644 index 0000000..7bcd774 --- /dev/null +++ b/sources/libs/ntk-static/debian/patches/remove-cairo-check.patch @@ -0,0 +1,11 @@ +--- ntk-static-0.0.0+git20130824.orig/wscript ++++ ntk-static-0.0.0+git20130824/wscript +@@ -91,8 +91,6 @@ def configure(conf): + conf.check_cfg(package='xft', uselib_store='XFT', args="--cflags --libs", + mandatory=True) + +- conf.check_cfg(package='cairo', uselib_store='CAIRO', args="--cflags --libs", +- atleast_version='1.10.0', mandatory=True) + + + conf.check(header_name='unistd.h', define_name='HAVE_UNISTD_H', mandatory=False) diff --git a/sources/libs/ntk-static/debian/patches/series b/sources/libs/ntk-static/debian/patches/series new file mode 100644 index 0000000..d5dc3a5 --- /dev/null +++ b/sources/libs/ntk-static/debian/patches/series @@ -0,0 +1,3 @@ +force-libs.patch +remove-cairo-check.patch +static-build.patch diff --git a/sources/libs/ntk-static/debian/patches/static-build.patch b/sources/libs/ntk-static/debian/patches/static-build.patch new file mode 100644 index 0000000..25bb43a --- /dev/null +++ b/sources/libs/ntk-static/debian/patches/static-build.patch @@ -0,0 +1,44 @@ +--- ntk-static-0.0.0+git20141018.orig/fluid/wscript ++++ ntk-static-0.0.0+git20141018/fluid/wscript +@@ -32,10 +32,7 @@ def build(bld): + ''', + target='ntk-fluid', + includes = [ '.', '../' ], +- use = [ 'ntk_images_shared', 'ntk_shared' ], +- # FIXME: why is this now neccessary with new waf version? +- uselib = [ +- 'LIBJPEG', 'LIBPNG', 'LIBZ', 'DL', 'M', 'PTHREAD' , +- 'X11', 'FONTCONFIG', 'XFT', 'CAIRO', 'DL', 'M', 'PTHREAD' ], ++ use = [ 'ntk_images_static', 'ntk_static' ], ++ lib = [ 'cairo', 'pixman-1', 'png16', 'fontconfig', 'freetype', 'Xft', 'Xrender', 'X11', 'dl', 'z' ], + install_path = '${BINDIR}' ) + +--- ntk-static-0.0.0+git20141018.orig/wscript ++++ ntk-static-0.0.0+git20141018/wscript +@@ -43,9 +43,6 @@ def makelib(bld,*k,**kw): + kw['features' ] = 'c cxx cxxstlib' + kw['name'] = kw['target'] + '_static' + bld.shlib(*k,**kw) +- kw['features' ] = 'c cxx cxxshlib' +- kw['name'] = kw['target'] + '_shared' +- bld.stlib(*k,**kw) + + # from autowaf + def run_ldconfig(ctx): +@@ -501,11 +498,12 @@ src/Fl_Gl_Window.cxx + + + bld.program( +- source = 'src/ntk-chtheme.cxx', +- target = 'ntk-chtheme', ++ source = 'src/ntk-chtheme.cxx', ++ target = 'ntk-chtheme', + includes = [ '.' ], +- use = ['ntk_images_shared', 'ntk_shared'], +- install_path = "${BINDIR}" ) ++ use = [ 'ntk_images_static', 'ntk_static' ], ++ lib = [ 'cairo', 'pixman-1', 'png16', 'fontconfig', 'freetype', 'Xft', 'Xrender', 'X11', 'dl', 'z' ], ++ install_path = "${BINDIR}" ) + + # bld( features = 'subst', + # source = 'ntk-config.in', diff --git a/sources/libs/ntk-static/debian/rules b/sources/libs/ntk-static/debian/rules new file mode 100755 index 0000000..f54dd72 --- /dev/null +++ b/sources/libs/ntk-static/debian/rules @@ -0,0 +1,23 @@ +#!/usr/bin/make -f + +KXSTUDIO_EXPLICIT_PATH_INCLUDE = y +KXSTUDIO_NO_FASTMATH = y +include /usr/share/dpkg/kxstudio.mk + +override_dh_auto_configure: + ./waf configure --prefix=/opt/kxstudio + +override_dh_auto_build: + ./waf build + +override_dh_auto_install: + ./waf install --destdir=$(CURDIR)/debian/ntk-static + find $(CURDIR)/debian/ntk-static -name \*.la -delete + +override_dh_auto_clean: + ./waf clean || true + rm -f .lock-waf_linux_build + rm -rf .waf3-*/ build/ + +%: + dh $@ diff --git a/sources/libs/ntk-static/debian/source/format b/sources/libs/ntk-static/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/sources/libs/ntk-static/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/sources/libs/pixman-static/debian/changelog b/sources/libs/pixman-static/debian/changelog new file mode 100644 index 0000000..0947e53 --- /dev/null +++ b/sources/libs/pixman-static/debian/changelog @@ -0,0 +1,5 @@ +pixman-static (6:0.46.4-1kxstudio1) focal; urgency=medium + + * Initial pakage + + -- falkTX Sat, 25 Oct 2025 20:26:40 +0200 diff --git a/sources/libs/pixman-static/debian/control b/sources/libs/pixman-static/debian/control new file mode 100644 index 0000000..51e73bd --- /dev/null +++ b/sources/libs/pixman-static/debian/control @@ -0,0 +1,21 @@ +Source: pixman-static +Section: devel +Priority: optional +Maintainer: falkTX +Build-Depends: debhelper-compat (= 13), + kxstudio-build-scripts (>= 5), + meson, + pkg-config +Standards-Version: 4.5.0 +Rules-Requires-Root: no + +Package: pixman-static +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: pixel-manipulation library for X and cairo (static) + A library for manipulating pixel regions -- a set of Y-X banded + rectangles, image compositing using the Porter/Duff model + and implicit mask generation for geometric primitives including + trapezoids, triangles, and rectangles. + . + This package provides the static library used in KXStudio builds. diff --git a/sources/libs/pixman-static/debian/patches/01_hide-symbols.patch b/sources/libs/pixman-static/debian/patches/01_hide-symbols.patch new file mode 100644 index 0000000..c154a2e --- /dev/null +++ b/sources/libs/pixman-static/debian/patches/01_hide-symbols.patch @@ -0,0 +1,20 @@ +--- pixman-static-0.46.4.orig/pixman/pixman-compiler.h ++++ pixman-static-0.46.4/pixman/pixman-compiler.h +@@ -90,16 +90,7 @@ + #endif + + /* GCC visibility */ +-#if defined(__GNUC__) && __GNUC__ >= 4 && !defined(_WIN32) +-# define PIXMAN_EXPORT __attribute__ ((visibility("default"))) +-/* Sun Studio 8 visibility */ +-#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) +-# define PIXMAN_EXPORT __global +-#elif defined (_MSC_VER) || defined(__MINGW32__) +-# define PIXMAN_EXPORT PIXMAN_API +-#else +-# define PIXMAN_EXPORT +-#endif ++#define PIXMAN_EXPORT + + /* member offsets */ + #define CONTAINER_OF(type, member, data) \ diff --git a/sources/libs/pixman-static/debian/patches/series b/sources/libs/pixman-static/debian/patches/series new file mode 100644 index 0000000..bd06a79 --- /dev/null +++ b/sources/libs/pixman-static/debian/patches/series @@ -0,0 +1 @@ +01_hide-symbols.patch diff --git a/sources/libs/pixman-static/debian/rules b/sources/libs/pixman-static/debian/rules new file mode 100755 index 0000000..6516f4a --- /dev/null +++ b/sources/libs/pixman-static/debian/rules @@ -0,0 +1,17 @@ +#!/usr/bin/make -f + +KXSTUDIO_NO_FASTMATH = y +include /usr/share/dpkg/kxstudio.mk + +override_dh_auto_configure: + dh_auto_configure -- --prefix=/opt/kxstudio --libdir=lib --sysconfdir=/etc \ + -Ddefault_library=static \ + -Ddemos=disabled \ + -Dtests=disabled \ + -Dgtk=disabled + +override_dh_auto_test: + dh_auto_test -- --verbose --timeout-multiplier 3 + +%: + dh $@ diff --git a/sources/libs/pixman-static/debian/source/format b/sources/libs/pixman-static/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/sources/libs/pixman-static/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt)