summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGaetan Bisson2018-05-02 23:17:01 -1000
committerGaetan Bisson2018-05-02 23:17:01 -1000
commit3537238c3e880da520359291fb1653b8fb43cdaf (patch)
tree6a27f6004195d659733b541c677b5ad4369cc4b9
parent86f8583002cb246b5afd0825d15bd2b624878f17 (diff)
downloadaur-3537238c3e880da520359291fb1653b8fb43cdaf.tar.gz
enable USE_SYSTEM_LIBS and switch to upstream's lcms2
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD18
-rw-r--r--cmm_ctx_gone.patch126
3 files changed, 10 insertions, 140 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 62d9df8f382..6c66234b977 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = mupdf-git
pkgdesc = Lightweight PDF, XPS, and E-book viewer
- pkgver = 20171213.308c8d8e
+ pkgver = 20180502.effc6a80
pkgrel = 1
url = http://mupdf.com/
arch = i686
@@ -17,12 +17,12 @@ pkgbase = mupdf-git
provides = mupdf
conflicts = mupdf
source = git://git.ghostscript.com/mupdf.git
+ source = lcms2::git://git.ghostscript.com/thirdparty-lcms2.git
source = git://git.ghostscript.com/mujs.git
- source = cmm_ctx_gone.patch
source = desktop
sha256sums = SKIP
sha256sums = SKIP
- sha256sums = df0d070fe988c5b1f610d21a90d3028f03c73829c026510b2789d7c1f285fbf5
+ sha256sums = SKIP
sha256sums = 3240d4ebda002cb2c4f42cd42793c6160f1701d349d0acb797819dfd10d4fedd
pkgname = mupdf-git
diff --git a/PKGBUILD b/PKGBUILD
index fb4d71dc166..10b5992523f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=mupdf-git
_pkgname=mupdf
-pkgver=20171213.308c8d8e
+pkgver=20180502.effc6a80
pkgrel=1
pkgdesc='Lightweight PDF, XPS, and E-book viewer'
arch=('i686' 'x86_64' 'armv7h')
@@ -13,12 +13,12 @@ license=('AGPL3')
makedepends=('git')
depends=('freeglut' 'glu' 'harfbuzz' 'jbig2dec' 'libjpeg-turbo' 'openjpeg2')
source=('git://git.ghostscript.com/mupdf.git'
+ 'lcms2::git://git.ghostscript.com/thirdparty-lcms2.git'
'git://git.ghostscript.com/mujs.git'
- 'cmm_ctx_gone.patch'
'desktop')
sha256sums=('SKIP'
'SKIP'
- 'df0d070fe988c5b1f610d21a90d3028f03c73829c026510b2789d7c1f285fbf5'
+ 'SKIP'
'3240d4ebda002cb2c4f42cd42793c6160f1701d349d0acb797819dfd10d4fedd')
conflicts=("${_pkgname}")
@@ -32,24 +32,20 @@ pkgver() {
prepare() {
cd "${srcdir}/${_pkgname}"
+ sed "/lcms2.git/c url = $(pwd)/../lcms2" -i .gitmodules
sed "/mujs.git/c url = $(pwd)/../mujs" -i .gitmodules
+ git submodule update --init thirdparty/lcms2
git submodule update --init thirdparty/mujs
- # link against system libopenjp2 dynamically
- sed '/#define OPJ_STATIC/d' -i source/fitz/load-jpx.c
-
# embedding CJK fonts into binaries is madness...
sed '/TOFU_CJK /c #define TOFU_CJK 1/' -i include/mupdf/fitz/config.h
-
- # fix moronic lcms2 version
- sed 's/lcms2art/lcms2/g' -i source/fitz/color-lcms.c
- patch -p1 -i ../cmm_ctx_gone.patch
}
build() {
cd "${srcdir}/${_pkgname}"
- make release XCFLAGS="$CFLAGS -fPIC" XLIBS="$LDFLAGS"
+ export USE_SYSTEM_LIBS=yes
+ make release
}
package() {
diff --git a/cmm_ctx_gone.patch b/cmm_ctx_gone.patch
deleted file mode 100644
index e49cbc18df7..00000000000
--- a/cmm_ctx_gone.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-diff -Naur old/source/fitz/color-lcms.c new/source/fitz/color-lcms.c
---- old/source/fitz/color-lcms.c 2017-10-25 22:19:28.890575079 -1000
-+++ new/source/fitz/color-lcms.c 2017-10-25 22:21:22.919919617 -1000
-@@ -66,7 +66,7 @@
- static int
- fz_lcms_num_devcomps(cmsContext cmm_ctx, fz_iccprofile *profile)
- {
-- return cmsChannelsOf(cmm_ctx, cmsGetColorSpace(cmm_ctx, profile->cmm_handle));
-+ return cmsChannelsOf(cmsGetColorSpace(profile->cmm_handle));
- }
-
- static void
-@@ -132,8 +132,8 @@
- DEBUG_LCMS_MEM(("@@@@@@@ Transform Pixmap Start:: mupdf ctx = %p lcms ctx = %p link = %p \n", (void*)ctx, (void*)cmm_ctx, (void*)link->cmm_handle));
-
- /* check the channels. */
-- src_format = cmsGetTransformInputFormat(cmm_ctx, hTransform);
-- dst_format = cmsGetTransformOutputFormat(cmm_ctx, hTransform);
-+ src_format = cmsGetTransformInputFormat(hTransform);
-+ dst_format = cmsGetTransformOutputFormat(hTransform);
- cmm_num_src = T_CHANNELS(src_format);
- cmm_num_des = T_CHANNELS(dst_format);
- cmm_extras = T_EXTRA(src_format);
-@@ -150,7 +150,7 @@
- for (; h > 0; h--)
- {
- fz_lcms_unmultiply_row(ctx, sn, sc, sw, buffer, inputpos);
-- cmsDoTransform(cmm_ctx, hTransform, buffer, outputpos, sw);
-+ cmsDoTransform(hTransform, buffer, outputpos, sw);
- fz_lcms_premultiply_row(ctx, dn, dc, dw, outputpos);
- inputpos += ss;
- outputpos += ds;
-@@ -161,7 +161,7 @@
- {
- for (; h > 0; h--)
- {
-- cmsDoTransform(cmm_ctx, hTransform, inputpos, outputpos, sw);
-+ cmsDoTransform(hTransform, inputpos, outputpos, sw);
- inputpos += ss;
- outputpos += ds;
- }
-@@ -176,7 +176,7 @@
- cmsContext cmm_ctx = (cmsContext)instance;
- cmsHTRANSFORM hTransform = (cmsHTRANSFORM) link->cmm_handle;
-
-- cmsDoTransform(cmm_ctx, hTransform, src, dst, 1);
-+ cmsDoTransform(hTransform, src, dst, 1);
- }
-
- void
-@@ -194,19 +194,19 @@
- DEBUG_LCMS_MEM(("@@@@@@@ Create Link Start:: mupdf ctx = %p lcms ctx = %p src = %p des = %p \n", (void*)ctx, (void*)cmm_ctx, (void*)src->cmm_handle, (void*)dst->cmm_handle));
-
- /* src */
-- src_cs = cmsGetColorSpace(cmm_ctx, src->cmm_handle);
-- lcms_src_cs = _cmsLCMScolorSpace(cmm_ctx, src_cs);
-+ src_cs = cmsGetColorSpace(src->cmm_handle);
-+ lcms_src_cs = _cmsLCMScolorSpace(src_cs);
- if (lcms_src_cs < 0)
- lcms_src_cs = 0;
-- src_num_chan = cmsChannelsOf(cmm_ctx, src_cs);
-+ src_num_chan = cmsChannelsOf(src_cs);
- src_data_type = (COLORSPACE_SH(lcms_src_cs) | CHANNELS_SH(src_num_chan) | DOSWAP_SH(src->bgr) | SWAPFIRST_SH(src->bgr && (src_extras != 0)) | BYTES_SH(num_bytes) | EXTRA_SH(src_extras));
-
- /* dst */
-- des_cs = cmsGetColorSpace(cmm_ctx, dst->cmm_handle);
-- lcms_des_cs = _cmsLCMScolorSpace(cmm_ctx, des_cs);
-+ des_cs = cmsGetColorSpace(dst->cmm_handle);
-+ lcms_des_cs = _cmsLCMScolorSpace(des_cs);
- if (lcms_des_cs < 0)
- lcms_des_cs = 0;
-- des_num_chan = cmsChannelsOf(cmm_ctx, des_cs);
-+ des_num_chan = cmsChannelsOf(des_cs);
- des_data_type = (COLORSPACE_SH(lcms_des_cs) | CHANNELS_SH(des_num_chan) | DOSWAP_SH(dst->bgr) | SWAPFIRST_SH(dst->bgr && (dst_extras != 0)) | BYTES_SH(num_bytes) | EXTRA_SH(dst_extras));
-
- /* flags */
-@@ -254,17 +254,17 @@
- cmsUInt32Number prf_data_type;
- cmsHPROFILE hProfiles[3];
-
-- prf_cs = cmsGetColorSpace(cmm_ctx, prf->cmm_handle);
-- lcms_prf_cs = _cmsLCMScolorSpace(cmm_ctx, prf_cs);
-+ prf_cs = cmsGetColorSpace(prf->cmm_handle);
-+ lcms_prf_cs = _cmsLCMScolorSpace(prf_cs);
- if (lcms_prf_cs < 0)
- lcms_prf_cs = 0;
-- prf_num_chan = cmsChannelsOf(cmm_ctx, prf_cs);
-+ prf_num_chan = cmsChannelsOf(prf_cs);
- prf_data_type = (COLORSPACE_SH(lcms_prf_cs) | CHANNELS_SH(prf_num_chan) | BYTES_SH(num_bytes));
- src_to_prf_link = cmsCreateTransformTHR(cmm_ctx, src->cmm_handle, src_data_type, prf->cmm_handle, prf_data_type, rend->ri, flag);
- if (!src_to_prf_link)
- fz_throw(ctx, FZ_ERROR_GENERIC, "cmsCreateTransform failed");
-- src_to_prf_profile = cmsTransform2DeviceLink(cmm_ctx, src_to_prf_link, 3.4, flag);
-- cmsDeleteTransform(cmm_ctx, src_to_prf_link);
-+ src_to_prf_profile = cmsTransform2DeviceLink(src_to_prf_link, 3.4, flag);
-+ cmsDeleteTransform(src_to_prf_link);
- if (!src_to_prf_profile)
- fz_throw(ctx, FZ_ERROR_GENERIC, "cmsTransform2DeviceLink failed");
-
-@@ -272,7 +272,7 @@
- hProfiles[1] = prf->cmm_handle;
- hProfiles[2] = dst->cmm_handle;
- link->cmm_handle = cmsCreateMultiprofileTransformTHR(cmm_ctx, hProfiles, 3, src_data_type, des_data_type, INTENT_RELATIVE_COLORIMETRIC, flag);
-- cmsCloseProfile(cmm_ctx, src_to_prf_profile);
-+ cmsCloseProfile(src_to_prf_profile);
- if (!link->cmm_handle)
- fz_throw(ctx, FZ_ERROR_GENERIC, "cmsCreateMultiprofileTransform failed");
- }
-@@ -287,7 +287,7 @@
- cmsContext cmm_ctx = (cmsContext)instance;
- DEBUG_LCMS_MEM(("Free Link:: link = %p \n", (void*)link->cmm_handle));
- if (link->cmm_handle != NULL)
-- cmsDeleteTransform(cmm_ctx, link->cmm_handle);
-+ cmsDeleteTransform(link->cmm_handle);
- link->cmm_handle = NULL;
- }
-
-@@ -341,7 +341,7 @@
- cmsContext cmm_ctx = (cmsContext)instance;
- DEBUG_LCMS_MEM(("Free Profile:: profile = %p \n", (void*) profile->cmm_handle));
- if (profile->cmm_handle != NULL)
-- cmsCloseProfile(cmm_ctx, profile->cmm_handle);
-+ cmsCloseProfile(profile->cmm_handle);
- profile->cmm_handle = NULL;
- }
-