From 55854645c9ba4ca755adb07299b5f78d87027ba1 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 5 Feb 2017 19:19:44 +0000 Subject: nx-X11/config/cf/X11.tmpl: Set a more appropriate font directory (recommended: /usr/{,local/}share/nx/fonts). Note for distribution maintainers: your normally want to symlink /usr/share/nx/fonts to /usr/share/fonts/X11 in your packaging. --- nx-X11/config/cf/X11.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index 54f94355d..d5527cdc7 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -856,10 +856,10 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #define DocPdfDir $(DOCDIR)/PDF #endif #ifndef FontDir -#define FontDir $(LIBDIR)/fonts +#define FontDir $(USRDATADIR)/fonts #endif #ifndef FontEncDir -#define FontEncDir $(LIBDIR)/fonts/encodings +#define FontEncDir $(USRDATADIR)/fonts/encodings #endif #ifndef AdmDir #define AdmDir /usr/adm -- cgit v1.2.3 From 66d9b3e8b2c3520627d3c850c0cc93b57f855cdd Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 5 Feb 2017 19:54:40 +0000 Subject: Xserver/hw/nxagent/Font.c: Drop NXAGENT_ALTERNATE_FONT_PATH_4 (pointing to /usr/NX/share/fonts/base) entirely. --- nx-X11/programs/Xserver/hw/nxagent/Font.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index 5b9c31106..1213443c9 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -73,7 +73,6 @@ is" without express or implied warranty. #define NXAGENT_ALTERNATE_FONT_DIR "/usr/share/X11/fonts" #define NXAGENT_ALTERNATE_FONT_DIR_2 "/usr/share/fonts/X11" #define NXAGENT_ALTERNATE_FONT_DIR_3 "/usr/share/fonts" -#define NXAGENT_ALTERNATE_FONT_DIR_4 "/usr/NX/share/fonts" #define NXAGENT_DEFAULT_FONT_PATH \ "/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/Speedo/,\ @@ -99,9 +98,6 @@ is" without express or implied warranty. /usr/share/fonts/100dpi/,/usr/share/fonts/TTF/,\ /usr/NX/share/fonts/base" -#define NXAGENT_ALTERNATE_FONT_PATH_4 \ -"/usr/NX/share/fonts/base" - #undef NXAGENT_FONTCACHE_DEBUG #undef NXAGENT_RECONNECT_FONT_DEBUG #undef NXAGENT_FONTMATCH_DEBUG @@ -1574,32 +1570,6 @@ void nxagentVerifyDefaultFontPath(void) strcat(fontPath, NXAGENT_ALTERNATE_FONT_PATH_3); } - - if (stat(NXAGENT_ALTERNATE_FONT_DIR_4, &dirStat) == 0 && - S_ISDIR(dirStat.st_mode) != 0) - { - /* - * Let's use the "/usr/NX/share/fonts" path. - */ - - #ifdef TEST - fprintf(stderr, "nxagentVerifyDefaultFontPath: Assuming fonts in directory [%s].\n", - validateString(NXAGENT_ALTERNATE_FONT_DIR_4)); - #endif - - if (*fontPath != '\0') - { - fontPath = realloc(fontPath, strlen(fontPath) + strlen(NXAGENT_ALTERNATE_FONT_PATH_4) + 2); - strcat(fontPath, ","); - } - else - { - fontPath = realloc(fontPath, strlen(fontPath) + strlen(NXAGENT_ALTERNATE_FONT_PATH_4) + 1); - } - - strcat(fontPath, NXAGENT_ALTERNATE_FONT_PATH_4); - } - if (*fontPath == '\0') { #ifdef WARNING -- cgit v1.2.3 From 7e3bb3f1902f5d4299d6a5aa77d410723ff5c715 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 5 Feb 2017 20:18:13 +0000 Subject: Xserver/hw/nxagent/Font.c: Change (alternative) default font path order to make font path search compliant with latest FHS for X11 fonts (though, prefer /usr/share/nx/fonts as default path). --- nx-X11/programs/Xserver/hw/nxagent/Font.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index 1213443c9..b4f5c2274 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -69,15 +69,15 @@ is" without express or implied warranty. #undef TEST #undef DEBUG -#define NXAGENT_DEFAULT_FONT_DIR "/usr/X11R6/lib/X11/fonts" +#define NXAGENT_DEFAULT_FONT_DIR "/usr/share/nx/fonts" #define NXAGENT_ALTERNATE_FONT_DIR "/usr/share/X11/fonts" #define NXAGENT_ALTERNATE_FONT_DIR_2 "/usr/share/fonts/X11" -#define NXAGENT_ALTERNATE_FONT_DIR_3 "/usr/share/fonts" +#define NXAGENT_ALTERNATE_FONT_DIR_3 "/usr/X11R6/lib/X11/fonts" #define NXAGENT_DEFAULT_FONT_PATH \ -"/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/Speedo/,\ -/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/75dpi/,\ -/usr/X11R6/lib/X11/fonts/100dpi/,/usr/X11R6/lib/X11/fonts/TTF/,\ +"/usr/share/nx/fonts/misc/,/usr/share/nx/fonts/Speedo/,\ +/usr/share/nx/fonts/Type1/,/usr/share/nx/fonts/75dpi/,\ +/usr/share/nx/fonts/100dpi/,/usr/share/nx/fonts/TTF/,\ /usr/NX/share/fonts/base" #define NXAGENT_ALTERNATE_FONT_PATH \ @@ -93,9 +93,9 @@ is" without express or implied warranty. /usr/NX/share/fonts/base" #define NXAGENT_ALTERNATE_FONT_PATH_3 \ -"/usr/share/fonts/misc/,/usr/share/fonts/Speedo/,\ -/usr/share/fonts/Type1/,/usr/share/fonts/75dpi/,\ -/usr/share/fonts/100dpi/,/usr/share/fonts/TTF/,\ +"/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/Speedo/,\ +/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/75dpi/,\ +/usr/X11R6/lib/X11/fonts/100dpi/,/usr/X11R6/lib/X11/fonts/TTF/,\ /usr/NX/share/fonts/base" #undef NXAGENT_FONTCACHE_DEBUG @@ -1475,7 +1475,7 @@ void nxagentVerifyDefaultFontPath(void) S_ISDIR(dirStat.st_mode) != 0) { /* - * Let's use the old "/usr/X11R6/lib/X11/fonts" style. + * Let's use the old "/usr/share/nx/fonts" style. */ #ifdef TEST @@ -1550,7 +1550,7 @@ void nxagentVerifyDefaultFontPath(void) S_ISDIR(dirStat.st_mode) != 0) { /* - * Let's use the "/usr/share/fonts" path. + * Let's use the "/usr/X11R6/lib/X11/fonts" path. */ #ifdef TEST -- cgit v1.2.3 From 18794d26cd45bc85289de782cb5edc889af359c0 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 5 Feb 2017 20:19:49 +0000 Subject: Xserver/hw/nxagent/Font.c: Drop references to /usr/NX/share/fonts/base as default font path, entirely. --- nx-X11/programs/Xserver/hw/nxagent/Font.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index b4f5c2274..c9b9e3f75 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -77,26 +77,22 @@ is" without express or implied warranty. #define NXAGENT_DEFAULT_FONT_PATH \ "/usr/share/nx/fonts/misc/,/usr/share/nx/fonts/Speedo/,\ /usr/share/nx/fonts/Type1/,/usr/share/nx/fonts/75dpi/,\ -/usr/share/nx/fonts/100dpi/,/usr/share/nx/fonts/TTF/,\ -/usr/NX/share/fonts/base" +/usr/share/nx/fonts/100dpi/,/usr/share/nx/fonts/TTF/" #define NXAGENT_ALTERNATE_FONT_PATH \ "/usr/share/X11/fonts/misc/,/usr/share/X11/fonts/Speedo/,\ /usr/share/X11/fonts/Type1/,/usr/share/X11/fonts/75dpi/,\ -/usr/share/X11/fonts/100dpi/,/usr/share/X11/fonts/TTF/,\ -/usr/NX/share/fonts/base" +/usr/share/X11/fonts/100dpi/,/usr/share/X11/fonts/TTF/" #define NXAGENT_ALTERNATE_FONT_PATH_2 \ "/usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Speedo/,\ /usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,\ -/usr/share/fonts/X11/100dpi/,/usr/share/fonts/X11/TTF/,\ -/usr/NX/share/fonts/base" +/usr/share/fonts/X11/100dpi/,/usr/share/fonts/X11/TTF/" #define NXAGENT_ALTERNATE_FONT_PATH_3 \ "/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/Speedo/,\ /usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/75dpi/,\ -/usr/X11R6/lib/X11/fonts/100dpi/,/usr/X11R6/lib/X11/fonts/TTF/,\ -/usr/NX/share/fonts/base" +/usr/X11R6/lib/X11/fonts/100dpi/,/usr/X11R6/lib/X11/fonts/TTF/" #undef NXAGENT_FONTCACHE_DEBUG #undef NXAGENT_RECONNECT_FONT_DEBUG -- cgit v1.2.3 From 8383b192549a1fd74e75cbbeeea10b5eb95914e3 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 5 Feb 2017 19:34:33 +0000 Subject: debian/nx-x11-common.{links,dirs}: Make sure /usr/share/fonts/X11 are reachable for nxagent (via placing a symlink to /usr/share/nx/fonts). --- debian/nx-x11-common.dirs | 2 ++ debian/nx-x11-common.links | 1 + 2 files changed, 3 insertions(+) create mode 100644 debian/nx-x11-common.dirs create mode 100644 debian/nx-x11-common.links diff --git a/debian/nx-x11-common.dirs b/debian/nx-x11-common.dirs new file mode 100644 index 000000000..07c657e09 --- /dev/null +++ b/debian/nx-x11-common.dirs @@ -0,0 +1,2 @@ +# we symlink to this dir, so make sure it exists +usr/share/fonts/X11 \ No newline at end of file diff --git a/debian/nx-x11-common.links b/debian/nx-x11-common.links new file mode 100644 index 000000000..1c181aa84 --- /dev/null +++ b/debian/nx-x11-common.links @@ -0,0 +1 @@ +usr/share/fonts/X11 usr/share/nx/fonts \ No newline at end of file -- cgit v1.2.3 From 82a7f72ca53054d3c1be1cf0b83d7e6245ed7ca6 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 5 Feb 2017 21:04:46 +0000 Subject: Xserver/dix/main.c: ErrorF requires a string to end with an EOL char. --- nx-X11/programs/Xserver/dix/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/dix/main.c b/nx-X11/programs/Xserver/dix/main.c index 553ad6c03..7bd41d865 100644 --- a/nx-X11/programs/Xserver/dix/main.c +++ b/nx-X11/programs/Xserver/dix/main.c @@ -388,7 +388,7 @@ main(int argc, char *argv[], char *envp[]) SetFontPath(0, 0, (unsigned char *)defaultFontPath, &error); } else { if (SetDefaultFontPath(defaultFontPath) != Success) - ErrorF("failed to set default font path '%s'", + ErrorF("failed to set default font path '%s'\n", defaultFontPath); } if (!SetDefaultFont(defaultTextFont)) -- cgit v1.2.3 From ed40c3db1d5d6a58523c49d733678af10515460d Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 5 Feb 2017 17:06:55 +0000 Subject: {dix/,hw/nxagent/NX}dixfont.{c,h}: Support using builtin-fonts. Makes dependency on X11's misc fonts package obsolete. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This backports a mixture of these X.org commits (only focusing on SetDefaultFontPath() function): commit 03e8bfa1d122f7dea905d48c93cfd54afd991dfd Author: Alan Coopersmith Date: Sat Nov 27 20:09:04 2010 -0800 Convert existing Xprintf style calls to asprintf style Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Reviewed-by: Mikhail Gusarov commit 12e46e83733b47d2704e1509960192365102af46 Author: Tiago Vignatti Date: Fri Mar 25 22:07:31 2011 +0200 dix: fix memory leak in SetDefaultFontPath Signed-off-by: Tiago Vignatti Reviewed-by: Nicolas Peninguy Reviewed-by: Peter Hutterer commit 6592db6bb526f0c43b4c7b55859c629709e039b4 Author: Mikhail Gusarov Date: Fri Jun 4 16:58:58 2010 +0700 Get rid of xstrdup when argument is definitely non-NULL Replace xstrdup with strdup when either constant string is being duplicated or argument is guarded by conditionals and obviously can't be NULL Signed-off-by: Mikhail Gusarov Reviewed-by: Alan Coopersmith commit f56cbe1ef24415d0142b9a7d0ab0a031069ccb52 Author: Rémi Cardona Date: Mon Sep 14 17:09:59 2009 +0200 dix: append "built-ins" to the font path in SetDefaultFontPath 49b93df8a3002db7196aa3fc1fd8dca1c12a55d6 made the hard dependency on a "fixed" font go away but only Xorg could use the built-ins fonts by default. With this commit, all DDXs get "built-ins" appended to their FontPath, not just Xorg. Tested with Xorg, Xvfb and Xnest. Signed-off-by: Rémi Cardona Signed-off-by: Jon TURNEY Tested-by: Jon TURNEY Signed-off-by: Peter Hutterer commit 49b93df8a3002db7196aa3fc1fd8dca1c12a55d6 Author: Paulo Cesar Pereira de Andrade Date: Wed Jan 7 19:37:03 2009 -0200 Default to use standard bitmap fonts, with builtins as fallback The builtin-fonts configure option was removed, as it at best should have been a runtime option. Instead, now it always register all "font path element" backends, and adds built-ins fonts at the end of the default font path. This should be a more reasonable solution, to "correct" the most common Xorg FAQ (could not open default font 'fixed'), and also don't break by default applications that use only the standard/historical X Font rendering. Backported-to-NX-by: Mike Gabriel Fixes ArcticaProject/nx-libs#84. Fixes ArcticaProject/nx-libs#285. --- nx-X11/programs/Xserver/dix/dixfonts.c | 4 +++ nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c | 47 +++++++++++++++++++------ nx-X11/programs/Xserver/include/dixfont.h | 5 +++ 3 files changed, 45 insertions(+), 11 deletions(-) diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c b/nx-X11/programs/Xserver/dix/dixfonts.c index f7d047c2d..bbce105e3 100644 --- a/nx-X11/programs/Xserver/dix/dixfonts.c +++ b/nx-X11/programs/Xserver/dix/dixfonts.c @@ -1925,7 +1925,11 @@ InitFonts () { patternCache = MakeFontPatternCache(); +#if defined(BUILTIN_FONTS) || defined(NXAGENT_SERVER) + BuiltinRegisterFpeFunctions(); +#else register_fpe_functions(); +#endif } int diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c index 294a5727d..b3d7cc9d7 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c @@ -926,6 +926,9 @@ bail: int SetDefaultFontPath(char *path) { + char *temp_path, + *start, + *end; unsigned char *cp, *pp, *nump, @@ -936,20 +939,41 @@ SetDefaultFontPath(char *path) size = 0, bad; - /* get enough for string, plus values -- use up commas */ #ifdef NX_TRANS_SOCKET - len = strlen(_NXGetFontPath(path)) + 1; -#else - len = strlen(path) + 1; -#endif + path = (char *) _NXGetFontPath(path); +#endif /* NX_TRANS_SOCKET */ + + start = path; + + /* ensure temp_path contains "built-ins" */ + while (1) { + start = strstr(start, "built-ins"); + if (start == NULL) + break; + end = start + strlen("built-ins"); + if ((start == path || start[-1] == ',') && (!*end || *end == ',')) + break; + start = end; + } + if (!start) { + if (asprintf(&temp_path, "%s%sbuilt-ins", path, *path ? "," : "") + == -1) + temp_path = NULL; + } + else { + temp_path = strdup(path); + } + if (!temp_path) + return BadAlloc; + + /* get enough for string, plus values -- use up commas */ + len = strlen(temp_path) + 1; nump = cp = newpath = (unsigned char *) ALLOCATE_LOCAL(len); - if (!newpath) + if (!newpath) { + free(temp_path); return BadAlloc; -#ifdef NX_TRANS_SOCKET - pp = (unsigned char *) _NXGetFontPath(path); -#else - pp = (unsigned char *) path; -#endif + } + pp = (unsigned char *) temp_path; cp++; while (*pp) { if (*pp == ',') { @@ -968,6 +992,7 @@ SetDefaultFontPath(char *path) err = SetFontPathElements(num, newpath, &bad, TRUE); DEALLOCATE_LOCAL(newpath); + free(temp_path); return err; } diff --git a/nx-X11/programs/Xserver/include/dixfont.h b/nx-X11/programs/Xserver/include/dixfont.h index 6582be24c..1303d0e0f 100644 --- a/nx-X11/programs/Xserver/include/dixfont.h +++ b/nx-X11/programs/Xserver/include/dixfont.h @@ -150,4 +150,9 @@ extern void InitGlyphCaching(void); extern void SetGlyphCachingMode(int /*newmode*/); +/* + * libXfont/src/builtins/builtin.h + */ +extern _X_EXPORT void BuiltinRegisterFpeFunctions(void); + #endif /* DIXFONT_H */ -- cgit v1.2.3 From 2ba23b3bcf8f51d12c34582c8e0c51abebad6fda Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 5 Feb 2017 21:35:33 +0000 Subject: For consistency, apply patch from previous commit (630a7c3) to the original Xserver/dix/dixfonts.c file, although the code is undef'ed when NXAGENT_SERVER is defined. --- nx-X11/programs/Xserver/dix/dixfonts.c | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c b/nx-X11/programs/Xserver/dix/dixfonts.c index bbce105e3..4ac9fa696 100644 --- a/nx-X11/programs/Xserver/dix/dixfonts.c +++ b/nx-X11/programs/Xserver/dix/dixfonts.c @@ -1824,6 +1824,9 @@ SetFontPath(ClientPtr client, int npaths, unsigned char *paths, int *error) int SetDefaultFontPath(char *path) { + char *temp_path, + *start, + *end; unsigned char *cp, *pp, *nump, @@ -1834,12 +1837,36 @@ SetDefaultFontPath(char *path) size = 0, bad; + /* ensure temp_path contains "built-ins" */ + start = path; + while (1) { + start = strstr(start, "built-ins"); + if (start == NULL) + break; + end = start + strlen("built-ins"); + if ((start == path || start[-1] == ',') && (!*end || *end == ',')) + break; + start = end; + } + if (!start) { + if (asprintf(&temp_path, "%s%sbuilt-ins", path, *path ? "," : "") + == -1) + temp_path = NULL; + } + else { + temp_path = strdup(path); + } + if (!temp_path) + return BadAlloc; + /* get enough for string, plus values -- use up commas */ - len = strlen(path) + 1; + len = strlen(temp_path) + 1; nump = cp = newpath = (unsigned char *) ALLOCATE_LOCAL(len); - if (!newpath) + if (!newpath) { + free(temp_path); return BadAlloc; - pp = (unsigned char *) path; + } + pp = (unsigned char *) temp_path; cp++; while (*pp) { if (*pp == ',') { @@ -1858,6 +1885,7 @@ SetDefaultFontPath(char *path) err = SetFontPathElements(num, newpath, &bad, TRUE); DEALLOCATE_LOCAL(newpath); + free(temp_path); return err; } -- cgit v1.2.3 From 899254993d9cfbc23dfbb5bb0c422ddd39b47288 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 8 Feb 2017 13:57:42 +0100 Subject: nx-libs.spec: Handle fonts dir symlinking and install /usr/share/nx/fonts symlink into nxagent bin:pkg. This change probably needs more fine-tuning for the various other RPM distros and versions out there. Thanks to Orion Poplawski for providing a code snippet with a general approach of handling this. --- nx-libs.spec | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/nx-libs.spec b/nx-libs.spec index 7e3ca4796..6fa4e8342 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -272,8 +272,9 @@ Obsoletes: nx < 3.5.0-19 Provides: nx = %{version}-%{release} Provides: nx%{?_isa} = %{version}-%{release} Obsoletes: nxauth < 3.5.99.1 -%if 0%{?suse_version} -Requires: xorg-x11-fonts-core +%if 0%{?fedora} || 0%{?rhel} +# For /usr/share/X11/fonts +Requires: xorg-x11-font-utils %endif %description -n nxagent @@ -357,6 +358,13 @@ make install \ INSTALL_FILE="install -pm0644" \ INSTALL_PROGRAM="install -pm0755" +# this needs to be adapted distribution-wise... +%if 0%{?suse_version} +ln -s ../fonts %{buildroot}%{_datadir}/nx/fonts +%elif 0%{?fedora} || 0%{?rhel} +ln -s ../X11/fonts %{buildroot}%{_datadir}/nx/fonts +%endif + # Remove static libs (they don't exist on SLES, so using -f here) rm -f %{buildroot}%{_libdir}/*.a @@ -520,6 +528,7 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %dir %{_datadir}/nx %{_datadir}/nx/VERSION.nxagent %{_datadir}/man/man1/nxagent.1* +%{_datadir}/nx/fonts %files -n nxproxy %defattr(-,root,root) -- cgit v1.2.3 From cb760f14d69c33b8617787ebcca6c4477ed33598 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Thu, 9 Feb 2017 08:55:07 +0100 Subject: dix: use one single function to register fpe fonts In NXAGENT_SERVER we can also fully rely on libXfont for handling fpe internals. Backported from X.org: commit 75536ee80595c79bba95a1fb6844126ee08486d4 Author: Tiago Vignatti Date: Wed Jun 23 15:18:03 2010 +0300 dix: use one single function to register fpe fonts X server doesn't need to understand fpe internals, so use register_fpe_functions from libXfont. It's required to get new version of libXfont, therefore adjust it to be passed to autoconf. Signed-off-by: Tiago Vignatti Reviewed-by: Mikhail Gusarov Reviewed-by: Alex Deucher Signed-off-by: Keith Packard Backported-to-NX-by: Mike Gabriel --- nx-X11/programs/Xserver/dix/dixfonts.c | 4 ---- nx-X11/programs/Xserver/include/dixfont.h | 5 +---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c b/nx-X11/programs/Xserver/dix/dixfonts.c index 4ac9fa696..c8e5f6cf0 100644 --- a/nx-X11/programs/Xserver/dix/dixfonts.c +++ b/nx-X11/programs/Xserver/dix/dixfonts.c @@ -1953,11 +1953,7 @@ InitFonts () { patternCache = MakeFontPatternCache(); -#if defined(BUILTIN_FONTS) || defined(NXAGENT_SERVER) - BuiltinRegisterFpeFunctions(); -#else register_fpe_functions(); -#endif } int diff --git a/nx-X11/programs/Xserver/include/dixfont.h b/nx-X11/programs/Xserver/include/dixfont.h index 1303d0e0f..6149d2160 100644 --- a/nx-X11/programs/Xserver/include/dixfont.h +++ b/nx-X11/programs/Xserver/include/dixfont.h @@ -150,9 +150,6 @@ extern void InitGlyphCaching(void); extern void SetGlyphCachingMode(int /*newmode*/); -/* - * libXfont/src/builtins/builtin.h - */ -extern _X_EXPORT void BuiltinRegisterFpeFunctions(void); +extern void register_fpe_functions(void); #endif /* DIXFONT_H */ -- cgit v1.2.3 From 6fd724366597f37848a7a9aaf9d823b5ea6737b7 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 9 Feb 2017 08:59:15 +0100 Subject: debian/control: Versioned B-D on libXfont (>= 1.4.2). --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index a98f7f6f0..c00550dc2 100644 --- a/debian/control +++ b/debian/control @@ -15,7 +15,7 @@ Build-Depends: libxmltok1-dev, libxml2-dev, libxpm-dev, - libxfont1-dev | libxfont-dev, + libxfont1-dev | libxfont-dev (>= 1.4.2), libxdmcp-dev, libxdamage-dev, libxext-dev, -- cgit v1.2.3 From 6c9e3ebdb955b5164b68e53cff9509b24a824907 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 9 Feb 2017 08:59:48 +0100 Subject: nx-libs.spec: Versioned BR on libXfont-devel (and alike) (>= 1.4.2). --- nx-libs.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nx-libs.spec b/nx-libs.spec index 6fa4e8342..2e5a6c017 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -34,7 +34,7 @@ BuildRequires: pkgconfig(pixman-1) >= 0.13.2 BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xpm) -BuildRequires: pkgconfig(xfont) +BuildRequires: pkgconfig(xfont) >= 1.4.2 BuildRequires: pkgconfig(xdmcp) BuildRequires: pkgconfig(xdamage) BuildRequires: pkgconfig(xcomposite) @@ -50,7 +50,7 @@ BuildRequires: pixman-devel >= 0.13.2 BuildRequires: xorg-x11-libX11-devel BuildRequires: xorg-x11-libXext-devel BuildRequires: xorg-x11-libXpm-devel -BuildRequires: xorg-x11-libXfont-devel +BuildRequires: xorg-x11-libXfont-devel >= 1.4.2 BuildRequires: xorg-x11-libXdmcp-devel BuildRequires: xorg-x11-libXdamage-devel BuildRequires: xorg-x11-libXcomposite-devel @@ -70,7 +70,7 @@ BuildRequires: pixman-devel >= 0.13.2 BuildRequires: libX11-devel BuildRequires: libXext-devel BuildRequires: libXpm-devel -BuildRequires: libXfont-devel +BuildRequires: libXfont-devel >= 1.4.2 BuildRequires: libXdmcp-devel BuildRequires: libXdamage-devel BuildRequires: libXcomposite-devel -- cgit v1.2.3 From b981dd16fe5bcf0e01d08fedcb031231ad307515 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 14 Feb 2017 09:35:32 +0000 Subject: nx-libs.spec: Add BR for Fedora/RHEL builds: xorg-x11-font-utils. --- nx-libs.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/nx-libs.spec b/nx-libs.spec index 2e5a6c017..c95bc6131 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -78,6 +78,7 @@ BuildRequires: libXrandr-devel BuildRequires: libXfixes-devel BuildRequires: libXtst-devel BuildRequires: libXinerama-devel +BuildRequires: xorg-x11-font-utils %endif # For imake -- cgit v1.2.3 From 3e8d98f3337a21cd9147c1ac4f27258c95bf41b0 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 27 Feb 2017 11:20:38 +0100 Subject: nx-libs.spec: Add BR filesystem for SUSE builds (as it provides /usr/share/fonts). --- nx-libs.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nx-libs.spec b/nx-libs.spec index c95bc6131..7e25b7e81 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -26,6 +26,10 @@ BuildRequires: gpg-offline %endif %if 0%{?suse_version} BuildRequires: fdupes + +# This is what provides /usr/share/fonts on SUSE systems... +BuildRequires: filesystem + %if 0%{?suse_version} >= 1130 BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(libpng) -- cgit v1.2.3